Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/loganalytics/mgmt-v2020_03_01_preview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.3.2</version>
<relativePath>../../parents/azure-arm-parent/pom.xml</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-loganalytics</artifactId>
<version>1.0.0-beta</version>
Expand Down
Original file line number Diff line number Diff line change
@@ -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<DataCollectorLogInner>, Indexable, Refreshable<DataCollectorLog>, HasManager<LogAnalyticsManager> {
/**
* @return the dataCollectorLogName value.
*/
String dataCollectorLogName();

/**
* @return the id value.
*/
String id();

/**
* @return the name value.
*/
String name();

/**
* @return the type value.
*/
String type();

}
Original file line number Diff line number Diff line change
@@ -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<DataCollectorLogsInner> {
/**
* 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<DataCollectorLog> 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<DataCollectorLog> 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);

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
* Type representing DataExport.
*/
public interface DataExport extends HasInner<DataExportInner>, Indexable, Refreshable<DataExport>, Updatable<DataExport.Update>, HasManager<LogAnalyticsManager> {
/**
* @return the allTables value.
*/
Boolean allTables();

/**
* @return the createdDate value.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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<DataExport>, DefinitionStages.WithAllTables, DefinitionStages.WithCreatedDate, DefinitionStages.WithDataExportId, DefinitionStages.WithEnable, DefinitionStages.WithEventHubName, DefinitionStages.WithLastModifiedDate, DefinitionStages.WithTableNames {
interface WithCreate extends Creatable<DataExport>, 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<DataExport>, UpdateStages.WithAllTables, UpdateStages.WithCreatedDate, UpdateStages.WithDataExportId, UpdateStages.WithEnable, UpdateStages.WithEventHubName, UpdateStages.WithLastModifiedDate, UpdateStages.WithTableNames {
interface Update extends Appliable<DataExport>, 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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface LinkedStorageAccounts extends SupportsCreating<LinkedStorageAcc
*
* @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 for the request
*/
Expand All @@ -44,7 +44,7 @@ public interface LinkedStorageAccounts extends SupportsCreating<LinkedStorageAcc
*
* @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 for the request
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* 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.management.loganalytics.v2020_03_01_preview.DataCollectorLog;
import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
import rx.Observable;

class DataCollectorLogImpl extends IndexableRefreshableWrapperImpl<DataCollectorLog, DataCollectorLogInner> 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<DataCollectorLogInner> 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();
}

}
Original file line number Diff line number Diff line change
@@ -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;
}

}
Original file line number Diff line number Diff line change
@@ -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<DataCollectorLogsInner> 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<DataCollectorLog> listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
DataCollectorLogsInner client = this.inner();
return client.listByWorkspaceAsync(resourceGroupName, workspaceName)
.flatMap(new Func1<List<DataCollectorLogInner>, Observable<DataCollectorLogInner>>() {
@Override
public Observable<DataCollectorLogInner> call(List<DataCollectorLogInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<DataCollectorLogInner, DataCollectorLog>() {
@Override
public DataCollectorLog call(DataCollectorLogInner inner) {
return wrapModel(inner);
}
});
}

@Override
public Observable<DataCollectorLog> getAsync(String resourceGroupName, String workspaceName, String tableName) {
DataCollectorLogsInner client = this.inner();
return client.getAsync(resourceGroupName, workspaceName, tableName)
.flatMap(new Func1<DataCollectorLogInner, Observable<DataCollectorLog>>() {
@Override
public Observable<DataCollectorLog> 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();
}

}
Loading