diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md index 2bb4d3ca336f..ee155d5c9dd1 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-03-07) +- 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). ## 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 72f81d5b298d..ff0ff6f318f3 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 36423080e736..37e918d14f14 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. Operational Insights Client. Package tag package-2020-10. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt https://github.com/Azure/azure-sdk-for-java @@ -41,6 +41,11 @@ + + com.azure + azure-core + 1.13.0 + 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 98a1bd1600c7..da1e0161f9c7 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,22 +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; private AvailableServiceTiers availableServiceTiers; @@ -108,8 +98,18 @@ public final class LogAnalyticsManager { private WorkspacePurges workspacePurges; + private StorageInsightConfigs storageInsightConfigs; + + 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.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + if (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,38 +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) { - this.storageInsightConfigs = new StorageInsightConfigsImpl(clientObject.getStorageInsightConfigs(), this); - } - return storageInsightConfigs; - } - /** @return Resource collection API of SavedSearches. */ public SavedSearches savedSearches() { if (this.savedSearches == null) { @@ -410,6 +384,30 @@ public WorkspacePurges workspacePurges() { return workspacePurges; } + /** @return Resource collection API of StorageInsightConfigs. */ + public StorageInsightConfigs storageInsightConfigs() { + if (this.storageInsightConfigs == null) { + this.storageInsightConfigs = new StorageInsightConfigsImpl(clientObject.getStorageInsightConfigs(), this); + } + return storageInsightConfigs; + } + + /** @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 ecb9e1ead6dc..bb9177200fb7 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,34 +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. - * - * @return the StorageInsightConfigsClient object. - */ - StorageInsightConfigsClient getStorageInsightConfigs(); - /** * Gets the SavedSearchesClient object to access its operations. * @@ -177,10 +135,45 @@ public interface OperationalInsightsManagementClient { */ WorkspacePurgesClient getWorkspacePurges(); + /** + * Gets the StorageInsightConfigsClient object to access its operations. + * + * @return the StorageInsightConfigsClient object. + */ + StorageInsightConfigsClient getStorageInsightConfigs(); + + /** + * 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/models/ClusterInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java index d5bc163290d3..ee49aaf477b7 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 97f0a3960707..cb29d54b9458 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 42a2262853f1..ff5401ba2e35 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/AvailableServiceTiersClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java index 6351619ef420..bc13a70f3d26 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,7 +115,7 @@ private Mono>> listByWorkspaceWithRespo this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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/ClusterImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java index 3cdde5a1e850..41c2c2511fa1 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 @@ -8,6 +8,9 @@ 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,6 +18,7 @@ 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 { @@ -55,10 +59,6 @@ public ClusterSku sku() { return this.innerModel().sku(); } - public String nextLink() { - return this.innerModel().nextLink(); - } - public String clusterId() { return this.innerModel().clusterId(); } @@ -67,10 +67,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()); } @@ -195,8 +228,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 +247,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 +272,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 8bed9d94b26d..79a0bf00d1fd 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)) @@ -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<>( @@ -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,7 +520,7 @@ private Mono>> createOrUpdateWithResponseAsync( .createOrUpdate( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), clusterName, parameters, @@ -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,7 +778,7 @@ private Mono>> deleteWithResponseAsync(String resource this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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,7 +1007,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, clusterName, accept, context)) @@ -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,7 +1164,7 @@ private Mono> updateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -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, 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 9bea08f4bf99..6fede98c8d26 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 @@ -30,22 +30,22 @@ public ClustersImpl(ClustersClient innerClient, LogAnalyticsManager serviceManag 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) { 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 e78a66c7e875..5a79f084191b 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,7 +170,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -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,7 +349,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -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,7 +535,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, accept, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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,7 +699,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataExportName, - this.client.getApiVersion(), + apiVersion, accept, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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 4efe7bdc4ff6..ad5037b8fa58 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 @@ -30,13 +30,13 @@ public DataExportsImpl(DataExportsClient innerClient, LogAnalyticsManager servic 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) { 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 6a285ef1c4f8..6ac34a85d6eb 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,7 +191,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -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,7 +376,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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,7 +529,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataSourceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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)) @@ -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) 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 56de2cdb12ec..4c0b942c933d 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 @@ -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) { 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 ef179d8630c1..4ea080826f77 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,17 +106,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<>( @@ -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)) @@ -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 f0299701d009..c1c36a3dbc47 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 @@ -28,22 +28,22 @@ public DeletedWorkspacesImpl(DeletedWorkspacesClient innerClient, LogAnalyticsMa 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() { 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 4c7018a55e71..a6d49fa05a38 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,7 +114,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, gatewayId, - this.client.getApiVersion(), + apiVersion, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } @@ -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/IntelligencePacksClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java index 56919c745037..9ade7f6c5eb2 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,7 +149,7 @@ private Mono> disableWithResponseAsync( resourceGroupName, workspaceName, intelligencePackName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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,7 +303,7 @@ private Mono> enableWithResponseAsync( resourceGroupName, workspaceName, intelligencePackName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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,7 +452,7 @@ private Mono>> listWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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/LinkedServicesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java index edbb020a3ace..717369a23fcf 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,7 +187,7 @@ private Mono>> createOrUpdateWithResponseAsync( workspaceName, linkedServiceName, this.client.getSubscriptionId(), - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -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,7 +487,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, workspaceName, linkedServiceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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,7 +749,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, linkedServiceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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)) @@ -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 cbed250a4951..dda7831566d8 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 @@ -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) { 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 bdc8ebbc0b77..a5e9e7ea0c09 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,7 +186,7 @@ private Mono> createOrUpdateWithRes workspaceName, dataSourceType, this.client.getSubscriptionId(), - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -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,7 +380,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, dataSourceType, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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,7 +533,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, dataSourceType, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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)) @@ -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 d21ac9a8e6ac..4e00d65bec46 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 @@ -68,14 +68,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) { 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 af667506ff33..545498c99807 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)) @@ -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 4fabe3f24812..7961b2f5da0f 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 @@ -28,13 +28,13 @@ public ManagementGroupsImpl(ManagementGroupsClient innerClient, LogAnalyticsMana 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() { 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 da9dfd6fdfcd..146ca21375e7 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,7 +111,7 @@ private Mono> getWithResponseAsync(String locatio this.client.getEndpoint(), location, asyncOperationId, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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/OperationalInsightsManagementClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientImpl.java index 14499fa6cd88..139753e4c10a 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,54 +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; - - /** - * Gets the StorageInsightConfigsClient object to access its operations. - * - * @return the StorageInsightConfigsClient object. - */ - public StorageInsightConfigsClient getStorageInsightConfigs() { - return this.storageInsightConfigs; - } - /** The SavedSearchesClient object to access its operations. */ private final SavedSearchesClient savedSearches; @@ -357,6 +285,42 @@ public WorkspacePurgesClient getWorkspacePurges() { return this.workspacePurges; } + /** The StorageInsightConfigsClient object to access its operations. */ + private final StorageInsightConfigsClient storageInsightConfigs; + + /** + * Gets the StorageInsightConfigsClient object to access its operations. + * + * @return the StorageInsightConfigsClient object. + */ + public StorageInsightConfigsClient getStorageInsightConfigs() { + return this.storageInsightConfigs; + } + + /** 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.storageInsightConfigs = new StorageInsightConfigsClientImpl(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 ba1f658144a9..21ad30229491 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<>( @@ -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<>( 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 c00a152761bf..a4713e538631 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 @@ -28,12 +28,12 @@ public OperationsImpl(OperationsClient innerClient, LogAnalyticsManager serviceM 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() { 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 eb35975d09b3..a049133788fe 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,7 +169,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); } @@ -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,7 +328,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -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,7 +514,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, savedSearchId, - this.client.getApiVersion(), + apiVersion, accept, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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,7 +672,7 @@ private Mono> listByWorkspaceWithResponse this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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/SchemasClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java index a5e6cc6ce7ca..f5fa4ab45527 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,7 +111,7 @@ private Mono> getWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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/SharedKeysOperationsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java index 736da36f9e6a..01fef27cf8c9 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,7 +128,7 @@ private Mono> getSharedKeysWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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,7 +281,7 @@ private Mono> regenerateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -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/StorageInsightConfigsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java index f0826c6fe1ce..f0a82b7f1648 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-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -190,7 +191,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -246,6 +247,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 @@ -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-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -377,7 +380,7 @@ private Mono> getWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -422,6 +425,7 @@ private Mono> getWithResponseAsync( 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 @@ -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-10-01"; return FluxUtil .withContext( context -> @@ -541,7 +546,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, workspaceName, storageInsightName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), context)) .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); @@ -585,6 +590,7 @@ private Mono> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String apiVersion = "2020-10-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-10-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)) @@ -737,6 +744,7 @@ private Mono> listByWorkspaceSinglePageAsync( 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 @@ -744,7 +752,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/StorageInsightConfigsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java index fd7d4991897f..ae61fb857b5e 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 @@ -64,14 +64,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) { 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 5e53ca19cfd5..fabc4c048cfc 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 @@ -34,6 +34,18 @@ 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; } 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 d5288c8f4ad7..aab0eefe7a71 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,7 +152,7 @@ private Mono> listByWorkspaceSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -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,7 +329,7 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, tableName, parameters, accept, @@ -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,7 +505,7 @@ private Mono> getWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, tableName, accept, context)) @@ -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 23b880a3364e..e6480fa8a0cb 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 @@ -30,13 +30,13 @@ public TablesImpl(TablesClient innerClient, LogAnalyticsManager 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) { 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 dce15f137264..aa3e071cb617 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)) @@ -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 427bdeb9fb00..5af596b1a3f1 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 @@ -28,12 +28,12 @@ public UsagesImpl(UsagesClient innerClient, LogAnalyticsManager 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() { 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 9db3c0d5eb6c..7f6dcfb308e1 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.Mono; final class Utils { static String getValueFromIdByName(String id, String name) { @@ -64,4 +72,125 @@ 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 pageIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pageIterable, Function mapper) { + super(new PagedFlux(Mono::empty)); + this.pageIterable = pageIterable; + this.mapper = mapper; + this.pageMapper = + 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 pageIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pageIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pageIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pageIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pageIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl(pageIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl, PagedResponse>(pageIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pageIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pageIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pageIterable.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 82fc5468c0eb..4604bed98ae9 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 @@ -73,6 +73,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 +89,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 +102,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()); } @@ -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/WorkspacePurgesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java index 6d66e06f8535..91f5acb587a8 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,7 +144,7 @@ private Mono purgeWithResponseAsync( .purge( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), workspaceName, body, @@ -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, @@ -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,7 +331,7 @@ private Mono> getPurgeStatusWithResp .getPurgeStatus( this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), workspaceName, purgeId, @@ -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/WorkspacesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java index dfd42aed7efc..77db6ecc56c9 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,17 +179,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<>( @@ -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)) @@ -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,7 +478,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -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,9 +740,10 @@ 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()))); } @@ -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,7 +1049,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), accept, context)) @@ -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,7 +1206,7 @@ private Mono> updateWithResponseAsync( this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), + apiVersion, this.client.getSubscriptionId(), parameters, accept, @@ -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 17c45bab455c..a3eeb9992594 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 @@ -30,22 +30,22 @@ public WorkspacesImpl(WorkspacesClient innerClient, LogAnalyticsManager serviceM 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) { 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 000000000000..5cc05a8a3d2b --- /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 000000000000..f57053a49627 --- /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 000000000000..9ef5d139842b --- /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 6cd5fe991175..2bd890b8d89d 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 34be5ae9d38f..da1a2ae558da 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 2115f49ea7fa..b46323e664d0 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 457f03780ba3..b8566c9eb059 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 ac2c6827af82..3a6d9052ff47 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/StorageAccount.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageAccount.java index dc42fad94921..59c3b4886bb7 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageAccount.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageAccount.java @@ -17,52 +17,26 @@ public final class StorageAccount { /* * The Azure Resource Manager ID of the storage account resource. */ - @JsonProperty(value = "id", required = true) - private String id; - - /* - * The storage account key. - */ - @JsonProperty(value = "key", required = true) - private String key; - - /** - * Get the id property: The Azure Resource Manager ID of the storage account resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The Azure Resource Manager ID of the storage account resource. - * - * @param id the id value to set. - * @return the StorageAccount object itself. - */ - public StorageAccount withId(String id) { - this.id = id; - return this; - } + @JsonProperty(value = "resourceId", required = true) + private String resourceId; /** - * Get the key property: The storage account key. + * Get the resourceId property: The Azure Resource Manager ID of the storage account resource. * - * @return the key value. + * @return the resourceId value. */ - public String key() { - return this.key; + public String resourceId() { + return this.resourceId; } /** - * Set the key property: The storage account key. + * Set the resourceId property: The Azure Resource Manager ID of the storage account resource. * - * @param key the key value to set. + * @param resourceId the resourceId value to set. * @return the StorageAccount object itself. */ - public StorageAccount withKey(String key) { - this.key = key; + public StorageAccount withResourceId(String resourceId) { + this.resourceId = resourceId; return this; } @@ -72,15 +46,10 @@ public StorageAccount withKey(String key) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (id() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model StorageAccount")); - } - if (key() == null) { + if (resourceId() == null) { throw logger .logExceptionAsError( - new IllegalArgumentException("Missing required property key in model StorageAccount")); + new IllegalArgumentException("Missing required property resourceId in model StorageAccount")); } } } 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 c4a2fa65b8f6..44c69cf3d79a 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 000000000000..09534dfdca5a --- /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 3fa7e9ee11f1..44ce1350abae 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 e278476f35ad..c1d0c35e8ed3 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 2575a89325a3..8c25c5246f10 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