diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md index 2bb4d3ca336f6..368ae672e627a 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md @@ -1,7 +1,97 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2021-03-25) +- Azure Resource Manager LogAnalytics client library for Java. This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2020-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Change + +#### `models.Cluster$Definition` was modified + +* `withNextLink(java.lang.String)` was removed + +#### `models.Cluster` was modified + +* `nextLink()` was removed + +### New Feature + +* `models.BillingType` was added + +* `models.UserIdentityProperties` was added + +* `models.CapacityReservationProperties` was added + +* `models.AssociatedWorkspace` was added + +#### `models.Cluster$Definition` was modified + +* `withAssociatedWorkspaces(java.util.List)` was added +* `withBillingType(models.BillingType)` was added +* `withCapacityReservationProperties(models.CapacityReservationProperties)` was added +* `withIsDoubleEncryptionEnabled(java.lang.Boolean)` was added +* `withIsAvailabilityZonesEnabled(java.lang.Boolean)` was added + +#### `models.Cluster$Update` was modified + +* `withIdentity(models.Identity)` was added + +#### `models.Workspace$Update` was modified + +* `withFeatures(java.util.Map)` was added +* `withForceCmkForQuery(java.lang.Boolean)` was added + +#### `models.Identity` was modified + +* `withUserAssignedIdentities(java.util.Map)` was added +* `userAssignedIdentities()` was added + +#### `models.ClusterPatch` was modified + +* `identity()` was added +* `withIdentity(models.Identity)` was added + +#### `models.Workspace$Definition` was modified + +* `withFeatures(java.util.Map)` was added +* `withForceCmkForQuery(java.lang.Boolean)` was added + +#### `models.WorkspacePatch` was modified + +* `withFeatures(java.util.Map)` was added +* `createdDate()` was added +* `forceCmkForQuery()` was added +* `withForceCmkForQuery(java.lang.Boolean)` was added +* `features()` was added +* `modifiedDate()` was added + +#### `models.Workspace` was modified + +* `features()` was added +* `modifiedDate()` was added +* `forceCmkForQuery()` was added +* `createdDate()` was added + +#### `models.KeyVaultProperties` was modified + +* `withKeyRsaSize(java.lang.Integer)` was added +* `keyRsaSize()` was added + +#### `models.Table` was modified + +* `isTroubleshootingAllowed()` was added +* `lastTroubleshootDate()` was added +* `isTroubleshootEnabled()` was added + +#### `models.Cluster` was modified + +* `isAvailabilityZonesEnabled()` was added +* `isDoubleEncryptionEnabled()` was added +* `billingType()` was added +* `createdDate()` was added +* `capacityReservationProperties()` was added +* `lastModifiedDate()` was added +* `associatedWorkspaces()` was added ## 1.0.0-beta.1 (2020-12-18) diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md index 72f81d5b298de..ff0ff6f318f37 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md @@ -2,7 +2,21 @@ Azure Resource Manager LogAnalytics client library for Java. -This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2020-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2020-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] ## Getting started @@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Opera com.azure.resourcemanager azure-resourcemanager-loganalytics - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -75,6 +89,8 @@ For details on contributing to this repository, see the [contributing guide](htt 1. Create new Pull Request +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ [jdk]: https://docs.microsoft.com/java/azure/jdk/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml index 7af9d9bdd7725..7215ed2ba6b94 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for LogAnalytics Management - This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2020-08. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt + This package contains Microsoft Azure SDK for LogAnalytics Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Operational Insights Client. Package tag package-2020-10. https://github.com/Azure/azure-sdk-for-java @@ -41,6 +41,11 @@ + + com.azure + azure-core + 1.14.1 + com.azure azure-core-management diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java index 98a1bd1600c75..8d35de7368ab4 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java @@ -82,20 +82,12 @@ public final class LogAnalyticsManager { private ManagementGroups managementGroups; - private Operations operations; - private OperationStatuses operationStatuses; private SharedKeysOperations sharedKeysOperations; private Usages usages; - private Workspaces workspaces; - - private DeletedWorkspaces deletedWorkspaces; - - private Clusters clusters; - private StorageInsightConfigs storageInsightConfigs; private SavedSearches savedSearches; @@ -108,8 +100,16 @@ public final class LogAnalyticsManager { private WorkspacePurges workspacePurges; + private Clusters clusters; + + private Operations operations; + private Tables tables; + private Workspaces workspaces; + + private DeletedWorkspaces deletedWorkspaces; + private final OperationalInsightsManagementClient clientObject; private LogAnalyticsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -228,17 +228,31 @@ public LogAnalyticsManager authenticate(TokenCredential credential, AzureProfile Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.loganalytics") + .append("/") + .append("1.0.0-beta.2"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } List policies = new ArrayList<>(); - policies - .add( - new UserAgentPolicy( - null, - "com.azure.resourcemanager.loganalytics", - "1.0.0-beta.1", - Configuration.getGlobalConfiguration())); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); @@ -306,14 +320,6 @@ public ManagementGroups managementGroups() { return managementGroups; } - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** @return Resource collection API of OperationStatuses. */ public OperationStatuses operationStatuses() { if (this.operationStatuses == null) { @@ -338,30 +344,6 @@ public Usages usages() { return usages; } - /** @return Resource collection API of Workspaces. */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - - /** @return Resource collection API of DeletedWorkspaces. */ - public DeletedWorkspaces deletedWorkspaces() { - if (this.deletedWorkspaces == null) { - this.deletedWorkspaces = new DeletedWorkspacesImpl(clientObject.getDeletedWorkspaces(), this); - } - return deletedWorkspaces; - } - - /** @return Resource collection API of Clusters. */ - public Clusters clusters() { - if (this.clusters == null) { - this.clusters = new ClustersImpl(clientObject.getClusters(), this); - } - return clusters; - } - /** @return Resource collection API of StorageInsightConfigs. */ public StorageInsightConfigs storageInsightConfigs() { if (this.storageInsightConfigs == null) { @@ -410,6 +392,22 @@ public WorkspacePurges workspacePurges() { return workspacePurges; } + /** @return Resource collection API of Clusters. */ + public Clusters clusters() { + if (this.clusters == null) { + this.clusters = new ClustersImpl(clientObject.getClusters(), this); + } + return clusters; + } + + /** @return Resource collection API of Operations. */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** @return Resource collection API of Tables. */ public Tables tables() { if (this.tables == null) { @@ -418,6 +416,22 @@ public Tables tables() { return tables; } + /** @return Resource collection API of Workspaces. */ + public Workspaces workspaces() { + if (this.workspaces == null) { + this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); + } + return workspaces; + } + + /** @return Resource collection API of DeletedWorkspaces. */ + public DeletedWorkspaces deletedWorkspaces() { + if (this.deletedWorkspaces == null) { + this.deletedWorkspaces = new DeletedWorkspacesImpl(clientObject.getDeletedWorkspaces(), this); + } + return deletedWorkspaces; + } + /** * @return Wrapped service client OperationalInsightsManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java index ecb9e1ead6dc4..71135a50cfd7d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java @@ -23,13 +23,6 @@ public interface OperationalInsightsManagementClient { */ String getEndpoint(); - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - /** * Gets The HTTP pipeline to send requests through. * @@ -86,13 +79,6 @@ public interface OperationalInsightsManagementClient { */ ManagementGroupsClient getManagementGroups(); - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the OperationStatusesClient object to access its operations. * @@ -114,27 +100,6 @@ public interface OperationalInsightsManagementClient { */ UsagesClient getUsages(); - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - - /** - * Gets the DeletedWorkspacesClient object to access its operations. - * - * @return the DeletedWorkspacesClient object. - */ - DeletedWorkspacesClient getDeletedWorkspaces(); - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - ClustersClient getClusters(); - /** * Gets the StorageInsightConfigsClient object to access its operations. * @@ -177,10 +142,38 @@ public interface OperationalInsightsManagementClient { */ WorkspacePurgesClient getWorkspacePurges(); + /** + * Gets the ClustersClient object to access its operations. + * + * @return the ClustersClient object. + */ + ClustersClient getClusters(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the TablesClient object to access its operations. * * @return the TablesClient object. */ TablesClient getTables(); + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + WorkspacesClient getWorkspaces(); + + /** + * Gets the DeletedWorkspacesClient object to access its operations. + * + * @return the DeletedWorkspacesClient object. + */ + DeletedWorkspacesClient getDeletedWorkspaces(); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacePurgesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacePurgesClient.java index bda23fb4fe2ac..38e33b4d26481 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacePurgesClient.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacePurgesClient.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeResponseInner; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeStatusResponseInner; import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeBody; +import com.azure.resourcemanager.loganalytics.models.WorkspacePurgesPurgeResponse; /** An instance of this class provides access to all the operations defined in WorkspacePurgesClient. */ public interface WorkspacePurgesClient { @@ -51,7 +52,7 @@ public interface WorkspacePurgesClient { * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response purgeWithResponse( + WorkspacePurgesPurgeResponse purgeWithResponse( String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context); /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java index d5bc163290d33..ee49aaf477b74 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java @@ -8,12 +8,16 @@ import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.loganalytics.models.AssociatedWorkspace; +import com.azure.resourcemanager.loganalytics.models.BillingType; +import com.azure.resourcemanager.loganalytics.models.CapacityReservationProperties; import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus; import com.azure.resourcemanager.loganalytics.models.ClusterSku; import com.azure.resourcemanager.loganalytics.models.Identity; import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; /** The top level Log Analytics cluster resource container. */ @@ -34,12 +38,6 @@ public class ClusterInner extends Resource { @JsonProperty(value = "sku") private ClusterSku sku; - /* - * The link used to get the next page of recommendations. - */ - @JsonProperty(value = "properties.nextLink") - private String nextLink; - /* * The ID associated with the cluster. */ @@ -52,12 +50,60 @@ public class ClusterInner extends Resource { @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ClusterEntityStatus provisioningState; + /* + * Configures whether cluster will use double encryption. This Property can + * not be modified after cluster creation. Default value is 'true' + */ + @JsonProperty(value = "properties.isDoubleEncryptionEnabled") + private Boolean isDoubleEncryptionEnabled; + + /* + * Sets whether the cluster will support availability zones. This can be + * set as true only in regions where Azure Data Explorer support + * Availability Zones. This Property can not be modified after cluster + * creation. Default value is 'true' if region supports Availability Zones. + */ + @JsonProperty(value = "properties.isAvailabilityZonesEnabled") + private Boolean isAvailabilityZonesEnabled; + + /* + * Configures whether billing will be only on the cluster or each workspace + * will be billed by its proportional use. This does not change the overall + * billing, only how it will be distributed. Default value is 'Cluster' + */ + @JsonProperty(value = "properties.billingType") + private BillingType billingType; + /* * The associated key properties. */ @JsonProperty(value = "properties.keyVaultProperties") private KeyVaultProperties keyVaultProperties; + /* + * The last time the cluster was updated. + */ + @JsonProperty(value = "properties.lastModifiedDate", access = JsonProperty.Access.WRITE_ONLY) + private String lastModifiedDate; + + /* + * The cluster creation time + */ + @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) + private String createdDate; + + /* + * The list of Log Analytics workspaces associated with the cluster + */ + @JsonProperty(value = "properties.associatedWorkspaces") + private List associatedWorkspaces; + + /* + * Additional properties for capacity reservation + */ + @JsonProperty(value = "properties.capacityReservationProperties") + private CapacityReservationProperties capacityReservationProperties; + /** * Get the identity property: The identity of the resource. * @@ -99,41 +145,91 @@ public ClusterInner withSku(ClusterSku sku) { } /** - * Get the nextLink property: The link used to get the next page of recommendations. + * Get the clusterId property: The ID associated with the cluster. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the provisioningState property: The provisioning state of the cluster. * - * @return the nextLink value. + * @return the provisioningState value. */ - public String nextLink() { - return this.nextLink; + public ClusterEntityStatus provisioningState() { + return this.provisioningState; } /** - * Set the nextLink property: The link used to get the next page of recommendations. + * Get the isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. This Property + * can not be modified after cluster creation. Default value is 'true'. * - * @param nextLink the nextLink value to set. + * @return the isDoubleEncryptionEnabled value. + */ + public Boolean isDoubleEncryptionEnabled() { + return this.isDoubleEncryptionEnabled; + } + + /** + * Set the isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. This Property + * can not be modified after cluster creation. Default value is 'true'. + * + * @param isDoubleEncryptionEnabled the isDoubleEncryptionEnabled value to set. * @return the ClusterInner object itself. */ - public ClusterInner withNextLink(String nextLink) { - this.nextLink = nextLink; + public ClusterInner withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled) { + this.isDoubleEncryptionEnabled = isDoubleEncryptionEnabled; return this; } /** - * Get the clusterId property: The ID associated with the cluster. + * Get the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability zones. This can + * be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be + * modified after cluster creation. Default value is 'true' if region supports Availability Zones. * - * @return the clusterId value. + * @return the isAvailabilityZonesEnabled value. */ - public String clusterId() { - return this.clusterId; + public Boolean isAvailabilityZonesEnabled() { + return this.isAvailabilityZonesEnabled; } /** - * Get the provisioningState property: The provisioning state of the cluster. + * Set the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability zones. This can + * be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be + * modified after cluster creation. Default value is 'true' if region supports Availability Zones. * - * @return the provisioningState value. + * @param isAvailabilityZonesEnabled the isAvailabilityZonesEnabled value to set. + * @return the ClusterInner object itself. */ - public ClusterEntityStatus provisioningState() { - return this.provisioningState; + public ClusterInner withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled) { + this.isAvailabilityZonesEnabled = isAvailabilityZonesEnabled; + return this; + } + + /** + * Get the billingType property: Configures whether billing will be only on the cluster or each workspace will be + * billed by its proportional use. This does not change the overall billing, only how it will be distributed. + * Default value is 'Cluster'. + * + * @return the billingType value. + */ + public BillingType billingType() { + return this.billingType; + } + + /** + * Set the billingType property: Configures whether billing will be only on the cluster or each workspace will be + * billed by its proportional use. This does not change the overall billing, only how it will be distributed. + * Default value is 'Cluster'. + * + * @param billingType the billingType value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withBillingType(BillingType billingType) { + this.billingType = billingType; + return this; } /** @@ -156,6 +252,64 @@ public ClusterInner withKeyVaultProperties(KeyVaultProperties keyVaultProperties return this; } + /** + * Get the lastModifiedDate property: The last time the cluster was updated. + * + * @return the lastModifiedDate value. + */ + public String lastModifiedDate() { + return this.lastModifiedDate; + } + + /** + * Get the createdDate property: The cluster creation time. + * + * @return the createdDate value. + */ + public String createdDate() { + return this.createdDate; + } + + /** + * Get the associatedWorkspaces property: The list of Log Analytics workspaces associated with the cluster. + * + * @return the associatedWorkspaces value. + */ + public List associatedWorkspaces() { + return this.associatedWorkspaces; + } + + /** + * Set the associatedWorkspaces property: The list of Log Analytics workspaces associated with the cluster. + * + * @param associatedWorkspaces the associatedWorkspaces value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withAssociatedWorkspaces(List associatedWorkspaces) { + this.associatedWorkspaces = associatedWorkspaces; + return this; + } + + /** + * Get the capacityReservationProperties property: Additional properties for capacity reservation. + * + * @return the capacityReservationProperties value. + */ + public CapacityReservationProperties capacityReservationProperties() { + return this.capacityReservationProperties; + } + + /** + * Set the capacityReservationProperties property: Additional properties for capacity reservation. + * + * @param capacityReservationProperties the capacityReservationProperties value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties) { + this.capacityReservationProperties = capacityReservationProperties; + return this; + } + /** {@inheritDoc} */ @Override public ClusterInner withLocation(String location) { @@ -185,5 +339,11 @@ public void validate() { if (keyVaultProperties() != null) { keyVaultProperties().validate(); } + if (associatedWorkspaces() != null) { + associatedWorkspaces().forEach(e -> e.validate()); + } + if (capacityReservationProperties() != null) { + capacityReservationProperties().validate(); + } } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java index 97f0a3960707e..cb29d54b9458c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java @@ -18,15 +18,34 @@ public class TableInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(TableInner.class); /* - * The data table data retention in days, between 30 and 730. Setting this + * The data table data retention in days, between 7 and 730. Setting this * property to null will default to the workspace retention. */ @JsonProperty(value = "properties.retentionInDays") private Integer retentionInDays; + /* + * Specifies if IsTroubleshootingEnabled property can be set for this + * table. + */ + @JsonProperty(value = "properties.isTroubleshootingAllowed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isTroubleshootingAllowed; + + /* + * Enable or disable troubleshoot for this table. + */ + @JsonProperty(value = "properties.isTroubleshootEnabled") + private Boolean isTroubleshootEnabled; + + /* + * Last time when troubleshooting was set for this table. + */ + @JsonProperty(value = "properties.lastTroubleshootDate", access = JsonProperty.Access.WRITE_ONLY) + private String lastTroubleshootDate; + /** - * Get the retentionInDays property: The data table data retention in days, between 30 and 730. Setting this - * property to null will default to the workspace retention. + * Get the retentionInDays property: The data table data retention in days, between 7 and 730. Setting this property + * to null will default to the workspace retention. * * @return the retentionInDays value. */ @@ -35,8 +54,8 @@ public Integer retentionInDays() { } /** - * Set the retentionInDays property: The data table data retention in days, between 30 and 730. Setting this - * property to null will default to the workspace retention. + * Set the retentionInDays property: The data table data retention in days, between 7 and 730. Setting this property + * to null will default to the workspace retention. * * @param retentionInDays the retentionInDays value to set. * @return the TableInner object itself. @@ -46,6 +65,45 @@ public TableInner withRetentionInDays(Integer retentionInDays) { return this; } + /** + * Get the isTroubleshootingAllowed property: Specifies if IsTroubleshootingEnabled property can be set for this + * table. + * + * @return the isTroubleshootingAllowed value. + */ + public Boolean isTroubleshootingAllowed() { + return this.isTroubleshootingAllowed; + } + + /** + * Get the isTroubleshootEnabled property: Enable or disable troubleshoot for this table. + * + * @return the isTroubleshootEnabled value. + */ + public Boolean isTroubleshootEnabled() { + return this.isTroubleshootEnabled; + } + + /** + * Set the isTroubleshootEnabled property: Enable or disable troubleshoot for this table. + * + * @param isTroubleshootEnabled the isTroubleshootEnabled value to set. + * @return the TableInner object itself. + */ + public TableInner withIsTroubleshootEnabled(Boolean isTroubleshootEnabled) { + this.isTroubleshootEnabled = isTroubleshootEnabled; + return this; + } + + /** + * Get the lastTroubleshootDate property: Last time when troubleshooting was set for this table. + * + * @return the lastTroubleshootDate value. + */ + public String lastTroubleshootDate() { + return this.lastTroubleshootDate; + } + /** * Validates the instance. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java index 42a2262853f1e..ff5401ba2e353 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java @@ -50,7 +50,8 @@ public class WorkspaceInner extends Resource { private WorkspaceSku sku; /* - * The workspace data retention in days, between 30 and 730. + * The workspace data retention in days. Allowed values are per pricing + * plan. See pricing tiers documentation for details. */ @JsonProperty(value = "properties.retentionInDays") private Integer retentionInDays; @@ -61,6 +62,18 @@ public class WorkspaceInner extends Resource { @JsonProperty(value = "properties.workspaceCapping") private WorkspaceCapping workspaceCapping; + /* + * Workspace creation date. + */ + @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) + private String createdDate; + + /* + * Workspace modification date. + */ + @JsonProperty(value = "properties.modifiedDate", access = JsonProperty.Access.WRITE_ONLY) + private String modifiedDate; + /* * The network access type for accessing Log Analytics ingestion. */ @@ -73,12 +86,25 @@ public class WorkspaceInner extends Resource { @JsonProperty(value = "properties.publicNetworkAccessForQuery") private PublicNetworkAccessType publicNetworkAccessForQuery; + /* + * Indicates whether customer managed storage is mandatory for query + * management. + */ + @JsonProperty(value = "properties.forceCmkForQuery") + private Boolean forceCmkForQuery; + /* * List of linked private link scope resources. */ @JsonProperty(value = "properties.privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY) private List privateLinkScopedResources; + /* + * Workspace features. + */ + @JsonProperty(value = "properties.features") + private Map features; + /** * Get the etag property: The ETag of the workspace. * @@ -149,7 +175,8 @@ public WorkspaceInner withSku(WorkspaceSku sku) { } /** - * Get the retentionInDays property: The workspace data retention in days, between 30 and 730. + * Get the retentionInDays property: The workspace data retention in days. Allowed values are per pricing plan. See + * pricing tiers documentation for details. * * @return the retentionInDays value. */ @@ -158,7 +185,8 @@ public Integer retentionInDays() { } /** - * Set the retentionInDays property: The workspace data retention in days, between 30 and 730. + * Set the retentionInDays property: The workspace data retention in days. Allowed values are per pricing plan. See + * pricing tiers documentation for details. * * @param retentionInDays the retentionInDays value to set. * @return the WorkspaceInner object itself. @@ -188,6 +216,24 @@ public WorkspaceInner withWorkspaceCapping(WorkspaceCapping workspaceCapping) { return this; } + /** + * Get the createdDate property: Workspace creation date. + * + * @return the createdDate value. + */ + public String createdDate() { + return this.createdDate; + } + + /** + * Get the modifiedDate property: Workspace modification date. + * + * @return the modifiedDate value. + */ + public String modifiedDate() { + return this.modifiedDate; + } + /** * Get the publicNetworkAccessForIngestion property: The network access type for accessing Log Analytics ingestion. * @@ -228,6 +274,26 @@ public WorkspaceInner withPublicNetworkAccessForQuery(PublicNetworkAccessType pu return this; } + /** + * Get the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for query management. + * + * @return the forceCmkForQuery value. + */ + public Boolean forceCmkForQuery() { + return this.forceCmkForQuery; + } + + /** + * Set the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for query management. + * + * @param forceCmkForQuery the forceCmkForQuery value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withForceCmkForQuery(Boolean forceCmkForQuery) { + this.forceCmkForQuery = forceCmkForQuery; + return this; + } + /** * Get the privateLinkScopedResources property: List of linked private link scope resources. * @@ -237,6 +303,26 @@ public List privateLinkScopedResources() { return this.privateLinkScopedResources; } + /** + * Get the features property: Workspace features. + * + * @return the features value. + */ + public Map features() { + return this.features; + } + + /** + * Set the features property: Workspace features. + * + * @param features the features value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withFeatures(Map features) { + this.features = features; + return this; + } + /** {@inheritDoc} */ @Override public WorkspaceInner withLocation(String location) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTierImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTierImpl.java index 53da8cb15afd6..449ce8ad77111 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTierImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTierImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.AvailableServiceTierInner; import com.azure.resourcemanager.loganalytics.models.AvailableServiceTier; import com.azure.resourcemanager.loganalytics.models.SkuNameEnum; @@ -12,9 +11,11 @@ public final class AvailableServiceTierImpl implements AvailableServiceTier { private AvailableServiceTierInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - AvailableServiceTierImpl(AvailableServiceTierInner innerObject, LogAnalyticsManager serviceManager) { + AvailableServiceTierImpl( + AvailableServiceTierInner innerObject, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -51,7 +52,7 @@ public AvailableServiceTierInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java index 6351619ef4202..97f1450b4c0ff 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java @@ -104,6 +104,7 @@ private Mono>> listByWorkspaceWithRespo if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -114,10 +115,10 @@ private Mono>> listByWorkspaceWithRespo this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -153,6 +154,7 @@ private Mono>> listByWorkspaceWithRespo if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -161,7 +163,7 @@ private Mono>> listByWorkspaceWithRespo this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java index d0285aa052079..6366cf421e15a 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.AvailableServiceTiersClient; import com.azure.resourcemanager.loganalytics.fluent.models.AvailableServiceTierInner; import com.azure.resourcemanager.loganalytics.models.AvailableServiceTier; @@ -23,9 +22,11 @@ public final class AvailableServiceTiersImpl implements AvailableServiceTiers { private final AvailableServiceTiersClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public AvailableServiceTiersImpl(AvailableServiceTiersClient innerClient, LogAnalyticsManager serviceManager) { + public AvailableServiceTiersImpl( + AvailableServiceTiersClient innerClient, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -67,7 +68,7 @@ private AvailableServiceTiersClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java index 3cdde5a1e8503..6f369ef3b25b7 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java @@ -6,8 +6,10 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner; +import com.azure.resourcemanager.loganalytics.models.AssociatedWorkspace; +import com.azure.resourcemanager.loganalytics.models.BillingType; +import com.azure.resourcemanager.loganalytics.models.CapacityReservationProperties; import com.azure.resourcemanager.loganalytics.models.Cluster; import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus; import com.azure.resourcemanager.loganalytics.models.ClusterPatch; @@ -15,12 +17,13 @@ import com.azure.resourcemanager.loganalytics.models.Identity; import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties; import java.util.Collections; +import java.util.List; import java.util.Map; public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update { private ClusterInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -55,10 +58,6 @@ public ClusterSku sku() { return this.innerModel().sku(); } - public String nextLink() { - return this.innerModel().nextLink(); - } - public String clusterId() { return this.innerModel().clusterId(); } @@ -67,10 +66,43 @@ public ClusterEntityStatus provisioningState() { return this.innerModel().provisioningState(); } + public Boolean isDoubleEncryptionEnabled() { + return this.innerModel().isDoubleEncryptionEnabled(); + } + + public Boolean isAvailabilityZonesEnabled() { + return this.innerModel().isAvailabilityZonesEnabled(); + } + + public BillingType billingType() { + return this.innerModel().billingType(); + } + public KeyVaultProperties keyVaultProperties() { return this.innerModel().keyVaultProperties(); } + public String lastModifiedDate() { + return this.innerModel().lastModifiedDate(); + } + + public String createdDate() { + return this.innerModel().createdDate(); + } + + public List associatedWorkspaces() { + List inner = this.innerModel().associatedWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public CapacityReservationProperties capacityReservationProperties() { + return this.innerModel().capacityReservationProperties(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -83,7 +115,7 @@ public ClusterInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -116,7 +148,7 @@ public Cluster create(Context context) { return this; } - ClusterImpl(String name, LogAnalyticsManager serviceManager) { + ClusterImpl(String name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new ClusterInner(); this.serviceManager = serviceManager; this.clusterName = name; @@ -147,7 +179,7 @@ public Cluster apply(Context context) { return this; } - ClusterImpl(ClusterInner innerObject, LogAnalyticsManager serviceManager) { + ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); @@ -195,8 +227,13 @@ public ClusterImpl withTags(Map tags) { } public ClusterImpl withIdentity(Identity identity) { - this.innerModel().withIdentity(identity); - return this; + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } } public ClusterImpl withSku(ClusterSku sku) { @@ -209,8 +246,18 @@ public ClusterImpl withSku(ClusterSku sku) { } } - public ClusterImpl withNextLink(String nextLink) { - this.innerModel().withNextLink(nextLink); + public ClusterImpl withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled) { + this.innerModel().withIsDoubleEncryptionEnabled(isDoubleEncryptionEnabled); + return this; + } + + public ClusterImpl withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled) { + this.innerModel().withIsAvailabilityZonesEnabled(isAvailabilityZonesEnabled); + return this; + } + + public ClusterImpl withBillingType(BillingType billingType) { + this.innerModel().withBillingType(billingType); return this; } @@ -224,6 +271,16 @@ public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties) } } + public ClusterImpl withAssociatedWorkspaces(List associatedWorkspaces) { + this.innerModel().withAssociatedWorkspaces(associatedWorkspaces); + return this; + } + + public ClusterImpl withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties) { + this.innerModel().withCapacityReservationProperties(capacityReservationProperties); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java index 8bed9d94b26dd..689fdc30e5ba3 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java @@ -203,6 +203,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -211,7 +212,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -224,7 +225,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -256,13 +257,14 @@ private Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) @@ -360,17 +362,13 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -380,7 +378,7 @@ private Mono> listSinglePageAsync() { res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -406,15 +404,11 @@ private Mono> listSinglePageAsync(Context context) { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) .map( res -> new PagedResponseBase<>( @@ -517,6 +511,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -525,13 +520,13 @@ private Mono>> createOrUpdateWithResponseAsync( .createOrUpdate( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), clusterName, parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -573,13 +568,14 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), clusterName, parameters, @@ -772,6 +768,7 @@ private Mono>> deleteWithResponseAsync(String resource new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -781,11 +778,11 @@ private Mono>> deleteWithResponseAsync(String resource this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -821,6 +818,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -828,7 +826,7 @@ private Mono>> deleteWithResponseAsync( this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -999,6 +997,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1008,11 +1007,11 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, clusterName, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1048,6 +1047,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1055,7 +1055,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, clusterName, accept, context); @@ -1154,6 +1154,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1163,12 +1164,12 @@ private Mono> updateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1210,6 +1211,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1217,7 +1219,7 @@ private Mono> updateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -1315,7 +1317,7 @@ private Mono> listByResourceGroupNextSinglePageAsync res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1386,7 +1388,7 @@ private Mono> listNextSinglePageAsync(String nextLin res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java index 9bea08f4bf99c..f7c506806ef08 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.ClustersClient; import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner; import com.azure.resourcemanager.loganalytics.models.Cluster; @@ -21,31 +20,32 @@ public final class ClustersImpl implements Clusters { private final ClustersClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public ClustersImpl(ClustersClient innerClient, LogAnalyticsManager serviceManager) { + public ClustersImpl( + ClustersClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public void deleteByResourceGroup(String resourceGroupName, String clusterName) { @@ -160,7 +160,7 @@ private ClustersClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportImpl.java index a78692ffe89f3..81903e6c10e84 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.loganalytics.implementation; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.DataExportInner; import com.azure.resourcemanager.loganalytics.models.DataExport; import com.azure.resourcemanager.loganalytics.models.Type; @@ -15,7 +14,7 @@ public final class DataExportImpl implements DataExport, DataExport.Definition, DataExport.Update { private DataExportInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -70,7 +69,7 @@ public DataExportInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -108,7 +107,7 @@ public DataExport create(Context context) { return this; } - DataExportImpl(String name, LogAnalyticsManager serviceManager) { + DataExportImpl(String name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new DataExportInner(); this.serviceManager = serviceManager; this.dataExportName = name; @@ -140,7 +139,8 @@ public DataExport apply(Context context) { return this; } - DataExportImpl(DataExportInner innerObject, LogAnalyticsManager serviceManager) { + DataExportImpl( + DataExportInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java index e78a66c7e8756..3dc11d7c70b04 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java @@ -159,6 +159,7 @@ private Mono> listByWorkspaceSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -169,14 +170,14 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -212,6 +213,7 @@ private Mono> listByWorkspaceSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -220,7 +222,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -335,6 +337,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -346,11 +349,11 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -400,6 +403,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -409,7 +413,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -519,6 +523,7 @@ private Mono> getWithResponseAsync( if (dataExportName == null) { return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -530,10 +535,10 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -573,6 +578,7 @@ private Mono> getWithResponseAsync( if (dataExportName == null) { return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -582,7 +588,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -681,6 +687,7 @@ private Mono> deleteWithResponseAsync( if (dataExportName == null) { return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -692,10 +699,10 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -735,6 +742,7 @@ private Mono> deleteWithResponseAsync( if (dataExportName == null) { return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -744,7 +752,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, accept, context); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java index 4efe7bdc4ff6f..1d2769218ab32 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.DataExportsClient; import com.azure.resourcemanager.loganalytics.fluent.models.DataExportInner; import com.azure.resourcemanager.loganalytics.models.DataExport; @@ -21,22 +20,23 @@ public final class DataExportsImpl implements DataExports { private final DataExportsClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public DataExportsImpl(DataExportsClient innerClient, LogAnalyticsManager serviceManager) { + public DataExportsImpl( + DataExportsClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return inner.mapPage(inner1 -> new DataExportImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new DataExportImpl(inner1, this.manager())); } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return inner.mapPage(inner1 -> new DataExportImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new DataExportImpl(inner1, this.manager())); } public DataExport get(String resourceGroupName, String workspaceName, String dataExportName) { @@ -180,7 +180,7 @@ private DataExportsClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourceImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourceImpl.java index 1e4a3b644dd25..e2ce4cb17903c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourceImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourceImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.loganalytics.implementation; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.DataSourceInner; import com.azure.resourcemanager.loganalytics.models.DataSource; import com.azure.resourcemanager.loganalytics.models.DataSourceKind; @@ -15,7 +14,7 @@ public final class DataSourceImpl implements DataSource, DataSource.Definition, DataSource.Update { private DataSourceInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -54,7 +53,7 @@ public DataSourceInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -92,7 +91,7 @@ public DataSource create(Context context) { return this; } - DataSourceImpl(String name, LogAnalyticsManager serviceManager) { + DataSourceImpl(String name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new DataSourceInner(); this.serviceManager = serviceManager; this.dataSourceName = name; @@ -124,7 +123,8 @@ public DataSource apply(Context context) { return this; } - DataSourceImpl(DataSourceInner innerObject, LogAnalyticsManager serviceManager) { + DataSourceImpl( + DataSourceInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java index 6a285ef1c4f80..01c0087da0549 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java @@ -180,6 +180,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -190,12 +191,12 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -245,6 +246,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -253,7 +255,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -364,6 +366,7 @@ private Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; return FluxUtil .withContext( context -> @@ -373,10 +376,10 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -416,6 +419,7 @@ private Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; context = this.client.mergeContext(context); return service .delete( @@ -423,7 +427,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context); } @@ -514,6 +518,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -524,11 +529,11 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -568,6 +573,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -576,7 +582,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -677,6 +683,7 @@ private Mono> listByWorkspaceSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -688,7 +695,7 @@ private Mono> listByWorkspaceSinglePageAsync( workspaceName, filter, skiptoken, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -701,7 +708,7 @@ private Mono> listByWorkspaceSinglePageAsync( res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -742,6 +749,7 @@ private Mono> listByWorkspaceSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -751,7 +759,7 @@ private Mono> listByWorkspaceSinglePageAsync( workspaceName, filter, skiptoken, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) @@ -896,7 +904,7 @@ private Mono> listByWorkspaceNextSinglePageAsync( res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java index 56de2cdb12ece..0844fbc2c76fa 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.DataSourcesClient; import com.azure.resourcemanager.loganalytics.fluent.models.DataSourceInner; import com.azure.resourcemanager.loganalytics.models.DataSource; @@ -21,9 +20,10 @@ public final class DataSourcesImpl implements DataSources { private final DataSourcesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public DataSourcesImpl(DataSourcesClient innerClient, LogAnalyticsManager serviceManager) { + public DataSourcesImpl( + DataSourcesClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -64,14 +64,14 @@ public Response getWithResponse( public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String filter) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, filter); - return inner.mapPage(inner1 -> new DataSourceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new DataSourceImpl(inner1, this.manager())); } public PagedIterable listByWorkspace( String resourceGroupName, String workspaceName, String filter, String skiptoken, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, filter, skiptoken, context); - return inner.mapPage(inner1 -> new DataSourceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new DataSourceImpl(inner1, this.manager())); } public DataSource getById(String id) { @@ -182,7 +182,7 @@ private DataSourcesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java index ef179d8630c1d..cf9e5e5d49ec3 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java @@ -106,22 +106,18 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) .>map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -147,15 +143,11 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) .map( res -> new PagedResponseBase<>( @@ -241,6 +233,7 @@ private Mono> listByResourceGroupSinglePageAsync(S new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -249,7 +242,7 @@ private Mono> listByResourceGroupSinglePageAsync(S .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -257,7 +250,7 @@ private Mono> listByResourceGroupSinglePageAsync(S res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -289,13 +282,14 @@ private Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesImpl.java index f0299701d0097..5621841863e11 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesImpl.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.DeletedWorkspacesClient; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspaceInner; import com.azure.resourcemanager.loganalytics.models.DeletedWorkspaces; @@ -19,38 +18,40 @@ public final class DeletedWorkspacesImpl implements DeletedWorkspaces { private final DeletedWorkspacesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public DeletedWorkspacesImpl(DeletedWorkspacesClient innerClient, LogAnalyticsManager serviceManager) { + public DeletedWorkspacesImpl( + DeletedWorkspacesClient innerClient, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } private DeletedWorkspacesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java index 4c7018a55e718..07b595f539ce7 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java @@ -103,6 +103,7 @@ private Mono> deleteWithResponseAsync( if (gatewayId == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; return FluxUtil .withContext( context -> @@ -113,9 +114,9 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, gatewayId, - this.client.getApiVersion(), + apiVersion, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -155,6 +156,7 @@ private Mono> deleteWithResponseAsync( if (gatewayId == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; context = this.client.mergeContext(context); return service .delete( @@ -163,7 +165,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, gatewayId, - this.client.getApiVersion(), + apiVersion, context); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java index 21229a1b9487a..aff9b3e9ba839 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.GatewaysClient; import com.azure.resourcemanager.loganalytics.models.Gateways; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -17,9 +16,10 @@ public final class GatewaysImpl implements Gateways { private final GatewaysClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public GatewaysImpl(GatewaysClient innerClient, LogAnalyticsManager serviceManager) { + public GatewaysImpl( + GatewaysClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -37,7 +37,7 @@ private GatewaysClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePackImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePackImpl.java index dbed4fc0b68d9..ff96dc6d66721 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePackImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePackImpl.java @@ -4,16 +4,16 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.IntelligencePackInner; import com.azure.resourcemanager.loganalytics.models.IntelligencePack; public final class IntelligencePackImpl implements IntelligencePack { private IntelligencePackInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - IntelligencePackImpl(IntelligencePackInner innerObject, LogAnalyticsManager serviceManager) { + IntelligencePackImpl( + IntelligencePackInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -34,7 +34,7 @@ public IntelligencePackInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java index 56919c745037a..dadc1e331c087 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java @@ -139,6 +139,7 @@ private Mono> disableWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; return FluxUtil .withContext( context -> @@ -148,10 +149,10 @@ private Mono> disableWithResponseAsync( resourceGroupName, workspaceName, intelligencePackName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -192,6 +193,7 @@ private Mono> disableWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; context = this.client.mergeContext(context); return service .disable( @@ -199,7 +201,7 @@ private Mono> disableWithResponseAsync( resourceGroupName, workspaceName, intelligencePackName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context); } @@ -291,6 +293,7 @@ private Mono> enableWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; return FluxUtil .withContext( context -> @@ -300,10 +303,10 @@ private Mono> enableWithResponseAsync( resourceGroupName, workspaceName, intelligencePackName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -344,6 +347,7 @@ private Mono> enableWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; context = this.client.mergeContext(context); return service .enable( @@ -351,7 +355,7 @@ private Mono> enableWithResponseAsync( resourceGroupName, workspaceName, intelligencePackName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context); } @@ -438,6 +442,7 @@ private Mono>> listWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -447,11 +452,11 @@ private Mono>> listWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -487,6 +492,7 @@ private Mono>> listWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -494,7 +500,7 @@ private Mono>> listWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java index d32adabe8192c..2baa8f233e574 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.IntelligencePacksClient; import com.azure.resourcemanager.loganalytics.fluent.models.IntelligencePackInner; import com.azure.resourcemanager.loganalytics.models.IntelligencePack; @@ -23,9 +22,11 @@ public final class IntelligencePacksImpl implements IntelligencePacks { private final IntelligencePacksClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public IntelligencePacksImpl(IntelligencePacksClient innerClient, LogAnalyticsManager serviceManager) { + public IntelligencePacksImpl( + IntelligencePacksClient innerClient, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -87,7 +88,7 @@ private IntelligencePacksClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServiceImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServiceImpl.java index 7e7860a876b18..2682954cb9aec 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServiceImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServiceImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.loganalytics.implementation; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.LinkedServiceInner; import com.azure.resourcemanager.loganalytics.models.LinkedService; import com.azure.resourcemanager.loganalytics.models.LinkedServiceEntityStatus; @@ -15,7 +14,7 @@ public final class LinkedServiceImpl implements LinkedService, LinkedService.Definition, LinkedService.Update { private LinkedServiceInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -54,7 +53,7 @@ public LinkedServiceInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -88,7 +87,7 @@ public LinkedService create(Context context) { return this; } - LinkedServiceImpl(String name, LogAnalyticsManager serviceManager) { + LinkedServiceImpl(String name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new LinkedServiceInner(); this.serviceManager = serviceManager; this.linkedServiceName = name; @@ -116,7 +115,8 @@ public LinkedService apply(Context context) { return this; } - LinkedServiceImpl(LinkedServiceInner innerObject, LogAnalyticsManager serviceManager) { + LinkedServiceImpl( + LinkedServiceInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java index edbb020a3acea..60a3237c541e5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java @@ -175,6 +175,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -186,11 +187,11 @@ private Mono>> createOrUpdateWithResponseAsync( workspaceName, linkedServiceName, this.client.getSubscriptionId(), - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -241,6 +242,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -250,7 +252,7 @@ private Mono>> createOrUpdateWithResponseAsync( workspaceName, linkedServiceName, this.client.getSubscriptionId(), - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -474,6 +476,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -484,11 +487,11 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, workspaceName, linkedServiceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -529,6 +532,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -537,7 +541,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, workspaceName, linkedServiceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -734,6 +738,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -744,11 +749,11 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, linkedServiceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -789,6 +794,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -797,7 +803,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, linkedServiceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -894,6 +900,7 @@ private Mono> listByWorkspaceSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -903,7 +910,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -911,7 +918,7 @@ private Mono> listByWorkspaceSinglePageAsync( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -947,6 +954,7 @@ private Mono> listByWorkspaceSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -954,7 +962,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java index cbed250a49511..869b4d26c64de 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.LinkedServicesClient; import com.azure.resourcemanager.loganalytics.fluent.models.LinkedServiceInner; import com.azure.resourcemanager.loganalytics.models.LinkedService; @@ -21,9 +20,10 @@ public final class LinkedServicesImpl implements LinkedServices { private final LinkedServicesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public LinkedServicesImpl(LinkedServicesClient innerClient, LogAnalyticsManager serviceManager) { + public LinkedServicesImpl( + LinkedServicesClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -75,14 +75,14 @@ public Response getWithResponse( public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return inner.mapPage(inner1 -> new LinkedServiceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new LinkedServiceImpl(inner1, this.manager())); } public PagedIterable listByWorkspace( String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return inner.mapPage(inner1 -> new LinkedServiceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new LinkedServiceImpl(inner1, this.manager())); } public LinkedService getById(String id) { @@ -197,7 +197,7 @@ private LinkedServicesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java index bdc8ebbc0b77e..014ddbf87d854 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java @@ -174,6 +174,7 @@ private Mono> createOrUpdateWithRes } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -185,11 +186,11 @@ private Mono> createOrUpdateWithRes workspaceName, dataSourceType, this.client.getSubscriptionId(), - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -240,6 +241,7 @@ private Mono> createOrUpdateWithRes } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -249,7 +251,7 @@ private Mono> createOrUpdateWithRes workspaceName, dataSourceType, this.client.getSubscriptionId(), - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -368,6 +370,7 @@ private Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; return FluxUtil .withContext( context -> @@ -377,10 +380,10 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataSourceType, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -420,6 +423,7 @@ private Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; context = this.client.mergeContext(context); return service .delete( @@ -427,7 +431,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataSourceType, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context); } @@ -518,6 +522,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -528,11 +533,11 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataSourceType, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -572,6 +577,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -580,7 +586,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataSourceType, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -680,6 +686,7 @@ private Mono> listByWorkspaceS if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -689,7 +696,7 @@ private Mono> listByWorkspaceS this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, workspaceName, accept, context)) @@ -697,7 +704,7 @@ private Mono> listByWorkspaceS res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -735,6 +742,7 @@ private Mono> listByWorkspaceS if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -742,7 +750,7 @@ private Mono> listByWorkspaceS this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, workspaceName, accept, context) diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java index d21ac9a8e6ac9..1b4b999a6846c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.LinkedStorageAccountsClient; import com.azure.resourcemanager.loganalytics.fluent.models.LinkedStorageAccountsResourceInner; import com.azure.resourcemanager.loganalytics.models.DataSourceType; @@ -22,9 +21,11 @@ public final class LinkedStorageAccountsImpl implements LinkedStorageAccounts { private final LinkedStorageAccountsClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public LinkedStorageAccountsImpl(LinkedStorageAccountsClient innerClient, LogAnalyticsManager serviceManager) { + public LinkedStorageAccountsImpl( + LinkedStorageAccountsClient innerClient, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -68,14 +69,14 @@ public PagedIterable listByWorkspace( String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return inner.mapPage(inner1 -> new LinkedStorageAccountsResourceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new LinkedStorageAccountsResourceImpl(inner1, this.manager())); } public PagedIterable listByWorkspace( String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return inner.mapPage(inner1 -> new LinkedStorageAccountsResourceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new LinkedStorageAccountsResourceImpl(inner1, this.manager())); } public LinkedStorageAccountsResource getById(String id) { @@ -202,7 +203,7 @@ private LinkedStorageAccountsClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsResourceImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsResourceImpl.java index 91494b2ca188b..ca5365b8b0818 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsResourceImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsResourceImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.loganalytics.implementation; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.LinkedStorageAccountsResourceInner; import com.azure.resourcemanager.loganalytics.models.DataSourceType; import com.azure.resourcemanager.loganalytics.models.LinkedStorageAccountsResource; @@ -18,7 +17,7 @@ public final class LinkedStorageAccountsResourceImpl LinkedStorageAccountsResource.Update { private LinkedStorageAccountsResourceInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -49,7 +48,7 @@ public LinkedStorageAccountsResourceInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -87,7 +86,8 @@ public LinkedStorageAccountsResource create(Context context) { return this; } - LinkedStorageAccountsResourceImpl(DataSourceType name, LogAnalyticsManager serviceManager) { + LinkedStorageAccountsResourceImpl( + DataSourceType name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new LinkedStorageAccountsResourceInner(); this.serviceManager = serviceManager; this.dataSourceType = name; @@ -120,7 +120,8 @@ public LinkedStorageAccountsResource apply(Context context) { } LinkedStorageAccountsResourceImpl( - LinkedStorageAccountsResourceInner innerObject, LogAnalyticsManager serviceManager) { + LinkedStorageAccountsResourceInner innerObject, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupImpl.java index 741be233b9cd8..eb44822f1cb28 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.ManagementGroupInner; import com.azure.resourcemanager.loganalytics.models.ManagementGroup; import java.time.OffsetDateTime; @@ -12,9 +11,10 @@ public final class ManagementGroupImpl implements ManagementGroup { private ManagementGroupInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - ManagementGroupImpl(ManagementGroupInner innerObject, LogAnalyticsManager serviceManager) { + ManagementGroupImpl( + ManagementGroupInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -55,7 +55,7 @@ public ManagementGroupInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java index af667506ff337..b162bd3a82dfd 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java @@ -107,6 +107,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -116,7 +117,7 @@ private Mono> listSinglePageAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -124,7 +125,7 @@ private Mono> listSinglePageAsync( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -160,6 +161,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -167,7 +169,7 @@ private Mono> listSinglePageAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsImpl.java index 4fabe3f24812b..2e189c97e8452 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsImpl.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.ManagementGroupsClient; import com.azure.resourcemanager.loganalytics.fluent.models.ManagementGroupInner; import com.azure.resourcemanager.loganalytics.models.ManagementGroup; @@ -19,29 +18,30 @@ public final class ManagementGroupsImpl implements ManagementGroups { private final ManagementGroupsClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public ManagementGroupsImpl(ManagementGroupsClient innerClient, LogAnalyticsManager serviceManager) { + public ManagementGroupsImpl( + ManagementGroupsClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return inner.mapPage(inner1 -> new ManagementGroupImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ManagementGroupImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return inner.mapPage(inner1 -> new ManagementGroupImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new ManagementGroupImpl(inner1, this.manager())); } private ManagementGroupsClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationImpl.java index ed85a761b2657..3f60cd5380e65 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.OperationInner; import com.azure.resourcemanager.loganalytics.models.Operation; import com.azure.resourcemanager.loganalytics.models.OperationDisplay; @@ -12,9 +11,10 @@ public final class OperationImpl implements Operation { private OperationInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - OperationImpl(OperationInner innerObject, LogAnalyticsManager serviceManager) { + OperationImpl( + OperationInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -31,7 +31,7 @@ public OperationInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusImpl.java index 5e2ac1f448f0c..0aae266da59d4 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusImpl.java @@ -5,16 +5,16 @@ package com.azure.resourcemanager.loganalytics.implementation; import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.OperationStatusInner; import com.azure.resourcemanager.loganalytics.models.OperationStatus; public final class OperationStatusImpl implements OperationStatus { private OperationStatusInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - OperationStatusImpl(OperationStatusInner innerObject, LogAnalyticsManager serviceManager) { + OperationStatusImpl( + OperationStatusInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -47,7 +47,7 @@ public OperationStatusInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java index da9dfd6fdfcd2..0c5d1965495ca 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java @@ -101,6 +101,7 @@ private Mono> getWithResponseAsync(String locatio new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -110,11 +111,11 @@ private Mono> getWithResponseAsync(String locatio this.client.getEndpoint(), location, asyncOperationId, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -150,6 +151,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -157,7 +159,7 @@ private Mono> getWithResponseAsync( this.client.getEndpoint(), location, asyncOperationId, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java index e9756290389b5..562ebf08fe6d5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.OperationStatusesClient; import com.azure.resourcemanager.loganalytics.fluent.models.OperationStatusInner; import com.azure.resourcemanager.loganalytics.models.OperationStatus; @@ -20,9 +19,11 @@ public final class OperationStatusesImpl implements OperationStatuses { private final OperationStatusesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public OperationStatusesImpl(OperationStatusesClient innerClient, LogAnalyticsManager serviceManager) { + public OperationStatusesImpl( + OperationStatusesClient innerClient, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -54,7 +55,7 @@ private OperationStatusesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientImpl.java index 14499fa6cd88d..deeb9d762ba44 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientImpl.java @@ -81,18 +81,6 @@ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - /** The HTTP pipeline to send requests through. */ private final HttpPipeline httpPipeline; @@ -201,18 +189,6 @@ public ManagementGroupsClient getManagementGroups() { return this.managementGroups; } - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - /** The OperationStatusesClient object to access its operations. */ private final OperationStatusesClient operationStatuses; @@ -249,42 +225,6 @@ public UsagesClient getUsages() { return this.usages; } - /** The WorkspacesClient object to access its operations. */ - private final WorkspacesClient workspaces; - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - - /** The DeletedWorkspacesClient object to access its operations. */ - private final DeletedWorkspacesClient deletedWorkspaces; - - /** - * Gets the DeletedWorkspacesClient object to access its operations. - * - * @return the DeletedWorkspacesClient object. - */ - public DeletedWorkspacesClient getDeletedWorkspaces() { - return this.deletedWorkspaces; - } - - /** The ClustersClient object to access its operations. */ - private final ClustersClient clusters; - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - public ClustersClient getClusters() { - return this.clusters; - } - /** The StorageInsightConfigsClient object to access its operations. */ private final StorageInsightConfigsClient storageInsightConfigs; @@ -357,6 +297,30 @@ public WorkspacePurgesClient getWorkspacePurges() { return this.workspacePurges; } + /** The ClustersClient object to access its operations. */ + private final ClustersClient clusters; + + /** + * Gets the ClustersClient object to access its operations. + * + * @return the ClustersClient object. + */ + public ClustersClient getClusters() { + return this.clusters; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** The TablesClient object to access its operations. */ private final TablesClient tables; @@ -369,6 +333,30 @@ public TablesClient getTables() { return this.tables; } + /** The WorkspacesClient object to access its operations. */ + private final WorkspacesClient workspaces; + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + public WorkspacesClient getWorkspaces() { + return this.workspaces; + } + + /** The DeletedWorkspacesClient object to access its operations. */ + private final DeletedWorkspacesClient deletedWorkspaces; + + /** + * Gets the DeletedWorkspacesClient object to access its operations. + * + * @return the DeletedWorkspacesClient object. + */ + public DeletedWorkspacesClient getDeletedWorkspaces() { + return this.deletedWorkspaces; + } + /** * Initializes an instance of OperationalInsightsManagementClient client. * @@ -391,27 +379,26 @@ public TablesClient getTables() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2020-08-01"; this.dataExports = new DataExportsClientImpl(this); this.dataSources = new DataSourcesClientImpl(this); this.intelligencePacks = new IntelligencePacksClientImpl(this); this.linkedServices = new LinkedServicesClientImpl(this); this.linkedStorageAccounts = new LinkedStorageAccountsClientImpl(this); this.managementGroups = new ManagementGroupsClientImpl(this); - this.operations = new OperationsClientImpl(this); this.operationStatuses = new OperationStatusesClientImpl(this); this.sharedKeysOperations = new SharedKeysOperationsClientImpl(this); this.usages = new UsagesClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); - this.deletedWorkspaces = new DeletedWorkspacesClientImpl(this); - this.clusters = new ClustersClientImpl(this); this.storageInsightConfigs = new StorageInsightConfigsClientImpl(this); this.savedSearches = new SavedSearchesClientImpl(this); this.availableServiceTiers = new AvailableServiceTiersClientImpl(this); this.gateways = new GatewaysClientImpl(this); this.schemas = new SchemasClientImpl(this); this.workspacePurges = new WorkspacePurgesClientImpl(this); + this.clusters = new ClustersClientImpl(this); + this.operations = new OperationsClientImpl(this); this.tables = new TablesClientImpl(this); + this.workspaces = new WorkspacesClientImpl(this); + this.deletedWorkspaces = new DeletedWorkspacesClientImpl(this); } /** @@ -496,7 +483,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } - } catch (IOException ioe) { + } catch (IOException | RuntimeException ioe) { logger.logThrowableAsWarning(ioe); } } @@ -525,7 +512,7 @@ private static final class HttpResponseImpl extends HttpResponse { super(null); this.statusCode = statusCode; this.httpHeaders = httpHeaders; - this.responseBody = responseBody.getBytes(StandardCharsets.UTF_8); + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); } public int getStatusCode() { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java index ba1f658144a9d..3fd4f06a764a5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java @@ -95,10 +95,10 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) .>map( res -> new PagedResponseBase<>( @@ -108,7 +108,7 @@ private Mono> listSinglePageAsync() { res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -128,10 +128,11 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .list(this.client.getEndpoint(), apiVersion, accept, context) .map( res -> new PagedResponseBase<>( @@ -228,7 +229,7 @@ private Mono> listNextSinglePageAsync(String nextL res.getValue().value(), res.getValue().nextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsImpl.java index c00a152761bff..18bbc58b27cc0 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsImpl.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.OperationsClient; import com.azure.resourcemanager.loganalytics.fluent.models.OperationInner; import com.azure.resourcemanager.loganalytics.models.Operation; @@ -19,28 +18,29 @@ public final class OperationsImpl implements Operations { private final OperationsClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public OperationsImpl(OperationsClient innerClient, LogAnalyticsManager serviceManager) { + public OperationsImpl( + OperationsClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchImpl.java index b651476e21b1f..247a345992e1e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.loganalytics.implementation; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.SavedSearchInner; import com.azure.resourcemanager.loganalytics.models.SavedSearch; import com.azure.resourcemanager.loganalytics.models.Tag; @@ -15,7 +14,7 @@ public final class SavedSearchImpl implements SavedSearch, SavedSearch.Definition, SavedSearch.Update { private SavedSearchInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -70,7 +69,7 @@ public SavedSearchInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -107,7 +106,7 @@ public SavedSearch create(Context context) { return this; } - SavedSearchImpl(String name, LogAnalyticsManager serviceManager) { + SavedSearchImpl(String name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new SavedSearchInner(); this.serviceManager = serviceManager; this.savedSearchId = name; @@ -138,7 +137,8 @@ public SavedSearch apply(Context context) { return this; } - SavedSearchImpl(SavedSearchInner innerObject, LogAnalyticsManager serviceManager) { + SavedSearchImpl( + SavedSearchInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java index eb35975d09b3a..69afd818c0c6d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java @@ -158,6 +158,7 @@ private Mono> deleteWithResponseAsync( if (savedSearchId == null) { return Mono.error(new IllegalArgumentException("Parameter savedSearchId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; return FluxUtil .withContext( context -> @@ -168,9 +169,9 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -210,6 +211,7 @@ private Mono> deleteWithResponseAsync( if (savedSearchId == null) { return Mono.error(new IllegalArgumentException("Parameter savedSearchId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; context = this.client.mergeContext(context); return service .delete( @@ -218,7 +220,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, context); } @@ -314,6 +316,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -325,11 +328,11 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -379,6 +382,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -388,7 +392,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -498,6 +502,7 @@ private Mono> getWithResponseAsync( if (savedSearchId == null) { return Mono.error(new IllegalArgumentException("Parameter savedSearchId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -509,10 +514,10 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -552,6 +557,7 @@ private Mono> getWithResponseAsync( if (savedSearchId == null) { return Mono.error(new IllegalArgumentException("Parameter savedSearchId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -561,7 +567,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -656,6 +662,7 @@ private Mono> listByWorkspaceWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -665,11 +672,11 @@ private Mono> listByWorkspaceWithResponse this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -705,6 +712,7 @@ private Mono> listByWorkspaceWithResponse new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -712,7 +720,7 @@ private Mono> listByWorkspaceWithResponse this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java index c39b9a46c6ae4..f83f033b15e3f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.SavedSearchesClient; import com.azure.resourcemanager.loganalytics.fluent.models.SavedSearchInner; import com.azure.resourcemanager.loganalytics.fluent.models.SavedSearchesListResultInner; @@ -22,9 +21,10 @@ public final class SavedSearchesImpl implements SavedSearches { private final SavedSearchesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public SavedSearchesImpl(SavedSearchesClient innerClient, LogAnalyticsManager serviceManager) { + public SavedSearchesImpl( + SavedSearchesClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -194,7 +194,7 @@ private SavedSearchesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesListResultImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesListResultImpl.java index bdfb3b727c0aa..3722df33f511b 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesListResultImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesListResultImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.SavedSearchInner; import com.azure.resourcemanager.loganalytics.fluent.models.SavedSearchesListResultInner; import com.azure.resourcemanager.loganalytics.models.SavedSearch; @@ -16,9 +15,11 @@ public final class SavedSearchesListResultImpl implements SavedSearchesListResult { private SavedSearchesListResultInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - SavedSearchesListResultImpl(SavedSearchesListResultInner innerObject, LogAnalyticsManager serviceManager) { + SavedSearchesListResultImpl( + SavedSearchesListResultInner innerObject, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -41,7 +42,7 @@ public SavedSearchesListResultInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java index a5e6cc6ce7ca3..6c49c0c5be504 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java @@ -101,6 +101,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -110,11 +111,11 @@ private Mono> getWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -150,6 +151,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -157,7 +159,7 @@ private Mono> getWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java index c24790b731846..9f63e7dfdc28d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.SchemasClient; import com.azure.resourcemanager.loganalytics.fluent.models.SearchGetSchemaResponseInner; import com.azure.resourcemanager.loganalytics.models.Schemas; @@ -20,9 +19,10 @@ public final class SchemasImpl implements Schemas { private final SchemasClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public SchemasImpl(SchemasClient innerClient, LogAnalyticsManager serviceManager) { + public SchemasImpl( + SchemasClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -55,7 +55,7 @@ private SchemasClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SearchGetSchemaResponseImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SearchGetSchemaResponseImpl.java index 2b41c41ecbc1c..ea2d731ebebd0 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SearchGetSchemaResponseImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SearchGetSchemaResponseImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.SearchGetSchemaResponseInner; import com.azure.resourcemanager.loganalytics.models.SearchGetSchemaResponse; import com.azure.resourcemanager.loganalytics.models.SearchMetadata; @@ -15,9 +14,11 @@ public final class SearchGetSchemaResponseImpl implements SearchGetSchemaResponse { private SearchGetSchemaResponseInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - SearchGetSchemaResponseImpl(SearchGetSchemaResponseInner innerObject, LogAnalyticsManager serviceManager) { + SearchGetSchemaResponseImpl( + SearchGetSchemaResponseInner innerObject, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -39,7 +40,7 @@ public SearchGetSchemaResponseInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysImpl.java index 8f04f5a9607b2..187b5d9f228c1 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysImpl.java @@ -4,16 +4,16 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.SharedKeysInner; import com.azure.resourcemanager.loganalytics.models.SharedKeys; public final class SharedKeysImpl implements SharedKeys { private SharedKeysInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - SharedKeysImpl(SharedKeysInner innerObject, LogAnalyticsManager serviceManager) { + SharedKeysImpl( + SharedKeysInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -30,7 +30,7 @@ public SharedKeysInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java index 736da36f9e6a3..9addf67c51444 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java @@ -118,6 +118,7 @@ private Mono> getSharedKeysWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -127,11 +128,11 @@ private Mono> getSharedKeysWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -167,6 +168,7 @@ private Mono> getSharedKeysWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -174,7 +176,7 @@ private Mono> getSharedKeysWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -268,6 +270,7 @@ private Mono> regenerateWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -278,10 +281,10 @@ private Mono> regenerateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -318,6 +321,7 @@ private Mono> regenerateWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -326,7 +330,7 @@ private Mono> regenerateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java index e8bb3fccd38fe..c787d0e5688b1 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.SharedKeysOperationsClient; import com.azure.resourcemanager.loganalytics.fluent.models.SharedKeysInner; import com.azure.resourcemanager.loganalytics.models.SharedKeys; @@ -20,9 +19,11 @@ public final class SharedKeysOperationsImpl implements SharedKeysOperations { private final SharedKeysOperationsClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public SharedKeysOperationsImpl(SharedKeysOperationsClient innerClient, LogAnalyticsManager serviceManager) { + public SharedKeysOperationsImpl( + SharedKeysOperationsClient innerClient, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -79,7 +80,7 @@ private SharedKeysOperationsClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java index f0826c6fe1ce5..71cab1936f43a 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java @@ -180,6 +180,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -190,12 +191,12 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -246,6 +247,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -254,7 +256,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -367,6 +369,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -377,11 +380,11 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -422,6 +425,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -430,7 +434,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -532,6 +536,7 @@ private Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; return FluxUtil .withContext( context -> @@ -541,10 +546,10 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -585,6 +590,7 @@ private Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; context = this.client.mergeContext(context); return service .delete( @@ -592,7 +598,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context); } @@ -679,6 +685,7 @@ private Mono> listByWorkspaceSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -688,7 +695,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -701,7 +708,7 @@ private Mono> listByWorkspaceSinglePageAsync( res.getValue().value(), res.getValue().odataNextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -737,6 +744,7 @@ private Mono> listByWorkspaceSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -744,7 +752,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) @@ -859,7 +867,7 @@ private Mono> listByWorkspaceNextSinglePageAs res.getValue().value(), res.getValue().odataNextLink(), null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java index fd7d4991897f6..bd08bb96b2436 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.StorageInsightConfigsClient; import com.azure.resourcemanager.loganalytics.fluent.models.StorageInsightInner; import com.azure.resourcemanager.loganalytics.models.StorageInsight; @@ -21,9 +20,11 @@ public final class StorageInsightConfigsImpl implements StorageInsightConfigs { private final StorageInsightConfigsClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public StorageInsightConfigsImpl(StorageInsightConfigsClient innerClient, LogAnalyticsManager serviceManager) { + public StorageInsightConfigsImpl( + StorageInsightConfigsClient innerClient, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -64,14 +65,14 @@ public Response deleteWithResponse( public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return inner.mapPage(inner1 -> new StorageInsightImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new StorageInsightImpl(inner1, this.manager())); } public PagedIterable listByWorkspace( String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return inner.mapPage(inner1 -> new StorageInsightImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new StorageInsightImpl(inner1, this.manager())); } public StorageInsight getById(String id) { @@ -194,7 +195,7 @@ private StorageInsightConfigsClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightImpl.java index 187d23ef8f25c..173f6df3cd6f8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.loganalytics.implementation; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.StorageInsightInner; import com.azure.resourcemanager.loganalytics.models.StorageAccount; import com.azure.resourcemanager.loganalytics.models.StorageInsight; @@ -17,7 +16,7 @@ public final class StorageInsightImpl implements StorageInsight, StorageInsight.Definition, StorageInsight.Update { private StorageInsightInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -74,7 +73,7 @@ public StorageInsightInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -112,7 +111,7 @@ public StorageInsight create(Context context) { return this; } - StorageInsightImpl(String name, LogAnalyticsManager serviceManager) { + StorageInsightImpl(String name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new StorageInsightInner(); this.serviceManager = serviceManager; this.storageInsightName = name; @@ -144,7 +143,8 @@ public StorageInsight apply(Context context) { return this; } - StorageInsightImpl(StorageInsightInner innerObject, LogAnalyticsManager serviceManager) { + StorageInsightImpl( + StorageInsightInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java index 5e53ca19cfd5a..23afc87209975 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java @@ -4,16 +4,15 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.TableInner; import com.azure.resourcemanager.loganalytics.models.Table; public final class TableImpl implements Table { private TableInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - TableImpl(TableInner innerObject, LogAnalyticsManager serviceManager) { + TableImpl(TableInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -34,11 +33,23 @@ public Integer retentionInDays() { return this.innerModel().retentionInDays(); } + public Boolean isTroubleshootingAllowed() { + return this.innerModel().isTroubleshootingAllowed(); + } + + public Boolean isTroubleshootEnabled() { + return this.innerModel().isTroubleshootEnabled(); + } + + public String lastTroubleshootDate() { + return this.innerModel().lastTroubleshootDate(); + } + public TableInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java index d5288c8f4ad73..36eb1d0fada31 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java @@ -141,6 +141,7 @@ private Mono> listByWorkspaceSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -151,14 +152,14 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -194,6 +195,7 @@ private Mono> listByWorkspaceSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -202,7 +204,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -316,6 +318,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -326,12 +329,12 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, tableName, parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -377,6 +380,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -385,7 +389,7 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, tableName, parameters, accept, @@ -490,6 +494,7 @@ private Mono> getWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -500,11 +505,11 @@ private Mono> getWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, tableName, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -544,6 +549,7 @@ private Mono> getWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -552,7 +558,7 @@ private Mono> getWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, tableName, accept, context); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java index 23b880a3364e4..8ee8c3a0b68bc 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.TablesClient; import com.azure.resourcemanager.loganalytics.fluent.models.TableInner; import com.azure.resourcemanager.loganalytics.models.Table; @@ -21,22 +20,23 @@ public final class TablesImpl implements Tables { private final TablesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public TablesImpl(TablesClient innerClient, LogAnalyticsManager serviceManager) { + public TablesImpl( + TablesClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return inner.mapPage(inner1 -> new TableImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new TableImpl(inner1, this.manager())); } public PagedIterable
listByWorkspace(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return inner.mapPage(inner1 -> new TableImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new TableImpl(inner1, this.manager())); } public Table update(String resourceGroupName, String workspaceName, String tableName, TableInner parameters) { @@ -91,7 +91,7 @@ private TablesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsageMetricImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsageMetricImpl.java index 6e8588e0e1603..8fb3f4cb1c793 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsageMetricImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsageMetricImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.UsageMetricInner; import com.azure.resourcemanager.loganalytics.models.MetricName; import com.azure.resourcemanager.loganalytics.models.UsageMetric; @@ -13,9 +12,10 @@ public final class UsageMetricImpl implements UsageMetric { private UsageMetricInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - UsageMetricImpl(UsageMetricInner innerObject, LogAnalyticsManager serviceManager) { + UsageMetricImpl( + UsageMetricInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -48,7 +48,7 @@ public UsageMetricInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java index dce15f1372646..ce2735bcdc997 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java @@ -105,6 +105,7 @@ private Mono> listSinglePageAsync(String resourc new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -114,7 +115,7 @@ private Mono> listSinglePageAsync(String resourc this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -122,7 +123,7 @@ private Mono> listSinglePageAsync(String resourc res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -158,6 +159,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -165,7 +167,7 @@ private Mono> listSinglePageAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesImpl.java index 427bdeb9fb007..2e4b49a73ddd3 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesImpl.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.UsagesClient; import com.azure.resourcemanager.loganalytics.fluent.models.UsageMetricInner; import com.azure.resourcemanager.loganalytics.models.UsageMetric; @@ -19,28 +18,29 @@ public final class UsagesImpl implements Usages { private final UsagesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public UsagesImpl(UsagesClient innerClient, LogAnalyticsManager serviceManager) { + public UsagesImpl( + UsagesClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return inner.mapPage(inner1 -> new UsageMetricImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new UsageMetricImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return inner.mapPage(inner1 -> new UsageMetricImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new UsageMetricImpl(inner1, this.manager())); } private UsagesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/Utils.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/Utils.java index 9db3c0d5eb6cd..ad08d040c42cc 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/Utils.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/Utils.java @@ -4,12 +4,20 @@ package com.azure.resourcemanager.loganalytics.implementation; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.CoreUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; final class Utils { static String getValueFromIdByName(String id, String name) { @@ -64,4 +72,133 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } return null; } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super( + PagedFlux + .create( + () -> + (continuationToken, pageSize) -> + Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> + new PagedResponseBase( + page.getRequest(), + page.getStatusCode(), + page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), + page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl(iterable.iterator(), mapper); + } + } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java index 82fc5468c0eba..612c1d9b2a4c1 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java @@ -6,7 +6,6 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspaceInner; import com.azure.resourcemanager.loganalytics.models.PrivateLinkScopedResource; import com.azure.resourcemanager.loganalytics.models.PublicNetworkAccessType; @@ -22,7 +21,7 @@ public final class WorkspaceImpl implements Workspace, Workspace.Definition, Workspace.Update { private WorkspaceInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; public String id() { return this.innerModel().id(); @@ -73,6 +72,14 @@ public WorkspaceCapping workspaceCapping() { return this.innerModel().workspaceCapping(); } + public String createdDate() { + return this.innerModel().createdDate(); + } + + public String modifiedDate() { + return this.innerModel().modifiedDate(); + } + public PublicNetworkAccessType publicNetworkAccessForIngestion() { return this.innerModel().publicNetworkAccessForIngestion(); } @@ -81,6 +88,10 @@ public PublicNetworkAccessType publicNetworkAccessForQuery() { return this.innerModel().publicNetworkAccessForQuery(); } + public Boolean forceCmkForQuery() { + return this.innerModel().forceCmkForQuery(); + } + public List privateLinkScopedResources() { List inner = this.innerModel().privateLinkScopedResources(); if (inner != null) { @@ -90,6 +101,15 @@ public List privateLinkScopedResources() { } } + public Map features() { + Map inner = this.innerModel().features(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -102,7 +122,7 @@ public WorkspaceInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } @@ -135,7 +155,7 @@ public Workspace create(Context context) { return this; } - WorkspaceImpl(String name, LogAnalyticsManager serviceManager) { + WorkspaceImpl(String name, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = new WorkspaceInner(); this.serviceManager = serviceManager; this.workspaceName = name; @@ -166,7 +186,8 @@ public Workspace apply(Context context) { return this; } - WorkspaceImpl(WorkspaceInner innerObject, LogAnalyticsManager serviceManager) { + WorkspaceImpl( + WorkspaceInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); @@ -278,6 +299,26 @@ public WorkspaceImpl withPublicNetworkAccessForQuery(PublicNetworkAccessType pub } } + public WorkspaceImpl withForceCmkForQuery(Boolean forceCmkForQuery) { + if (isInCreateMode()) { + this.innerModel().withForceCmkForQuery(forceCmkForQuery); + return this; + } else { + this.updateParameters.withForceCmkForQuery(forceCmkForQuery); + return this; + } + } + + public WorkspaceImpl withFeatures(Map features) { + if (isInCreateMode()) { + this.innerModel().withFeatures(features); + return this; + } else { + this.updateParameters.withFeatures(features); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeResponseImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeResponseImpl.java index 09db777f81e54..b17a2a3617388 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeResponseImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeResponseImpl.java @@ -4,16 +4,17 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeResponseInner; import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeResponse; public final class WorkspacePurgeResponseImpl implements WorkspacePurgeResponse { private WorkspacePurgeResponseInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - WorkspacePurgeResponseImpl(WorkspacePurgeResponseInner innerObject, LogAnalyticsManager serviceManager) { + WorkspacePurgeResponseImpl( + WorkspacePurgeResponseInner innerObject, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -26,7 +27,7 @@ public WorkspacePurgeResponseInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeStatusResponseImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeStatusResponseImpl.java index 2e84ec58b37d3..c0f78031ac2bb 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeStatusResponseImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgeStatusResponseImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.implementation; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeStatusResponseInner; import com.azure.resourcemanager.loganalytics.models.PurgeState; import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeStatusResponse; @@ -12,10 +11,11 @@ public final class WorkspacePurgeStatusResponseImpl implements WorkspacePurgeStatusResponse { private WorkspacePurgeStatusResponseInner innerObject; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; WorkspacePurgeStatusResponseImpl( - WorkspacePurgeStatusResponseInner innerObject, LogAnalyticsManager serviceManager) { + WorkspacePurgeStatusResponseInner innerObject, + com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -28,7 +28,7 @@ public WorkspacePurgeStatusResponseInner innerModel() { return this.innerObject; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java index 6d66e06f8535f..59ade20d2f25e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java @@ -135,6 +135,7 @@ private Mono purgeWithResponseAsync( } else { body.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -143,13 +144,13 @@ private Mono purgeWithResponseAsync( .purge( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), workspaceName, body, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -196,13 +197,14 @@ private Mono purgeWithResponseAsync( } else { body.validate(); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .purge( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), workspaceName, body, @@ -279,7 +281,7 @@ public WorkspacePurgeResponseInner purge(String resourceGroupName, String worksp * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response purgeWithResponse( + public WorkspacePurgesPurgeResponse purgeWithResponse( String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context) { return purgeWithResponseAsync(resourceGroupName, workspaceName, body, context).block(); } @@ -320,6 +322,7 @@ private Mono> getPurgeStatusWithResp if (purgeId == null) { return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -328,13 +331,13 @@ private Mono> getPurgeStatusWithResp .getPurgeStatus( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), workspaceName, purgeId, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -374,13 +377,14 @@ private Mono> getPurgeStatusWithResp if (purgeId == null) { return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null.")); } + final String apiVersion = "2020-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .getPurgeStatus( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), workspaceName, purgeId, diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java index d772ad96f4062..69ac8aa105259 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.WorkspacePurgesClient; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeResponseInner; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeStatusResponseInner; @@ -16,6 +15,7 @@ import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeResponse; import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeStatusResponse; import com.azure.resourcemanager.loganalytics.models.WorkspacePurges; +import com.azure.resourcemanager.loganalytics.models.WorkspacePurgesPurgeResponse; import com.fasterxml.jackson.annotation.JsonIgnore; public final class WorkspacePurgesImpl implements WorkspacePurges { @@ -23,9 +23,10 @@ public final class WorkspacePurgesImpl implements WorkspacePurges { private final WorkspacePurgesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public WorkspacePurgesImpl(WorkspacePurgesClient innerClient, LogAnalyticsManager serviceManager) { + public WorkspacePurgesImpl( + WorkspacePurgesClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -41,7 +42,7 @@ public WorkspacePurgeResponse purge(String resourceGroupName, String workspaceNa public Response purgeWithResponse( String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context) { - Response inner = + WorkspacePurgesPurgeResponse inner = this.serviceClient().purgeWithResponse(resourceGroupName, workspaceName, body, context); if (inner != null) { return new SimpleResponse<>( @@ -83,7 +84,7 @@ private WorkspacePurgesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java index dfd42aed7efca..7e6a2b2bfa9fd 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java @@ -110,7 +110,7 @@ Mono>> createOrUpdate( @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}") @@ -123,6 +123,7 @@ Mono>> delete( @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("force") Boolean force, + @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @@ -178,22 +179,18 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) .>map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -219,15 +216,11 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) .map( res -> new PagedResponseBase<>( @@ -313,6 +306,7 @@ private Mono> listByResourceGroupSinglePageAsync(S new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -321,7 +315,7 @@ private Mono> listByResourceGroupSinglePageAsync(S .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -329,7 +323,7 @@ private Mono> listByResourceGroupSinglePageAsync(S res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -361,13 +355,14 @@ private Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .listByResourceGroup( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context) @@ -473,6 +468,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -482,12 +478,12 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -529,6 +525,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -536,7 +533,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -733,6 +730,8 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; + final String accept = "application/json"; return FluxUtil .withContext( context -> @@ -741,11 +740,12 @@ private Mono>> deleteWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), force, + accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -785,15 +785,18 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; + final String accept = "application/json"; context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), force, + accept, context); } @@ -1036,6 +1039,7 @@ private Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1045,11 +1049,11 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1085,6 +1089,7 @@ private Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1092,7 +1097,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context); @@ -1191,6 +1196,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1200,12 +1206,12 @@ private Mono> updateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1247,6 +1253,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1254,7 +1261,7 @@ private Mono> updateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java index 17c45bab455c4..d61e9eed572b0 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java @@ -9,7 +9,6 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.loganalytics.LogAnalyticsManager; import com.azure.resourcemanager.loganalytics.fluent.WorkspacesClient; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspaceInner; import com.azure.resourcemanager.loganalytics.models.Workspace; @@ -21,31 +20,32 @@ public final class WorkspacesImpl implements Workspaces { private final WorkspacesClient innerClient; - private final LogAnalyticsManager serviceManager; + private final com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager; - public WorkspacesImpl(WorkspacesClient innerClient, LogAnalyticsManager serviceManager) { + public WorkspacesImpl( + WorkspacesClient innerClient, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return inner.mapPage(inner1 -> new WorkspaceImpl(inner1, this.manager())); + return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, Boolean force) { @@ -165,7 +165,7 @@ private WorkspacesClient serviceClient() { return this.innerClient; } - private LogAnalyticsManager manager() { + private com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager() { return this.serviceManager; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AssociatedWorkspace.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AssociatedWorkspace.java new file mode 100644 index 0000000000000..5cc05a8a3d2b8 --- /dev/null +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AssociatedWorkspace.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.loganalytics.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The list of Log Analytics workspaces associated with the cluster. */ +@Immutable +public final class AssociatedWorkspace { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AssociatedWorkspace.class); + + /* + * The id of the assigned workspace. + */ + @JsonProperty(value = "workspaceId", access = JsonProperty.Access.WRITE_ONLY) + private String workspaceId; + + /* + * The name id the assigned workspace. + */ + @JsonProperty(value = "workspaceName", access = JsonProperty.Access.WRITE_ONLY) + private String workspaceName; + + /* + * The ResourceId id the assigned workspace. + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceId; + + /* + * The time of workspace association. + */ + @JsonProperty(value = "associateDate", access = JsonProperty.Access.WRITE_ONLY) + private String associateDate; + + /** + * Get the workspaceId property: The id of the assigned workspace. + * + * @return the workspaceId value. + */ + public String workspaceId() { + return this.workspaceId; + } + + /** + * Get the workspaceName property: The name id the assigned workspace. + * + * @return the workspaceName value. + */ + public String workspaceName() { + return this.workspaceName; + } + + /** + * Get the resourceId property: The ResourceId id the assigned workspace. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the associateDate property: The time of workspace association. + * + * @return the associateDate value. + */ + public String associateDate() { + return this.associateDate; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/BillingType.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/BillingType.java new file mode 100644 index 0000000000000..f57053a49627d --- /dev/null +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/BillingType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.loganalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for BillingType. */ +public final class BillingType extends ExpandableStringEnum { + /** Static value Cluster for BillingType. */ + public static final BillingType CLUSTER = fromString("Cluster"); + + /** Static value Workspaces for BillingType. */ + public static final BillingType WORKSPACES = fromString("Workspaces"); + + /** + * Creates or finds a BillingType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BillingType. + */ + @JsonCreator + public static BillingType fromString(String name) { + return fromString(name, BillingType.class); + } + + /** @return known BillingType values. */ + public static Collection values() { + return values(BillingType.class); + } +} diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationProperties.java new file mode 100644 index 0000000000000..9ef5d139842b3 --- /dev/null +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationProperties.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.loganalytics.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Capacity Reservation properties. */ +@Immutable +public final class CapacityReservationProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityReservationProperties.class); + + /* + * The last time Sku was updated. + */ + @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY) + private String lastSkuUpdate; + + /* + * Minimum CapacityReservation value in GB. + */ + @JsonProperty(value = "minCapacity", access = JsonProperty.Access.WRITE_ONLY) + private Long minCapacity; + + /* + * Maximum CapacityReservation value in GB. + */ + @JsonProperty(value = "maxCapacity", access = JsonProperty.Access.WRITE_ONLY) + private Long maxCapacity; + + /** + * Get the lastSkuUpdate property: The last time Sku was updated. + * + * @return the lastSkuUpdate value. + */ + public String lastSkuUpdate() { + return this.lastSkuUpdate; + } + + /** + * Get the minCapacity property: Minimum CapacityReservation value in GB. + * + * @return the minCapacity value. + */ + public Long minCapacity() { + return this.minCapacity; + } + + /** + * Get the maxCapacity property: Maximum CapacityReservation value in GB. + * + * @return the maxCapacity value. + */ + public Long maxCapacity() { + return this.maxCapacity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Cluster.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Cluster.java index 6cd5fe9911757..2bd890b8d89de 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Cluster.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Cluster.java @@ -7,6 +7,7 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner; +import java.util.List; import java.util.Map; /** An immutable client-side representation of Cluster. */ @@ -60,13 +61,6 @@ public interface Cluster { */ ClusterSku sku(); - /** - * Gets the nextLink property: The link used to get the next page of recommendations. - * - * @return the nextLink value. - */ - String nextLink(); - /** * Gets the clusterId property: The ID associated with the cluster. * @@ -81,6 +75,32 @@ public interface Cluster { */ ClusterEntityStatus provisioningState(); + /** + * Gets the isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. This Property + * can not be modified after cluster creation. Default value is 'true'. + * + * @return the isDoubleEncryptionEnabled value. + */ + Boolean isDoubleEncryptionEnabled(); + + /** + * Gets the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability zones. This can + * be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be + * modified after cluster creation. Default value is 'true' if region supports Availability Zones. + * + * @return the isAvailabilityZonesEnabled value. + */ + Boolean isAvailabilityZonesEnabled(); + + /** + * Gets the billingType property: Configures whether billing will be only on the cluster or each workspace will be + * billed by its proportional use. This does not change the overall billing, only how it will be distributed. + * Default value is 'Cluster'. + * + * @return the billingType value. + */ + BillingType billingType(); + /** * Gets the keyVaultProperties property: The associated key properties. * @@ -88,6 +108,34 @@ public interface Cluster { */ KeyVaultProperties keyVaultProperties(); + /** + * Gets the lastModifiedDate property: The last time the cluster was updated. + * + * @return the lastModifiedDate value. + */ + String lastModifiedDate(); + + /** + * Gets the createdDate property: The cluster creation time. + * + * @return the createdDate value. + */ + String createdDate(); + + /** + * Gets the associatedWorkspaces property: The list of Log Analytics workspaces associated with the cluster. + * + * @return the associatedWorkspaces value. + */ + List associatedWorkspaces(); + + /** + * Gets the capacityReservationProperties property: Additional properties for capacity reservation. + * + * @return the capacityReservationProperties value. + */ + CapacityReservationProperties capacityReservationProperties(); + /** * Gets the region of the resource. * @@ -157,8 +205,12 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithSku, - DefinitionStages.WithNextLink, - DefinitionStages.WithKeyVaultProperties { + DefinitionStages.WithIsDoubleEncryptionEnabled, + DefinitionStages.WithIsAvailabilityZonesEnabled, + DefinitionStages.WithBillingType, + DefinitionStages.WithKeyVaultProperties, + DefinitionStages.WithAssociatedWorkspaces, + DefinitionStages.WithCapacityReservationProperties { /** * Executes the create request. * @@ -204,15 +256,47 @@ interface WithSku { */ WithCreate withSku(ClusterSku sku); } - /** The stage of the Cluster definition allowing to specify nextLink. */ - interface WithNextLink { + /** The stage of the Cluster definition allowing to specify isDoubleEncryptionEnabled. */ + interface WithIsDoubleEncryptionEnabled { + /** + * Specifies the isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. + * This Property can not be modified after cluster creation. Default value is 'true'. + * + * @param isDoubleEncryptionEnabled Configures whether cluster will use double encryption. This Property can + * not be modified after cluster creation. Default value is 'true'. + * @return the next definition stage. + */ + WithCreate withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled); + } + /** The stage of the Cluster definition allowing to specify isAvailabilityZonesEnabled. */ + interface WithIsAvailabilityZonesEnabled { /** - * Specifies the nextLink property: The link used to get the next page of recommendations.. + * Specifies the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability + * zones. This can be set as true only in regions where Azure Data Explorer support Availability Zones. This + * Property can not be modified after cluster creation. Default value is 'true' if region supports + * Availability Zones.. * - * @param nextLink The link used to get the next page of recommendations. + * @param isAvailabilityZonesEnabled Sets whether the cluster will support availability zones. This can be + * set as true only in regions where Azure Data Explorer support Availability Zones. This Property can + * not be modified after cluster creation. Default value is 'true' if region supports Availability + * Zones. * @return the next definition stage. */ - WithCreate withNextLink(String nextLink); + WithCreate withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled); + } + /** The stage of the Cluster definition allowing to specify billingType. */ + interface WithBillingType { + /** + * Specifies the billingType property: Configures whether billing will be only on the cluster or each + * workspace will be billed by its proportional use. This does not change the overall billing, only how it + * will be distributed. Default value is 'Cluster'. + * + * @param billingType Configures whether billing will be only on the cluster or each workspace will be + * billed by its proportional use. This does not change the overall billing, only how it will be + * distributed. Default value is 'Cluster'. + * @return the next definition stage. + */ + WithCreate withBillingType(BillingType billingType); } /** The stage of the Cluster definition allowing to specify keyVaultProperties. */ interface WithKeyVaultProperties { @@ -224,6 +308,27 @@ interface WithKeyVaultProperties { */ WithCreate withKeyVaultProperties(KeyVaultProperties keyVaultProperties); } + /** The stage of the Cluster definition allowing to specify associatedWorkspaces. */ + interface WithAssociatedWorkspaces { + /** + * Specifies the associatedWorkspaces property: The list of Log Analytics workspaces associated with the + * cluster. + * + * @param associatedWorkspaces The list of Log Analytics workspaces associated with the cluster. + * @return the next definition stage. + */ + WithCreate withAssociatedWorkspaces(List associatedWorkspaces); + } + /** The stage of the Cluster definition allowing to specify capacityReservationProperties. */ + interface WithCapacityReservationProperties { + /** + * Specifies the capacityReservationProperties property: Additional properties for capacity reservation. + * + * @param capacityReservationProperties Additional properties for capacity reservation. + * @return the next definition stage. + */ + WithCreate withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties); + } } /** * Begins update for the Cluster resource. @@ -233,7 +338,11 @@ interface WithKeyVaultProperties { Cluster.Update update(); /** The template for Cluster update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithKeyVaultProperties { + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithIdentity, + UpdateStages.WithSku, + UpdateStages.WithKeyVaultProperties { /** * Executes the update request. * @@ -261,6 +370,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Cluster update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the resource.. + * + * @param identity The identity of the resource. + * @return the next definition stage. + */ + Update withIdentity(Identity identity); + } /** The stage of the Cluster update allowing to specify sku. */ interface WithSku { /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java index 34be5ae9d38f6..da1a2ae558da1 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java @@ -17,6 +17,12 @@ public class ClusterPatch { @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPatch.class); + /* + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + /* * The sku properties. */ @@ -35,6 +41,26 @@ public class ClusterPatch { @JsonProperty(value = "properties.keyVaultProperties") private KeyVaultProperties keyVaultProperties; + /** + * Get the identity property: The identity of the resource. + * + * @return the identity value. + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the resource. + * + * @param identity the identity value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withIdentity(Identity identity) { + this.identity = identity; + return this; + } + /** * Get the sku property: The sku properties. * @@ -101,6 +127,9 @@ public ClusterPatch withKeyVaultProperties(KeyVaultProperties keyVaultProperties * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (sku() != null) { sku().validate(); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java index 2115f49ea7fa1..b46323e664d01 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; /** Identity for the resource. */ @Fluent @@ -27,11 +28,19 @@ public class Identity { private String tenantId; /* - * The identity type. + * Type of managed service identity. */ @JsonProperty(value = "type", required = true) private IdentityType type; + /* + * The list of user identities associated with the resource. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + /** * Get the principalId property: The principal ID of resource identity. * @@ -51,7 +60,7 @@ public String tenantId() { } /** - * Get the type property: The identity type. + * Get the type property: Type of managed service identity. * * @return the type value. */ @@ -60,7 +69,7 @@ public IdentityType type() { } /** - * Set the type property: The identity type. + * Set the type property: Type of managed service identity. * * @param type the type value to set. * @return the Identity object itself. @@ -70,6 +79,30 @@ public Identity withType(IdentityType type) { return this; } + /** + * Get the userAssignedIdentities property: The list of user identities associated with the resource. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The list of user identities associated with the resource. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the Identity object itself. + */ + public Identity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + /** * Validates the instance. * @@ -80,5 +113,15 @@ public void validate() { throw logger .logExceptionAsError(new IllegalArgumentException("Missing required property type in model Identity")); } + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java index 457f03780ba35..b8566c9eb059e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java @@ -12,6 +12,9 @@ public enum IdentityType { /** Enum value SystemAssigned. */ SYSTEM_ASSIGNED("SystemAssigned"), + /** Enum value UserAssigned. */ + USER_ASSIGNED("UserAssigned"), + /** Enum value None. */ NONE("None"); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java index ac2c6827af82d..3a6d9052ff476 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java @@ -33,6 +33,12 @@ public final class KeyVaultProperties { @JsonProperty(value = "keyVersion") private String keyVersion; + /* + * Selected key minimum required size. + */ + @JsonProperty(value = "keyRsaSize") + private Integer keyRsaSize; + /** * Get the keyVaultUri property: The Key Vault uri which holds they key associated with the Log Analytics cluster. * @@ -93,6 +99,26 @@ public KeyVaultProperties withKeyVersion(String keyVersion) { return this; } + /** + * Get the keyRsaSize property: Selected key minimum required size. + * + * @return the keyRsaSize value. + */ + public Integer keyRsaSize() { + return this.keyRsaSize; + } + + /** + * Set the keyRsaSize property: Selected key minimum required size. + * + * @param keyRsaSize the keyRsaSize value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyRsaSize(Integer keyRsaSize) { + this.keyRsaSize = keyRsaSize; + return this; + } + /** * Validates the instance. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Table.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Table.java index c4a2fa65b8f66..44c69cf3d79a8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Table.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Table.java @@ -30,13 +30,35 @@ public interface Table { String type(); /** - * Gets the retentionInDays property: The data table data retention in days, between 30 and 730. Setting this + * Gets the retentionInDays property: The data table data retention in days, between 7 and 730. Setting this * property to null will default to the workspace retention. * * @return the retentionInDays value. */ Integer retentionInDays(); + /** + * Gets the isTroubleshootingAllowed property: Specifies if IsTroubleshootingEnabled property can be set for this + * table. + * + * @return the isTroubleshootingAllowed value. + */ + Boolean isTroubleshootingAllowed(); + + /** + * Gets the isTroubleshootEnabled property: Enable or disable troubleshoot for this table. + * + * @return the isTroubleshootEnabled value. + */ + Boolean isTroubleshootEnabled(); + + /** + * Gets the lastTroubleshootDate property: Last time when troubleshooting was set for this table. + * + * @return the lastTroubleshootDate value. + */ + String lastTroubleshootDate(); + /** * Gets the inner com.azure.resourcemanager.loganalytics.fluent.models.TableInner object. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/UserIdentityProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/UserIdentityProperties.java new file mode 100644 index 0000000000000..09534dfdca5a1 --- /dev/null +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/UserIdentityProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.loganalytics.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** User assigned identity properties. */ +@Immutable +public final class UserIdentityProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserIdentityProperties.class); + + /* + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get the principalId property: The principal id of user assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client id of user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java index 3fa7e9ee11f11..44ce1350abae5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java @@ -76,7 +76,8 @@ public interface Workspace { WorkspaceSku sku(); /** - * Gets the retentionInDays property: The workspace data retention in days, between 30 and 730. + * Gets the retentionInDays property: The workspace data retention in days. Allowed values are per pricing plan. See + * pricing tiers documentation for details. * * @return the retentionInDays value. */ @@ -89,6 +90,20 @@ public interface Workspace { */ WorkspaceCapping workspaceCapping(); + /** + * Gets the createdDate property: Workspace creation date. + * + * @return the createdDate value. + */ + String createdDate(); + + /** + * Gets the modifiedDate property: Workspace modification date. + * + * @return the modifiedDate value. + */ + String modifiedDate(); + /** * Gets the publicNetworkAccessForIngestion property: The network access type for accessing Log Analytics ingestion. * @@ -103,6 +118,13 @@ public interface Workspace { */ PublicNetworkAccessType publicNetworkAccessForQuery(); + /** + * Gets the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for query management. + * + * @return the forceCmkForQuery value. + */ + Boolean forceCmkForQuery(); + /** * Gets the privateLinkScopedResources property: List of linked private link scope resources. * @@ -110,6 +132,13 @@ public interface Workspace { */ List privateLinkScopedResources(); + /** + * Gets the features property: Workspace features. + * + * @return the features value. + */ + Map features(); + /** * Gets the region of the resource. * @@ -183,7 +212,9 @@ interface WithCreate DefinitionStages.WithRetentionInDays, DefinitionStages.WithWorkspaceCapping, DefinitionStages.WithPublicNetworkAccessForIngestion, - DefinitionStages.WithPublicNetworkAccessForQuery { + DefinitionStages.WithPublicNetworkAccessForQuery, + DefinitionStages.WithForceCmkForQuery, + DefinitionStages.WithFeatures { /** * Executes the create request. * @@ -242,9 +273,11 @@ interface WithSku { /** The stage of the Workspace definition allowing to specify retentionInDays. */ interface WithRetentionInDays { /** - * Specifies the retentionInDays property: The workspace data retention in days, between 30 and 730.. + * Specifies the retentionInDays property: The workspace data retention in days. Allowed values are per + * pricing plan. See pricing tiers documentation for details.. * - * @param retentionInDays The workspace data retention in days, between 30 and 730. + * @param retentionInDays The workspace data retention in days. Allowed values are per pricing plan. See + * pricing tiers documentation for details. * @return the next definition stage. */ WithCreate withRetentionInDays(Integer retentionInDays); @@ -281,6 +314,27 @@ interface WithPublicNetworkAccessForQuery { */ WithCreate withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery); } + /** The stage of the Workspace definition allowing to specify forceCmkForQuery. */ + interface WithForceCmkForQuery { + /** + * Specifies the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for + * query management.. + * + * @param forceCmkForQuery Indicates whether customer managed storage is mandatory for query management. + * @return the next definition stage. + */ + WithCreate withForceCmkForQuery(Boolean forceCmkForQuery); + } + /** The stage of the Workspace definition allowing to specify features. */ + interface WithFeatures { + /** + * Specifies the features property: Workspace features.. + * + * @param features Workspace features. + * @return the next definition stage. + */ + WithCreate withFeatures(Map features); + } } /** * Begins update for the Workspace resource. @@ -297,7 +351,9 @@ interface Update UpdateStages.WithRetentionInDays, UpdateStages.WithWorkspaceCapping, UpdateStages.WithPublicNetworkAccessForIngestion, - UpdateStages.WithPublicNetworkAccessForQuery { + UpdateStages.WithPublicNetworkAccessForQuery, + UpdateStages.WithForceCmkForQuery, + UpdateStages.WithFeatures { /** * Executes the update request. * @@ -348,9 +404,11 @@ interface WithSku { /** The stage of the Workspace update allowing to specify retentionInDays. */ interface WithRetentionInDays { /** - * Specifies the retentionInDays property: The workspace data retention in days, between 30 and 730.. + * Specifies the retentionInDays property: The workspace data retention in days. Allowed values are per + * pricing plan. See pricing tiers documentation for details.. * - * @param retentionInDays The workspace data retention in days, between 30 and 730. + * @param retentionInDays The workspace data retention in days. Allowed values are per pricing plan. See + * pricing tiers documentation for details. * @return the next definition stage. */ Update withRetentionInDays(Integer retentionInDays); @@ -387,6 +445,27 @@ interface WithPublicNetworkAccessForQuery { */ Update withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery); } + /** The stage of the Workspace update allowing to specify forceCmkForQuery. */ + interface WithForceCmkForQuery { + /** + * Specifies the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for + * query management.. + * + * @param forceCmkForQuery Indicates whether customer managed storage is mandatory for query management. + * @return the next definition stage. + */ + Update withForceCmkForQuery(Boolean forceCmkForQuery); + } + /** The stage of the Workspace update allowing to specify features. */ + interface WithFeatures { + /** + * Specifies the features property: Workspace features.. + * + * @param features Workspace features. + * @return the next definition stage. + */ + Update withFeatures(Map features); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java index e278476f35ad1..c1d0c35e8ed38 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java @@ -44,7 +44,8 @@ public class WorkspacePatch extends AzureEntityResource { private WorkspaceSku sku; /* - * The workspace data retention in days, between 30 and 730. + * The workspace data retention in days. Allowed values are per pricing + * plan. See pricing tiers documentation for details. */ @JsonProperty(value = "properties.retentionInDays") private Integer retentionInDays; @@ -55,6 +56,18 @@ public class WorkspacePatch extends AzureEntityResource { @JsonProperty(value = "properties.workspaceCapping") private WorkspaceCapping workspaceCapping; + /* + * Workspace creation date. + */ + @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY) + private String createdDate; + + /* + * Workspace modification date. + */ + @JsonProperty(value = "properties.modifiedDate", access = JsonProperty.Access.WRITE_ONLY) + private String modifiedDate; + /* * The network access type for accessing Log Analytics ingestion. */ @@ -67,12 +80,25 @@ public class WorkspacePatch extends AzureEntityResource { @JsonProperty(value = "properties.publicNetworkAccessForQuery") private PublicNetworkAccessType publicNetworkAccessForQuery; + /* + * Indicates whether customer managed storage is mandatory for query + * management. + */ + @JsonProperty(value = "properties.forceCmkForQuery") + private Boolean forceCmkForQuery; + /* * List of linked private link scope resources. */ @JsonProperty(value = "properties.privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY) private List privateLinkScopedResources; + /* + * Workspace features. + */ + @JsonProperty(value = "properties.features") + private Map features; + /** * Get the tags property: Resource tags. Optional. * @@ -143,7 +169,8 @@ public WorkspacePatch withSku(WorkspaceSku sku) { } /** - * Get the retentionInDays property: The workspace data retention in days, between 30 and 730. + * Get the retentionInDays property: The workspace data retention in days. Allowed values are per pricing plan. See + * pricing tiers documentation for details. * * @return the retentionInDays value. */ @@ -152,7 +179,8 @@ public Integer retentionInDays() { } /** - * Set the retentionInDays property: The workspace data retention in days, between 30 and 730. + * Set the retentionInDays property: The workspace data retention in days. Allowed values are per pricing plan. See + * pricing tiers documentation for details. * * @param retentionInDays the retentionInDays value to set. * @return the WorkspacePatch object itself. @@ -182,6 +210,24 @@ public WorkspacePatch withWorkspaceCapping(WorkspaceCapping workspaceCapping) { return this; } + /** + * Get the createdDate property: Workspace creation date. + * + * @return the createdDate value. + */ + public String createdDate() { + return this.createdDate; + } + + /** + * Get the modifiedDate property: Workspace modification date. + * + * @return the modifiedDate value. + */ + public String modifiedDate() { + return this.modifiedDate; + } + /** * Get the publicNetworkAccessForIngestion property: The network access type for accessing Log Analytics ingestion. * @@ -222,6 +268,26 @@ public WorkspacePatch withPublicNetworkAccessForQuery(PublicNetworkAccessType pu return this; } + /** + * Get the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for query management. + * + * @return the forceCmkForQuery value. + */ + public Boolean forceCmkForQuery() { + return this.forceCmkForQuery; + } + + /** + * Set the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for query management. + * + * @param forceCmkForQuery the forceCmkForQuery value to set. + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withForceCmkForQuery(Boolean forceCmkForQuery) { + this.forceCmkForQuery = forceCmkForQuery; + return this; + } + /** * Get the privateLinkScopedResources property: List of linked private link scope resources. * @@ -231,6 +297,26 @@ public List privateLinkScopedResources() { return this.privateLinkScopedResources; } + /** + * Get the features property: Workspace features. + * + * @return the features value. + */ + public Map features() { + return this.features; + } + + /** + * Set the features property: Workspace features. + * + * @param features the features value to set. + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withFeatures(Map features) { + this.features = features; + return this; + } + /** * Validates the instance. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java index 2575a89325a30..8c25c5246f102 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java @@ -31,6 +31,9 @@ public final class WorkspaceSkuNameEnum extends ExpandableStringEnum