diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/pom.xml b/sdk/loganalytics/mgmt-v2020_03_01_preview/pom.xml index c8cd69aea31f..d549de3cc484 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/pom.xml +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/pom.xml @@ -11,8 +11,8 @@ com.microsoft.azure azure-arm-parent - 1.3.2 - ../../parents/azure-arm-parent/pom.xml + 1.1.0 + ../../../pom.management.xml azure-mgmt-loganalytics 1.0.0-beta diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataCollectorLog.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataCollectorLog.java new file mode 100644 index 000000000000..6376866e499d --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataCollectorLog.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_03_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.implementation.DataCollectorLogInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.implementation.LogAnalyticsManager; + +/** + * Type representing DataCollectorLog. + */ +public interface DataCollectorLog extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the dataCollectorLogName value. + */ + String dataCollectorLogName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataCollectorLogs.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataCollectorLogs.java new file mode 100644 index 000000000000..5971e99547a1 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataCollectorLogs.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_03_01_preview; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.implementation.DataCollectorLogsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DataCollectorLogs. + */ +public interface DataCollectorLogs extends HasInner { + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String tableName); + + /** + * Listing all data collector log tables, being created via data collector endpoint and scoped to the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName); + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workspaceName, String tableName); + +} diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataExport.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataExport.java index 10db33da1626..a8d095a9bf22 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataExport.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataExport.java @@ -23,11 +23,6 @@ * Type representing DataExport. */ public interface DataExport extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the allTables value. - */ - Boolean allTables(); - /** * @return the createdDate value. */ @@ -124,18 +119,6 @@ interface WithResourceId { WithCreate withResourceId(String resourceId); } - /** - * The stage of the dataexport definition allowing to specify AllTables. - */ - interface WithAllTables { - /** - * Specifies allTables. - * @param allTables When ‘true’, all workspace's tables are exported - * @return the next definition stage - */ - WithCreate withAllTables(Boolean allTables); - } - /** * The stage of the dataexport definition allowing to specify CreatedDate. */ @@ -213,31 +196,19 @@ interface WithTableNames { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithAllTables, DefinitionStages.WithCreatedDate, DefinitionStages.WithDataExportId, DefinitionStages.WithEnable, DefinitionStages.WithEventHubName, DefinitionStages.WithLastModifiedDate, DefinitionStages.WithTableNames { + interface WithCreate extends Creatable, DefinitionStages.WithCreatedDate, DefinitionStages.WithDataExportId, DefinitionStages.WithEnable, DefinitionStages.WithEventHubName, DefinitionStages.WithLastModifiedDate, DefinitionStages.WithTableNames { } } /** * The template for a DataExport update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithAllTables, UpdateStages.WithCreatedDate, UpdateStages.WithDataExportId, UpdateStages.WithEnable, UpdateStages.WithEventHubName, UpdateStages.WithLastModifiedDate, UpdateStages.WithTableNames { + interface Update extends Appliable, UpdateStages.WithCreatedDate, UpdateStages.WithDataExportId, UpdateStages.WithEnable, UpdateStages.WithEventHubName, UpdateStages.WithLastModifiedDate, UpdateStages.WithTableNames { } /** * Grouping of DataExport update stages. */ interface UpdateStages { - /** - * The stage of the dataexport update allowing to specify AllTables. - */ - interface WithAllTables { - /** - * Specifies allTables. - * @param allTables When ‘true’, all workspace's tables are exported - * @return the next update stage - */ - Update withAllTables(Boolean allTables); - } - /** * The stage of the dataexport update allowing to specify CreatedDate. */ diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataSourceType.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataSourceType.java index 23e1a47696ef..5f6ae6b6a6f1 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataSourceType.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/DataSourceType.java @@ -19,7 +19,16 @@ public enum DataSourceType { CUSTOM_LOGS("CustomLogs"), /** Enum value AzureWatson. */ - AZURE_WATSON("AzureWatson"); + AZURE_WATSON("AzureWatson"), + + /** Enum value Query. */ + QUERY("Query"), + + /** Enum value Ingestion. */ + INGESTION("Ingestion"), + + /** Enum value Alerts. */ + ALERTS("Alerts"); /** The actual serialized value for a DataSourceType instance. */ private String value; diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/LinkedStorageAccounts.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/LinkedStorageAccounts.java index 06d2dba268af..18bb06a5a2d1 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/LinkedStorageAccounts.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/LinkedStorageAccounts.java @@ -23,7 +23,7 @@ public interface LinkedStorageAccounts extends SupportsCreating implements DataCollectorLog { + private final LogAnalyticsManager manager; + private String resourceGroupName; + private String workspaceName; + private String tableName; + + DataCollectorLogImpl(DataCollectorLogInner inner, LogAnalyticsManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.tableName = IdParsingUtils.getValueFromIdByName(inner.id(), "dataCollectorLogs"); + } + + @Override + public LogAnalyticsManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DataCollectorLogsInner client = this.manager().inner().dataCollectorLogs(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.tableName); + } + + + + @Override + public String dataCollectorLogName() { + return this.inner().dataCollectorLogName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogInner.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogInner.java new file mode 100644 index 000000000000..1b018299b162 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogInner.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_03_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Data collector log top level resource container. + */ +@JsonFlatten +public class DataCollectorLogInner extends ProxyResource { + /** + * Table's name. + */ + @JsonProperty(value = "properties.name") + private String dataCollectorLogName; + + /** + * Get table's name. + * + * @return the dataCollectorLogName value + */ + public String dataCollectorLogName() { + return this.dataCollectorLogName; + } + + /** + * Set table's name. + * + * @param dataCollectorLogName the dataCollectorLogName value to set + * @return the DataCollectorLogInner object itself. + */ + public DataCollectorLogInner withDataCollectorLogName(String dataCollectorLogName) { + this.dataCollectorLogName = dataCollectorLogName; + return this; + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogsImpl.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogsImpl.java new file mode 100644 index 000000000000..48810dc660b5 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogsImpl.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.loganalytics.v2020_03_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataCollectorLogs; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataCollectorLog; + +class DataCollectorLogsImpl extends WrapperImpl implements DataCollectorLogs { + private final LogAnalyticsManager manager; + + DataCollectorLogsImpl(LogAnalyticsManager manager) { + super(manager.inner().dataCollectorLogs()); + this.manager = manager; + } + + public LogAnalyticsManager manager() { + return this.manager; + } + + private DataCollectorLogImpl wrapModel(DataCollectorLogInner inner) { + return new DataCollectorLogImpl(inner, manager()); + } + + @Override + public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + DataCollectorLogsInner client = this.inner(); + return client.listByWorkspaceAsync(resourceGroupName, workspaceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public DataCollectorLog call(DataCollectorLogInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String tableName) { + DataCollectorLogsInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, tableName) + .flatMap(new Func1>() { + @Override + public Observable call(DataCollectorLogInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DataCollectorLog)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String workspaceName, String tableName) { + DataCollectorLogsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workspaceName, tableName).toCompletable(); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogsInner.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogsInner.java new file mode 100644 index 000000000000..606778a9a0a5 --- /dev/null +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataCollectorLogsInner.java @@ -0,0 +1,527 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.loganalytics.v2020_03_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.ErrorContractException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DataCollectorLogs. + */ +public class DataCollectorLogsInner { + /** The Retrofit service to perform REST calls. */ + private DataCollectorLogsService service; + /** The service client containing this operation class. */ + private OperationalInsightsManagementClientImpl client; + + /** + * Initializes an instance of DataCollectorLogsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DataCollectorLogsInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) { + this.service = retrofit.create(DataCollectorLogsService.class); + this.client = client; + } + + /** + * The interface defining all the services for DataCollectorLogs to be + * used by Retrofit to perform actually REST calls. + */ + interface DataCollectorLogsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataCollectorLogs delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs/{tableName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("tableName") String tableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("force") Boolean force, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataCollectorLogs get" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs/{tableName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("tableName") String tableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("force") Boolean force, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataCollectorLogs listByWorkspace" }) + @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs") + Observable> listByWorkspace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, String tableName) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).toBlocking().single().body(); + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String tableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, tableName), serviceCallback); + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String tableName) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String tableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean force = null; + return service.delete(resourceGroupName, workspaceName, tableName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String workspaceName, String tableName, Boolean force) { + deleteWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, force).toBlocking().single().body(); + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String workspaceName, String tableName, Boolean force, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, force), serviceCallback); + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workspaceName, String tableName, Boolean force) { + return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, force).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String tableName, Boolean force) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, workspaceName, tableName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ErrorContractException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorContractException.class) + .build(response); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataCollectorLogInner object if successful. + */ + public DataCollectorLogInner get(String resourceGroupName, String workspaceName, String tableName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).toBlocking().single().body(); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String tableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName), serviceCallback); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataCollectorLogInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String tableName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName).map(new Func1, DataCollectorLogInner>() { + @Override + public DataCollectorLogInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataCollectorLogInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String tableName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean force = null; + return service.get(resourceGroupName, workspaceName, tableName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataCollectorLogInner object if successful. + */ + public DataCollectorLogInner get(String resourceGroupName, String workspaceName, String tableName, Boolean force) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, force).toBlocking().single().body(); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String tableName, Boolean force, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, force), serviceCallback); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataCollectorLogInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String tableName, Boolean force) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, tableName, force).map(new Func1, DataCollectorLogInner>() { + @Override + public DataCollectorLogInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves a specify data collector log table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName DataCollector table name. + * @param force When true, enables bypassing retention validation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataCollectorLogInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String tableName, Boolean force) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, workspaceName, tableName, this.client.subscriptionId(), this.client.apiVersion(), force, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorContractException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorContractException.class) + .build(response); + } + + /** + * Listing all data collector log tables, being created via data collector endpoint and scoped to the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorContractException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<DataCollectorLogInner> object if successful. + */ + public List listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); + } + + /** + * Listing all data collector log tables, being created via data collector endpoint and scoped to the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByWorkspaceAsync(String resourceGroupName, String workspaceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); + } + + /** + * Listing all data collector log tables, being created via data collector endpoint and scoped to the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataCollectorLogInner> object + */ + public Observable> listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Listing all data collector log tables, being created via data collector endpoint and scoped to the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataCollectorLogInner> object + */ + public Observable>> listByWorkspaceWithServiceResponseAsync(String resourceGroupName, String workspaceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByWorkspace(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByWorkspaceDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByWorkspaceDelegate(Response response) throws ErrorContractException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorContractException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorContractException.class) + .build(response); + } + +} diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportImpl.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportImpl.java index 3e1ff39a1f76..8298594e3bf5 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportImpl.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportImpl.java @@ -71,11 +71,6 @@ public boolean isInCreateMode() { } - @Override - public Boolean allTables() { - return this.inner().allTables(); - } - @Override public String createdDate() { return this.inner().createdDate(); @@ -144,12 +139,6 @@ public DataExportImpl withResourceId(String resourceId) { return this; } - @Override - public DataExportImpl withAllTables(Boolean allTables) { - this.inner().withAllTables(allTables); - return this; - } - @Override public DataExportImpl withCreatedDate(String createdDate) { this.inner().withCreatedDate(createdDate); diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportInner.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportInner.java index c927ba6efaca..0aae852a68e6 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportInner.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/DataExportInner.java @@ -25,12 +25,6 @@ public class DataExportInner extends ProxyResource { @JsonProperty(value = "properties.dataExportId") private String dataExportId; - /** - * When ‘true’, all workspace's tables are exported. - */ - @JsonProperty(value = "properties.allTables") - private Boolean allTables; - /** * An array of tables to export, for example: [“Heartbeat, SecurityEvent”]. */ @@ -96,26 +90,6 @@ public DataExportInner withDataExportId(String dataExportId) { return this; } - /** - * Get when ‘true’, all workspace's tables are exported. - * - * @return the allTables value - */ - public Boolean allTables() { - return this.allTables; - } - - /** - * Set when ‘true’, all workspace's tables are exported. - * - * @param allTables the allTables value to set - * @return the DataExportInner object itself. - */ - public DataExportInner withAllTables(Boolean allTables) { - this.allTables = allTables; - return this; - } - /** * Get an array of tables to export, for example: [“Heartbeat, SecurityEvent”]. * diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/GatewaysImpl.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/GatewaysImpl.java index ca17018ad2f9..91cd92670935 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/GatewaysImpl.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/GatewaysImpl.java @@ -11,7 +11,6 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.Gateways; -import rx.Completable; class GatewaysImpl extends WrapperImpl implements Gateways { private final LogAnalyticsManager manager; @@ -25,8 +24,4 @@ public LogAnalyticsManager manager() { return this.manager; } - @Override - public Completable deleteAsync(String resourceGroupName, String workspaceName, String gatewayId) { - return manager().gateways().deleteAsync(resourceGroupName, workspaceName, gatewayId); - } } diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsImpl.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsImpl.java index 35561441b8ee..142a1a3eb8d2 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsImpl.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsImpl.java @@ -10,7 +10,6 @@ package com.microsoft.azure.management.loganalytics.v2020_03_01_preview.implementation; import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataSourceType; import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.LinkedStorageAccounts; import rx.Completable; import rx.Observable; diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsInner.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsInner.java index 9d2da1672589..cbe8e86d1dcc 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsInner.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedStorageAccountsInner.java @@ -80,7 +80,7 @@ interface LinkedStorageAccountsService { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -95,7 +95,7 @@ public LinkedStorageAccountsResourceInner createOrUpdate(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -109,7 +109,7 @@ public ServiceFuture createOrUpdateAsync(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the LinkedStorageAccountsResourceInner object */ @@ -127,7 +127,7 @@ public LinkedStorageAccountsResourceInner call(ServiceResponse> call(Resp * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param storageAccountIds Linked storage accounts resources ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -185,7 +185,7 @@ public LinkedStorageAccountsResourceInner createOrUpdate(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param storageAccountIds Linked storage accounts resources ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -200,7 +200,7 @@ public ServiceFuture createOrUpdateAsync(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param storageAccountIds Linked storage accounts resources ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the LinkedStorageAccountsResourceInner object @@ -219,7 +219,7 @@ public LinkedStorageAccountsResourceInner call(ServiceResponse createOrUpdateDelega * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -283,7 +283,7 @@ public void delete(String resourceGroupName, String workspaceName, DataSourceTyp * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -297,7 +297,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String workspac * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ @@ -315,7 +315,7 @@ public Void call(ServiceResponse response) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ @@ -361,7 +361,7 @@ private ServiceResponse deleteDelegate(Response response) th * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -376,7 +376,7 @@ public LinkedStorageAccountsResourceInner get(String resourceGroupName, String w * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -390,7 +390,7 @@ public ServiceFuture getAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the LinkedStorageAccountsResourceInner object */ @@ -408,7 +408,7 @@ public LinkedStorageAccountsResourceInner call(ServiceResponse storageAccountIds; /** - * Get linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson'. + * Get linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts'. * * @return the dataSourceType value */ diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LogAnalyticsManager.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LogAnalyticsManager.java index 92c8b304288b..f8e01474cf58 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LogAnalyticsManager.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LogAnalyticsManager.java @@ -18,6 +18,7 @@ import com.microsoft.rest.RestClient; import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataExports; import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataSources; +import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.DataCollectorLogs; import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.IntelligencePacks; import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.LinkedServices; import com.microsoft.azure.management.loganalytics.v2020_03_01_preview.LinkedStorageAccounts; @@ -45,6 +46,7 @@ public final class LogAnalyticsManager extends ManagerCore { private DataExports dataExports; private DataSources dataSources; + private DataCollectorLogs dataCollectorLogs; private IntelligencePacks intelligencePacks; private LinkedServices linkedServices; private LinkedStorageAccounts linkedStorageAccounts; @@ -130,6 +132,16 @@ public DataSources dataSources() { return this.dataSources; } + /** + * @return Entry point to manage DataCollectorLogs. + */ + public DataCollectorLogs dataCollectorLogs() { + if (this.dataCollectorLogs == null) { + this.dataCollectorLogs = new DataCollectorLogsImpl(this); + } + return this.dataCollectorLogs; + } + /** * @return Entry point to manage IntelligencePacks. */ diff --git a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/OperationalInsightsManagementClientImpl.java b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/OperationalInsightsManagementClientImpl.java index bcb82c481204..e336252b06ce 100644 --- a/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/OperationalInsightsManagementClientImpl.java +++ b/sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/OperationalInsightsManagementClientImpl.java @@ -158,6 +158,19 @@ public DataSourcesInner dataSources() { return this.dataSources; } + /** + * The DataCollectorLogsInner object to access its operations. + */ + private DataCollectorLogsInner dataCollectorLogs; + + /** + * Gets the DataCollectorLogsInner object to access its operations. + * @return the DataCollectorLogsInner object. + */ + public DataCollectorLogsInner dataCollectorLogs() { + return this.dataCollectorLogs; + } + /** * The IntelligencePacksInner object to access its operations. */ @@ -429,6 +442,7 @@ protected void initialize() { this.generateClientRequestId = true; this.dataExports = new DataExportsInner(restClient().retrofit(), this); this.dataSources = new DataSourcesInner(restClient().retrofit(), this); + this.dataCollectorLogs = new DataCollectorLogsInner(restClient().retrofit(), this); this.intelligencePacks = new IntelligencePacksInner(restClient().retrofit(), this); this.linkedServices = new LinkedServicesInner(restClient().retrofit(), this); this.linkedStorageAccounts = new LinkedStorageAccountsInner(restClient().retrofit(), this);