selectors) {
this.selectors = selectors;
return this;
}
/**
- * Get the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
- * not.
+ * Get the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be
+ * stored.
*
- * @return the startOnCreation value.
+ * @return the customerDataStorage value.
*/
- public Boolean startOnCreation() {
- return this.startOnCreation;
+ public CustomerDataStorageProperties customerDataStorage() {
+ return this.customerDataStorage;
}
/**
- * Set the startOnCreation property: A boolean value that indicates if experiment should be started on creation or
- * not.
+ * Set the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be
+ * stored.
*
- * @param startOnCreation the startOnCreation value to set.
+ * @param customerDataStorage the customerDataStorage value to set.
* @return the ExperimentProperties object itself.
*/
- public ExperimentProperties withStartOnCreation(Boolean startOnCreation) {
- this.startOnCreation = startOnCreation;
+ public ExperimentProperties withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) {
+ this.customerDataStorage = customerDataStorage;
return this;
}
@@ -118,6 +135,9 @@ public void validate() {
} else {
selectors().forEach(e -> e.validate());
}
+ if (customerDataStorage() != null) {
+ customerDataStorage().validate();
+ }
}
private static final ClientLogger LOGGER = new ClientLogger(ExperimentProperties.class);
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.java
deleted file mode 100644
index 03dc806d31cd..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentStartOperationResultInner.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.chaos.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** Model that represents the result of a start Experiment operation. */
-@Immutable
-public final class ExperimentStartOperationResultInner {
- /*
- * String of the Experiment name.
- */
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
- private String name;
-
- /*
- * URL to retrieve the Experiment status.
- */
- @JsonProperty(value = "statusUrl", access = JsonProperty.Access.WRITE_ONLY)
- private String statusUrl;
-
- /** Creates an instance of ExperimentStartOperationResultInner class. */
- public ExperimentStartOperationResultInner() {
- }
-
- /**
- * Get the name property: String of the Experiment name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Get the statusUrl property: URL to retrieve the Experiment status.
- *
- * @return the statusUrl value.
- */
- public String statusUrl() {
- return this.statusUrl;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java
new file mode 100644
index 000000000000..3468d9ffca75
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The status of operation. */
+@Fluent
+public final class OperationStatusInner {
+ /*
+ * The operation Id.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * The operation name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The start time of the operation.
+ */
+ @JsonProperty(value = "startTime")
+ private String startTime;
+
+ /*
+ * The end time of the operation.
+ */
+ @JsonProperty(value = "endTime")
+ private String endTime;
+
+ /*
+ * The status of the operation.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Error response
+ *
+ * The error detail of the operation if any.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /** Creates an instance of OperationStatusInner class. */
+ public OperationStatusInner() {
+ }
+
+ /**
+ * Get the id property: The operation Id.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The operation Id.
+ *
+ * @param id the id value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: The operation name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The operation name.
+ *
+ * @param name the name value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public String startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: The start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStartTime(String startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public String endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: The end time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withEndTime(String endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the operation.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The status of the operation.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the error property: Error response
+ *
+ * The error detail of the operation if any.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: Error response
+ *
+ *
The error detail of the operation if any.
+ *
+ * @param error the error value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java
new file mode 100644
index 000000000000..1ae730e956a8
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.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.chaos.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.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** PrivateAccesses tracked resource. */
+@Fluent
+public final class PrivateAccessInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private PrivateAccessProperties innerProperties = new PrivateAccessProperties();
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of PrivateAccessInner class. */
+ public PrivateAccessInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateAccessProperties 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;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public PrivateAccessInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public PrivateAccessInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: A readonly collection of private endpoint connection. Currently only
+ * one endpoint connection is supported.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model PrivateAccessInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateAccessInner.class);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessProperties.java
new file mode 100644
index 000000000000..0e7360069ad6
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessProperties.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.chaos.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties of a private access resource. */
+@Immutable
+public final class PrivateAccessProperties {
+ /*
+ * A readonly collection of private endpoint connection. Currently only one endpoint connection is supported.
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /** Creates an instance of PrivateAccessProperties class. */
+ public PrivateAccessProperties() {
+ }
+
+ /**
+ * Get the privateEndpointConnections property: A readonly collection of private endpoint connection. Currently only
+ * one endpoint connection is supported.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..abf8373f3024
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.chaos.models.PrivateEndpoint;
+import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.chaos.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The private endpoint connection resource. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of PrivateEndpointConnectionInner class. */
+ public PrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupIds();
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState 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();
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..2286ba03e40d
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.chaos.models.PrivateEndpoint;
+import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.chaos.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * The group ids for the private endpoint resource.
+ */
+ @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List groupIds;
+
+ /*
+ * The private endpoint resource.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /** Creates an instance of PrivateEndpointConnectionProperties class. */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java
new file mode 100644
index 000000000000..43d467fe4ce1
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.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.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.chaos.models.PrivateLinkResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of private link resources. */
+@Fluent
+public final class PrivateLinkResourceListResultInner {
+ /*
+ * Array of private link resources
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /** Creates an instance of PrivateLinkResourceListResultInner class. */
+ public PrivateLinkResourceListResultInner() {
+ }
+
+ /**
+ * Get the value property: Array of private link resources.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Array of private link resources.
+ *
+ * @param value the value value to set.
+ * @return the PrivateLinkResourceListResultInner object itself.
+ */
+ public PrivateLinkResourceListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the
+ * next page of snapshots.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 000000000000..17a3a5e569bb
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceProperties.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.chaos.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class PrivateLinkResourceProperties {
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource private link DNS zone name.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /** Creates an instance of PrivateLinkResourceProperties class. */
+ public PrivateLinkResourceProperties() {
+ }
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
index ed74ff20611a..866e2f6186ac 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java
@@ -137,7 +137,7 @@ public ChaosManagementClientImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
index c07707c92a9d..33d57ab36613 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java
@@ -26,7 +26,9 @@
import com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient;
import com.azure.resourcemanager.chaos.fluent.ChaosManagementClient;
import com.azure.resourcemanager.chaos.fluent.ExperimentsClient;
+import com.azure.resourcemanager.chaos.fluent.OperationStatusesClient;
import com.azure.resourcemanager.chaos.fluent.OperationsClient;
+import com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient;
import com.azure.resourcemanager.chaos.fluent.TargetTypesClient;
import com.azure.resourcemanager.chaos.fluent.TargetsClient;
import java.io.IOException;
@@ -149,6 +151,18 @@ public ExperimentsClient getExperiments() {
return this.experiments;
}
+ /** The OperationStatusesClient object to access its operations. */
+ private final OperationStatusesClient operationStatuses;
+
+ /**
+ * Gets the OperationStatusesClient object to access its operations.
+ *
+ * @return the OperationStatusesClient object.
+ */
+ public OperationStatusesClient getOperationStatuses() {
+ return this.operationStatuses;
+ }
+
/** The OperationsClient object to access its operations. */
private final OperationsClient operations;
@@ -161,6 +175,18 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /** The PrivateAccessesClient object to access its operations. */
+ private final PrivateAccessesClient privateAccesses;
+
+ /**
+ * Gets the PrivateAccessesClient object to access its operations.
+ *
+ * @return the PrivateAccessesClient object.
+ */
+ public PrivateAccessesClient getPrivateAccesses() {
+ return this.privateAccesses;
+ }
+
/** The TargetTypesClient object to access its operations. */
private final TargetTypesClient targetTypes;
@@ -207,11 +233,13 @@ public TargetsClient getTargets() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-04-15-preview";
+ this.apiVersion = "2023-10-27-preview";
this.capabilities = new CapabilitiesClientImpl(this);
this.capabilityTypes = new CapabilityTypesClientImpl(this);
this.experiments = new ExperimentsClientImpl(this);
+ this.operationStatuses = new OperationStatusesClientImpl(this);
this.operations = new OperationsClientImpl(this);
+ this.privateAccesses = new PrivateAccessesClientImpl(this);
this.targetTypes = new TargetTypesClientImpl(this);
this.targets = new TargetsClientImpl(this);
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java
deleted file mode 100644
index ab9f6c580516..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentCancelOperationResultImpl.java
+++ /dev/null
@@ -1,36 +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.chaos.implementation;
-
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
-import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
-
-public final class ExperimentCancelOperationResultImpl implements ExperimentCancelOperationResult {
- private ExperimentCancelOperationResultInner innerObject;
-
- private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
-
- ExperimentCancelOperationResultImpl(
- ExperimentCancelOperationResultInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String statusUrl() {
- return this.innerModel().statusUrl();
- }
-
- public ExperimentCancelOperationResultInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.chaos.ChaosManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
index d48f0bfa66a5..3fc9bf45d8ab 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java
@@ -4,18 +4,17 @@
package com.azure.resourcemanager.chaos.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.chaos.fluent.models.ExperimentInner;
+import com.azure.resourcemanager.chaos.models.ChaosExperimentStep;
+import com.azure.resourcemanager.chaos.models.ChaosTargetSelector;
+import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties;
import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
-import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
import com.azure.resourcemanager.chaos.models.ExperimentUpdate;
+import com.azure.resourcemanager.chaos.models.ProvisioningState;
import com.azure.resourcemanager.chaos.models.ResourceIdentity;
-import com.azure.resourcemanager.chaos.models.Selector;
-import com.azure.resourcemanager.chaos.models.Step;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -58,8 +57,12 @@ public ResourceIdentity identity() {
return this.innerModel().identity();
}
- public List steps() {
- List inner = this.innerModel().steps();
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public List steps() {
+ List inner = this.innerModel().steps();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
@@ -67,8 +70,8 @@ public List steps() {
}
}
- public List selectors() {
- List inner = this.innerModel().selectors();
+ public List selectors() {
+ List inner = this.innerModel().selectors();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
@@ -76,8 +79,8 @@ public List selectors() {
}
}
- public Boolean startOnCreation() {
- return this.innerModel().startOnCreation();
+ public CustomerDataStorageProperties customerDataStorage() {
+ return this.innerModel().customerDataStorage();
}
public Region region() {
@@ -116,8 +119,7 @@ public Experiment create() {
serviceManager
.serviceClient()
.getExperiments()
- .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), Context.NONE)
- .getValue();
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), Context.NONE);
return this;
}
@@ -126,8 +128,7 @@ public Experiment create(Context context) {
serviceManager
.serviceClient()
.getExperiments()
- .createOrUpdateWithResponse(resourceGroupName, experimentName, this.innerModel(), context)
- .getValue();
+ .createOrUpdate(resourceGroupName, experimentName, this.innerModel(), context);
return this;
}
@@ -147,8 +148,7 @@ public Experiment apply() {
serviceManager
.serviceClient()
.getExperiments()
- .updateWithResponse(resourceGroupName, experimentName, updateExperiment, Context.NONE)
- .getValue();
+ .update(resourceGroupName, experimentName, updateExperiment, Context.NONE);
return this;
}
@@ -157,8 +157,7 @@ public Experiment apply(Context context) {
serviceManager
.serviceClient()
.getExperiments()
- .updateWithResponse(resourceGroupName, experimentName, updateExperiment, context)
- .getValue();
+ .update(resourceGroupName, experimentName, updateExperiment, context);
return this;
}
@@ -189,20 +188,20 @@ public Experiment refresh(Context context) {
return this;
}
- public Response cancelWithResponse(Context context) {
- return serviceManager.experiments().cancelWithResponse(resourceGroupName, experimentName, context);
+ public void cancel() {
+ serviceManager.experiments().cancel(resourceGroupName, experimentName);
}
- public ExperimentCancelOperationResult cancel() {
- return serviceManager.experiments().cancel(resourceGroupName, experimentName);
+ public void cancel(Context context) {
+ serviceManager.experiments().cancel(resourceGroupName, experimentName, context);
}
- public Response startWithResponse(Context context) {
- return serviceManager.experiments().startWithResponse(resourceGroupName, experimentName, context);
+ public void start() {
+ serviceManager.experiments().start(resourceGroupName, experimentName);
}
- public ExperimentStartOperationResult start() {
- return serviceManager.experiments().start(resourceGroupName, experimentName);
+ public void start(Context context) {
+ serviceManager.experiments().start(resourceGroupName, experimentName, context);
}
public ExperimentImpl withRegion(Region location) {
@@ -215,12 +214,12 @@ public ExperimentImpl withRegion(String location) {
return this;
}
- public ExperimentImpl withSteps(List steps) {
+ public ExperimentImpl withSteps(List steps) {
this.innerModel().withSteps(steps);
return this;
}
- public ExperimentImpl withSelectors(List selectors) {
+ public ExperimentImpl withSelectors(List selectors) {
this.innerModel().withSelectors(selectors);
return this;
}
@@ -240,8 +239,8 @@ public ExperimentImpl withIdentity(ResourceIdentity identity) {
}
}
- public ExperimentImpl withStartOnCreation(Boolean startOnCreation) {
- this.innerModel().withStartOnCreation(startOnCreation);
+ public ExperimentImpl withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) {
+ this.innerModel().withCustomerDataStorage(customerDataStorage);
return this;
}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java
deleted file mode 100644
index 8fa3ca1fcc2c..000000000000
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentStartOperationResultImpl.java
+++ /dev/null
@@ -1,36 +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.chaos.implementation;
-
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
-import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
-
-public final class ExperimentStartOperationResultImpl implements ExperimentStartOperationResult {
- private ExperimentStartOperationResultInner innerObject;
-
- private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
-
- ExperimentStartOperationResultImpl(
- ExperimentStartOperationResultInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String statusUrl() {
- return this.innerModel().statusUrl();
- }
-
- public ExperimentStartOperationResultInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.chaos.ChaosManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
index dcf3d6a39bc9..1c5bfd94855a 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java
@@ -28,18 +28,21 @@
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.chaos.fluent.ExperimentsClient;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsListResult;
import com.azure.resourcemanager.chaos.models.ExperimentListResult;
import com.azure.resourcemanager.chaos.models.ExperimentStatusListResult;
import com.azure.resourcemanager.chaos.models.ExperimentUpdate;
+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 ExperimentsClient. */
@@ -98,9 +101,9 @@ Mono> listByResourceGroup(
@Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
- @ExpectedResponses({200, 204})
+ @ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(
+ Mono>> delete(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -126,9 +129,9 @@ Mono> getByResourceGroup(
@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(
+ Mono>> createOrUpdate(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -141,9 +144,9 @@ Mono> createOrUpdate(
@Headers({"Content-Type: application/json"})
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
+ Mono>> update(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -158,7 +161,7 @@ Mono> update(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel")
@ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> cancel(
+ Mono>> cancel(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -172,7 +175,7 @@ Mono> cancel(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start")
@ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> start(
+ Mono>> start(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -682,7 +685,7 @@ public PagedIterable listByResourceGroup(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String experimentName) {
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String experimentName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -730,7 +733,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(
+ private Mono>> deleteWithResponseAsync(
String resourceGroupName, String experimentName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -764,6 +767,78 @@ private Mono> deleteWithResponseAsync(
context);
}
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String experimentName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, experimentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String experimentName) {
+ return this.beginDeleteAsync(resourceGroupName, experimentName).getSyncPoller();
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String experimentName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, experimentName, context).getSyncPoller();
+ }
+
/**
* Delete a Experiment resource.
*
@@ -776,7 +851,9 @@ private Mono> deleteWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String experimentName) {
- return deleteWithResponseAsync(resourceGroupName, experimentName).flatMap(ignored -> Mono.empty());
+ return beginDeleteAsync(resourceGroupName, experimentName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -788,11 +865,13 @@ private Mono deleteAsync(String resourceGroupName, String experimentName)
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown 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 deleteWithResponse(String resourceGroupName, String experimentName, Context context) {
- return deleteWithResponseAsync(resourceGroupName, experimentName, context).block();
+ private Mono deleteAsync(String resourceGroupName, String experimentName, Context context) {
+ return beginDeleteAsync(resourceGroupName, experimentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -806,7 +885,22 @@ public Response deleteWithResponse(String resourceGroupName, String experi
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String experimentName) {
- deleteWithResponse(resourceGroupName, experimentName, Context.NONE);
+ deleteAsync(resourceGroupName, experimentName).block();
+ }
+
+ /**
+ * Delete a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String experimentName, Context context) {
+ deleteAsync(resourceGroupName, experimentName, context).block();
}
/**
@@ -964,7 +1058,7 @@ public ExperimentInner getByResourceGroup(String resourceGroupName, String exper
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1021,7 +1115,7 @@ private Mono> createOrUpdateWithResponseAsync(
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1061,6 +1155,91 @@ private Mono> createOrUpdateWithResponseAsync(
context);
}
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or 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 model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExperimentInner.class,
+ ExperimentInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or 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 model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, context);
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or 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 model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment).getSyncPoller();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or 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 model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginCreateOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context).getSyncPoller();
+ }
+
/**
* Create or update a Experiment resource.
*
@@ -1075,8 +1254,9 @@ private Mono> createOrUpdateWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment) {
- return createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1089,12 +1269,14 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Experiment resource along with {@link Response}.
+ * @return model that represents a Experiment resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
+ private Mono createOrUpdateAsync(
String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, experimentName, experiment, context).block();
+ return beginCreateOrUpdateAsync(resourceGroupName, experimentName, experiment, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1110,7 +1292,25 @@ public Response createOrUpdateWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExperimentInner createOrUpdate(String resourceGroupName, String experimentName, ExperimentInner experiment) {
- return createOrUpdateWithResponse(resourceGroupName, experimentName, experiment, Context.NONE).getValue();
+ return createOrUpdateAsync(resourceGroupName, experimentName, experiment).block();
+ }
+
+ /**
+ * Create or update a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Experiment resource to be created or 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 model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner createOrUpdate(
+ String resourceGroupName, String experimentName, ExperimentInner experiment, Context context) {
+ return createOrUpdateAsync(resourceGroupName, experimentName, experiment, context).block();
}
/**
@@ -1126,7 +1326,7 @@ public ExperimentInner createOrUpdate(String resourceGroupName, String experimen
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1183,7 +1383,7 @@ private Mono> updateWithResponseAsync(
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1223,6 +1423,90 @@ private Mono> updateWithResponseAsync(
context);
}
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, experimentName, experiment);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExperimentInner.class,
+ ExperimentInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExperimentInner> beginUpdateAsync(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, experimentName, experiment, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExperimentInner.class, ExperimentInner.class, context);
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginUpdate(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
+ return this.beginUpdateAsync(resourceGroupName, experimentName, experiment).getSyncPoller();
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment 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 model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExperimentInner> beginUpdate(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, experimentName, experiment, context).getSyncPoller();
+ }
+
/**
* The operation to update an experiment.
*
@@ -1237,8 +1521,9 @@ private Mono> updateWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
- return updateWithResponseAsync(resourceGroupName, experimentName, experiment)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return beginUpdateAsync(resourceGroupName, experimentName, experiment)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1251,12 +1536,14 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents a Experiment resource along with {@link Response}.
+ * @return model that represents a Experiment resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
+ private Mono updateAsync(
String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
- return updateWithResponseAsync(resourceGroupName, experimentName, experiment, context).block();
+ return beginUpdateAsync(resourceGroupName, experimentName, experiment, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1272,7 +1559,25 @@ public Response updateWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExperimentInner update(String resourceGroupName, String experimentName, ExperimentUpdate experiment) {
- return updateWithResponse(resourceGroupName, experimentName, experiment, Context.NONE).getValue();
+ return updateAsync(resourceGroupName, experimentName, experiment).block();
+ }
+
+ /**
+ * The operation to update an experiment.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param experiment Parameters supplied to the Update experiment 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 model that represents a Experiment resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExperimentInner update(
+ String resourceGroupName, String experimentName, ExperimentUpdate experiment, Context context) {
+ return updateAsync(resourceGroupName, experimentName, experiment, context).block();
}
/**
@@ -1283,12 +1588,10 @@ public ExperimentInner update(String resourceGroupName, String experimentName, E
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation 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> cancelWithResponseAsync(
- String resourceGroupName, String experimentName) {
+ private Mono>> cancelWithResponseAsync(String resourceGroupName, String experimentName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1333,11 +1636,10 @@ private Mono> cancelWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation 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> cancelWithResponseAsync(
+ private Mono>> cancelWithResponseAsync(
String resourceGroupName, String experimentName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1379,13 +1681,85 @@ private Mono> cancelWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation on successful completion of {@link
- * Mono}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String experimentName) {
+ Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = cancelWithResponseAsync(resourceGroupName, experimentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(String resourceGroupName, String experimentName) {
+ return this.beginCancelAsync(resourceGroupName, experimentName).getSyncPoller();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName, String experimentName, Context context) {
+ return this.beginCancelAsync(resourceGroupName, experimentName, context).getSyncPoller();
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono cancelAsync(String resourceGroupName, String experimentName) {
- return cancelWithResponseAsync(resourceGroupName, experimentName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono cancelAsync(String resourceGroupName, String experimentName) {
+ return beginCancelAsync(resourceGroupName, experimentName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1397,12 +1771,27 @@ private Mono cancelAsync(String resourceGr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation along with {@link Response}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response cancelWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- return cancelWithResponseAsync(resourceGroupName, experimentName, context).block();
+ private Mono cancelAsync(String resourceGroupName, String experimentName, Context context) {
+ return beginCancelAsync(resourceGroupName, experimentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Cancel a running Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cancel(String resourceGroupName, String experimentName) {
+ cancelAsync(resourceGroupName, experimentName).block();
}
/**
@@ -1410,14 +1799,14 @@ public Response cancelWithResponse(
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a cancel Experiment operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ExperimentCancelOperationResultInner cancel(String resourceGroupName, String experimentName) {
- return cancelWithResponse(resourceGroupName, experimentName, Context.NONE).getValue();
+ public void cancel(String resourceGroupName, String experimentName, Context context) {
+ cancelAsync(resourceGroupName, experimentName, context).block();
}
/**
@@ -1428,12 +1817,10 @@ public ExperimentCancelOperationResultInner cancel(String resourceGroupName, 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 model that represents the result of a start Experiment operation 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> startWithResponseAsync(
- String resourceGroupName, String experimentName) {
+ private Mono>> startWithResponseAsync(String resourceGroupName, String experimentName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1478,11 +1865,10 @@ private Mono> startWithResponseAsy
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation 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> startWithResponseAsync(
+ private Mono>> startWithResponseAsync(
String resourceGroupName, String experimentName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -1524,13 +1910,83 @@ private Mono> startWithResponseAsy
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation on successful completion of {@link
- * Mono}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStartAsync(String resourceGroupName, String experimentName) {
+ Mono>> mono = startWithResponseAsync(resourceGroupName, experimentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStartAsync(
+ String resourceGroupName, String experimentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = startWithResponseAsync(resourceGroupName, experimentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStart(String resourceGroupName, String experimentName) {
+ return this.beginStartAsync(resourceGroupName, experimentName).getSyncPoller();
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStart(
+ String resourceGroupName, String experimentName, Context context) {
+ return this.beginStartAsync(resourceGroupName, experimentName, context).getSyncPoller();
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAsync(String resourceGroupName, String experimentName) {
- return startWithResponseAsync(resourceGroupName, experimentName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private Mono startAsync(String resourceGroupName, String experimentName) {
+ return beginStartAsync(resourceGroupName, experimentName).last().flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -1542,12 +1998,27 @@ private Mono startAsync(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 model that represents the result of a start Experiment operation along with {@link Response}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response startWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- return startWithResponseAsync(resourceGroupName, experimentName, context).block();
+ private Mono startAsync(String resourceGroupName, String experimentName, Context context) {
+ return beginStartAsync(resourceGroupName, experimentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Start a Experiment resource.
+ *
+ * @param resourceGroupName String that represents an Azure resource group.
+ * @param experimentName String that represents a Experiment resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void start(String resourceGroupName, String experimentName) {
+ startAsync(resourceGroupName, experimentName).block();
}
/**
@@ -1555,14 +2026,14 @@ public Response startWithResponse(
*
* @param resourceGroupName String that represents an Azure resource group.
* @param experimentName String that represents a Experiment resource name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return model that represents the result of a start Experiment operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ExperimentStartOperationResultInner start(String resourceGroupName, String experimentName) {
- return startWithResponse(resourceGroupName, experimentName, Context.NONE).getValue();
+ public void start(String resourceGroupName, String experimentName, Context context) {
+ startAsync(resourceGroupName, experimentName, context).block();
}
/**
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
index 66d80202a470..b81ad91e4bbe 100644
--- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java
@@ -10,15 +10,11 @@
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.chaos.fluent.ExperimentsClient;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentCancelOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner;
-import com.azure.resourcemanager.chaos.fluent.models.ExperimentStartOperationResultInner;
import com.azure.resourcemanager.chaos.fluent.models.ExperimentStatusInner;
import com.azure.resourcemanager.chaos.models.Experiment;
-import com.azure.resourcemanager.chaos.models.ExperimentCancelOperationResult;
import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails;
-import com.azure.resourcemanager.chaos.models.ExperimentStartOperationResult;
import com.azure.resourcemanager.chaos.models.ExperimentStatus;
import com.azure.resourcemanager.chaos.models.Experiments;
@@ -56,15 +52,14 @@ public PagedIterable listByResourceGroup(
return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager()));
}
- public Response deleteByResourceGroupWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- return this.serviceClient().deleteWithResponse(resourceGroupName, experimentName, context);
- }
-
public void deleteByResourceGroup(String resourceGroupName, String experimentName) {
this.serviceClient().delete(resourceGroupName, experimentName);
}
+ public void delete(String resourceGroupName, String experimentName, Context context) {
+ this.serviceClient().delete(resourceGroupName, experimentName, context);
+ }
+
public Response getByResourceGroupWithResponse(
String resourceGroupName, String experimentName, Context context) {
Response inner =
@@ -89,52 +84,20 @@ public Experiment getByResourceGroup(String resourceGroupName, String experiment
}
}
- public Response cancelWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- Response inner =
- this.serviceClient().cancelWithResponse(resourceGroupName, experimentName, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ExperimentCancelOperationResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ public void cancel(String resourceGroupName, String experimentName) {
+ this.serviceClient().cancel(resourceGroupName, experimentName);
}
- public ExperimentCancelOperationResult cancel(String resourceGroupName, String experimentName) {
- ExperimentCancelOperationResultInner inner = this.serviceClient().cancel(resourceGroupName, experimentName);
- if (inner != null) {
- return new ExperimentCancelOperationResultImpl(inner, this.manager());
- } else {
- return null;
- }
+ public void cancel(String resourceGroupName, String experimentName, Context context) {
+ this.serviceClient().cancel(resourceGroupName, experimentName, context);
}
- public Response startWithResponse(
- String resourceGroupName, String experimentName, Context context) {
- Response inner =
- this.serviceClient().startWithResponse(resourceGroupName, experimentName, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ExperimentStartOperationResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ public void start(String resourceGroupName, String experimentName) {
+ this.serviceClient().start(resourceGroupName, experimentName);
}
- public ExperimentStartOperationResult start(String resourceGroupName, String experimentName) {
- ExperimentStartOperationResultInner inner = this.serviceClient().start(resourceGroupName, experimentName);
- if (inner != null) {
- return new ExperimentStartOperationResultImpl(inner, this.manager());
- } else {
- return null;
- }
+ public void start(String resourceGroupName, String experimentName, Context context) {
+ this.serviceClient().start(resourceGroupName, experimentName, context);
}
public PagedIterable listAllStatuses(String resourceGroupName, String experimentName) {
@@ -270,10 +233,10 @@ public void deleteById(String id) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id)));
}
- this.deleteByResourceGroupWithResponse(resourceGroupName, experimentName, Context.NONE);
+ this.delete(resourceGroupName, experimentName, Context.NONE);
}
- public Response deleteByIdWithResponse(String id, Context context) {
+ public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER
@@ -289,7 +252,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id)));
}
- return this.deleteByResourceGroupWithResponse(resourceGroupName, experimentName, context);
+ this.delete(resourceGroupName, experimentName, context);
}
private ExperimentsClient serviceClient() {
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java
new file mode 100644
index 000000000000..09adcaaa1102
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.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.chaos.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.chaos.models.OperationStatus;
+
+public final class OperationStatusImpl implements OperationStatus {
+ private OperationStatusInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ OperationStatusImpl(OperationStatusInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public String endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public ManagementError error() {
+ return this.innerModel().error();
+ }
+
+ public OperationStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java
new file mode 100644
index 000000000000..9fd0d252fbaa
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.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.chaos.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.chaos.fluent.OperationStatusesClient;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */
+public final class OperationStatusesClientImpl implements OperationStatusesClient {
+ /** The proxy service used to perform REST calls. */
+ private final OperationStatusesService service;
+
+ /** The service client containing this operation class. */
+ private final ChaosManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationStatusesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationStatusesClientImpl(ChaosManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ChaosManagementClientOperationStatuses to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ChaosManagementClien")
+ public interface OperationStatusesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationsStatuses/{asyncOperationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("location") String location,
+ @PathParam("asyncOperationId") String asyncOperationId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation 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 the status of a long running azure asynchronous operation along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String location, String asyncOperationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (asyncOperationId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter asyncOperationId is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ location,
+ asyncOperationId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation 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 status of a long running azure asynchronous operation along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String location, String asyncOperationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (asyncOperationId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter asyncOperationId is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ location,
+ asyncOperationId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation 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 the status of a long running azure asynchronous operation on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String location, String asyncOperationId) {
+ return getWithResponseAsync(location, asyncOperationId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation 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 status of a long running azure asynchronous operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String location, String asyncOperationId, Context context) {
+ return getWithResponseAsync(location, asyncOperationId, context).block();
+ }
+
+ /**
+ * Get the status of a long running azure asynchronous operation.
+ *
+ * @param location The region name of operation.
+ * @param asyncOperationId The operation 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 the status of a long running azure asynchronous operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner get(String location, String asyncOperationId) {
+ return getWithResponse(location, asyncOperationId, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java
new file mode 100644
index 000000000000..8ae63088b7b0
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.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.chaos.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.chaos.fluent.OperationStatusesClient;
+import com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.chaos.models.OperationStatus;
+import com.azure.resourcemanager.chaos.models.OperationStatuses;
+
+public final class OperationStatusesImpl implements OperationStatuses {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationStatusesImpl.class);
+
+ private final OperationStatusesClient innerClient;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public OperationStatusesImpl(
+ OperationStatusesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String location, String asyncOperationId, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(location, asyncOperationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new OperationStatusImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus get(String location, String asyncOperationId) {
+ OperationStatusInner inner = this.serviceClient().get(location, asyncOperationId);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private OperationStatusesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java
new file mode 100644
index 000000000000..5b4b927fd4bc
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner;
+import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.chaos.models.PrivateAccess;
+import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public final class PrivateAccessImpl implements PrivateAccess, PrivateAccess.Definition, PrivateAccess.Update {
+ private PrivateAccessInner innerObject;
+
+ private final com.azure.resourcemanager.chaos.ChaosManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public List privateEndpointConnections() {
+ List inner = this.innerModel().privateEndpointConnections();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public PrivateAccessInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.chaos.ChaosManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String privateAccessName;
+
+ public PrivateAccessImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public PrivateAccess create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateAccesses()
+ .createOrUpdateWithResponse(resourceGroupName, privateAccessName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateAccess create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateAccesses()
+ .createOrUpdateWithResponse(resourceGroupName, privateAccessName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ PrivateAccessImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = new PrivateAccessInner();
+ this.serviceManager = serviceManager;
+ this.privateAccessName = name;
+ }
+
+ public PrivateAccessImpl update() {
+ return this;
+ }
+
+ public PrivateAccess apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateAccesses()
+ .createOrUpdateWithResponse(resourceGroupName, privateAccessName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateAccess apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateAccesses()
+ .createOrUpdateWithResponse(resourceGroupName, privateAccessName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ PrivateAccessImpl(PrivateAccessInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.privateAccessName = Utils.getValueFromIdByName(innerObject.id(), "privateAccesses");
+ }
+
+ public PrivateAccess refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateAccesses()
+ .getByResourceGroupWithResponse(resourceGroupName, privateAccessName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateAccess refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateAccesses()
+ .getByResourceGroupWithResponse(resourceGroupName, privateAccessName, context)
+ .getValue();
+ return this;
+ }
+
+ public PrivateAccessImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public PrivateAccessImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public PrivateAccessImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+}
diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java
new file mode 100644
index 000000000000..615076945fcd
--- /dev/null
+++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java
@@ -0,0 +1,2091 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.chaos.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.chaos.fluent.PrivateAccessesClient;
+import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner;
+import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner;
+import com.azure.resourcemanager.chaos.models.PrivateAccessListResult;
+import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionListResult;
+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 PrivateAccessesClient. */
+public final class PrivateAccessesClientImpl implements PrivateAccessesClient {
+ /** The proxy service used to perform REST calls. */
+ private final PrivateAccessesService service;
+
+ /** The service client containing this operation class. */
+ private final ChaosManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateAccessesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateAccessesClientImpl(ChaosManagementClientImpl client) {
+ this.service =
+ RestProxy.create(PrivateAccessesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ChaosManagementClientPrivateAccesses to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ChaosManagementClien")
+ public interface PrivateAccessesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/privateAccesses")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("continuationToken") String continuationToken,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("privateAccessName") String privateAccessName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}")
+ @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("privateAccessName") String privateAccessName,
+ @BodyParam("application/json") PrivateAccessInner privateAccess,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}")
+ @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("privateAccessName") String privateAccessName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateLinkResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getPrivateLinkResources(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("privateAccessName") String privateAccessName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getAPrivateEndpointConnection(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("privateAccessName") String privateAccessName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono