Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR sdk/kusto/mgmt-v2019_11_09] Kusto: Update 2020-09-18 version tag #16208

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/kusto/mgmt-v2019_11_09/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.2.0</version>
<relativePath>../../parents/azure-arm-parent</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-kusto</artifactId>
<version>1.0.0-beta</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* <p>
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* def
*/
Expand All @@ -14,26 +14,22 @@
import com.microsoft.azure.management.kusto.v2019_11_09.Cluster;
import rx.Observable;
import rx.Completable;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

import com.microsoft.azure.arm.resources.ResourceUtilsCore;
import com.microsoft.azure.arm.utils.RXMapper;
import rx.functions.Func1;
import com.microsoft.azure.PagedList;
import com.microsoft.azure.Page;

import java.util.List;

import com.microsoft.azure.management.kusto.v2019_11_09.FollowerDatabaseDefinition;
import com.microsoft.azure.management.kusto.v2019_11_09.DiagnoseVirtualNetworkResult;
import com.microsoft.azure.management.kusto.v2019_11_09.CheckNameResult;
import com.microsoft.azure.management.kusto.v2019_11_09.AzureResourceSku;
import com.microsoft.azure.management.kusto.v2019_11_09.SkuDescription;

class ClustersImpl extends GroupableResourcesCoreImpl<Cluster, ClusterImpl, ClusterInner, ClustersInner, KustoManager> implements Clusters {
class ClustersImpl extends GroupableResourcesCoreImpl<Cluster, ClusterImpl, ClusterInner, ClustersInner, KustoManager> implements Clusters {
protected ClustersImpl(KustoManager manager) {
super(manager.inner().clusters(), manager);
}
Expand Down Expand Up @@ -66,7 +62,7 @@ public Observable<String> deleteByIdsAsync(Collection<String> ids) {
}

@Override
public Observable<String> deleteByIdsAsync(String... ids) {
public Observable<String> deleteByIdsAsync(String...ids) {
return this.deleteByIdsAsync(new ArrayList<String>(Arrays.asList(ids)));
}

Expand All @@ -78,7 +74,7 @@ public void deleteByIds(Collection<String> ids) {
}

@Override
public void deleteByIds(String... ids) {
public void deleteByIds(String...ids) {
this.deleteByIds(new ArrayList<String>(Arrays.asList(ids)));
}

Expand All @@ -92,18 +88,18 @@ public PagedList<Cluster> listByResourceGroup(String resourceGroupName) {
public Observable<Cluster> listByResourceGroupAsync(String resourceGroupName) {
ClustersInner client = this.inner();
return client.listByResourceGroupAsync(resourceGroupName)
.flatMap(new Func1<Page<ClusterInner>, Observable<ClusterInner>>() {
@Override
public Observable<ClusterInner> call(Page<ClusterInner> innerPage) {
return Observable.from(innerPage.items());
}
})
.map(new Func1<ClusterInner, Cluster>() {
@Override
public Cluster call(ClusterInner inner) {
return wrapModel(inner);
}
});
.flatMap(new Func1<Page<ClusterInner>, Observable<ClusterInner>>() {
@Override
public Observable<ClusterInner> call(Page<ClusterInner> innerPage) {
return Observable.from(innerPage.items());
}
})
.map(new Func1<ClusterInner, Cluster>() {
@Override
public Cluster call(ClusterInner inner) {
return wrapModel(inner);
}
});
}

@Override
Expand All @@ -116,18 +112,18 @@ public PagedList<Cluster> list() {
public Observable<Cluster> listAsync() {
ClustersInner client = this.inner();
return client.listAsync()
.flatMap(new Func1<Page<ClusterInner>, Observable<ClusterInner>>() {
@Override
public Observable<ClusterInner> call(Page<ClusterInner> innerList) {
return Observable.from(innerList.items());
}
})
.map(new Func1<ClusterInner, Cluster>() {
@Override
public Cluster call(ClusterInner inner) {
return wrapModel(inner);
}
});
.flatMap(new Func1<List<ClusterInner>, Observable<ClusterInner>>() {
@Override
public Observable<ClusterInner> call(List<ClusterInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<ClusterInner, Cluster>() {
@Override
public Cluster call(ClusterInner inner) {
return wrapModel(inner);
}
});
}

@Override
Expand All @@ -151,18 +147,18 @@ public Completable startAsync(String resourceGroupName, String clusterName) {
public Observable<FollowerDatabaseDefinition> listFollowerDatabasesAsync(String resourceGroupName, String clusterName) {
ClustersInner client = this.inner();
return client.listFollowerDatabasesAsync(resourceGroupName, clusterName)
.flatMap(new Func1<List<FollowerDatabaseDefinitionInner>, Observable<FollowerDatabaseDefinitionInner>>() {
@Override
public Observable<FollowerDatabaseDefinitionInner> call(List<FollowerDatabaseDefinitionInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<FollowerDatabaseDefinitionInner, FollowerDatabaseDefinition>() {
@Override
public FollowerDatabaseDefinition call(FollowerDatabaseDefinitionInner inner) {
return new FollowerDatabaseDefinitionImpl(inner, manager());
}
});
.flatMap(new Func1<List<FollowerDatabaseDefinitionInner>, Observable<FollowerDatabaseDefinitionInner>>() {
@Override
public Observable<FollowerDatabaseDefinitionInner> call(List<FollowerDatabaseDefinitionInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<FollowerDatabaseDefinitionInner, FollowerDatabaseDefinition>() {
@Override
public FollowerDatabaseDefinition call(FollowerDatabaseDefinitionInner inner) {
return new FollowerDatabaseDefinitionImpl(inner, manager());
}
});
}

@Override
Expand All @@ -175,17 +171,17 @@ public Completable detachFollowerDatabasesAsync(String resourceGroupName, String
public Observable<DiagnoseVirtualNetworkResult> diagnoseVirtualNetworkAsync(String resourceGroupName, String clusterName) {
ClustersInner client = this.inner();
return client.diagnoseVirtualNetworkAsync(resourceGroupName, clusterName)
.map(new Func1<DiagnoseVirtualNetworkResultInner, DiagnoseVirtualNetworkResult>() {
@Override
public DiagnoseVirtualNetworkResult call(DiagnoseVirtualNetworkResultInner inner) {
return new DiagnoseVirtualNetworkResultImpl(inner, manager());
}
});
.map(new Func1<DiagnoseVirtualNetworkResultInner, DiagnoseVirtualNetworkResult>() {
@Override
public DiagnoseVirtualNetworkResult call(DiagnoseVirtualNetworkResultInner inner) {
return new DiagnoseVirtualNetworkResultImpl(inner, manager());
}
});
}

@Override
protected ClusterImpl wrapModel(ClusterInner inner) {
return new ClusterImpl(inner.name(), inner, manager());
return new ClusterImpl(inner.name(), inner, manager());
}

@Override
Expand All @@ -194,55 +190,55 @@ protected ClusterImpl wrapModel(String name) {
}

private AzureResourceSkuImpl wrapAzureResourceSkuModel(AzureResourceSkuInner inner) {
return new AzureResourceSkuImpl(inner, manager());
return new AzureResourceSkuImpl(inner, manager());
}

@Override
public Observable<CheckNameResult> checkNameAvailabilityAsync(String location, String name) {
ClustersInner client = this.inner();
return client.checkNameAvailabilityAsync(location, name)
.map(new Func1<CheckNameResultInner, CheckNameResult>() {
@Override
public CheckNameResult call(CheckNameResultInner inner) {
return new CheckNameResultImpl(inner, manager());
}
});
.map(new Func1<CheckNameResultInner, CheckNameResult>() {
@Override
public CheckNameResult call(CheckNameResultInner inner) {
return new CheckNameResultImpl(inner, manager());
}
});
}

@Override
public Observable<AzureResourceSku> listSkusByResourceAsync(String resourceGroupName, String clusterName) {
ClustersInner client = this.inner();
return client.listSkusByResourceAsync(resourceGroupName, clusterName)
.flatMap(new Func1<List<AzureResourceSkuInner>, Observable<AzureResourceSkuInner>>() {
@Override
public Observable<AzureResourceSkuInner> call(List<AzureResourceSkuInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<AzureResourceSkuInner, AzureResourceSku>() {
@Override
public AzureResourceSku call(AzureResourceSkuInner inner) {
return wrapAzureResourceSkuModel(inner);
}
});
.flatMap(new Func1<List<AzureResourceSkuInner>, Observable<AzureResourceSkuInner>>() {
@Override
public Observable<AzureResourceSkuInner> call(List<AzureResourceSkuInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<AzureResourceSkuInner, AzureResourceSku>() {
@Override
public AzureResourceSku call(AzureResourceSkuInner inner) {
return wrapAzureResourceSkuModel(inner);
}
});
}

@Override
public Observable<SkuDescription> listSkusAsync() {
ClustersInner client = this.inner();
return client.listSkusAsync()
.flatMap(new Func1<List<SkuDescriptionInner>, Observable<SkuDescriptionInner>>() {
@Override
public Observable<SkuDescriptionInner> call(List<SkuDescriptionInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<SkuDescriptionInner, SkuDescription>() {
@Override
public SkuDescription call(SkuDescriptionInner inner) {
return new SkuDescriptionImpl(inner, manager());
}
});
.flatMap(new Func1<List<SkuDescriptionInner>, Observable<SkuDescriptionInner>>() {
@Override
public Observable<SkuDescriptionInner> call(List<SkuDescriptionInner> innerList) {
return Observable.from(innerList);
}
})
.map(new Func1<SkuDescriptionInner, SkuDescription>() {
@Override
public SkuDescription call(SkuDescriptionInner inner) {
return new SkuDescriptionImpl(inner, manager());
}
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,6 @@ private ServiceResponse<PageImpl<ClusterInner>> listByResourceGroupDelegate(Resp
.build(response);
}


/**
* Lists all Kusto clusters within a subscription.
*
Expand All @@ -1561,16 +1560,8 @@ private ServiceResponse<PageImpl<ClusterInner>> listByResourceGroupDelegate(Resp
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the List&lt;ClusterInner&gt; object if successful.
*/
public PagedList<ClusterInner> list() {
PageImpl<ClusterInner> page = new PageImpl<>();
page.setItems(listWithServiceResponseAsync().toBlocking().single().body());
page.setNextPageLink(null);
return new PagedList<ClusterInner>(page) {
@Override
public Page<ClusterInner> nextPage(String nextPageLink) {
return null;
}
};
public List<ClusterInner> list() {
return listWithServiceResponseAsync().toBlocking().single().body();
}

/**
Expand All @@ -1590,12 +1581,11 @@ public ServiceFuture<List<ClusterInner>> listAsync(final ServiceCallback<List<Cl
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List&lt;ClusterInner&gt; object
*/
public Observable<Page<ClusterInner>> listAsync() {
return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<ClusterInner>>, Page<ClusterInner>>() {
public Page<ClusterInner> call(ServiceResponse<List<ClusterInner>> response) {
PageImpl<ClusterInner> page = new PageImpl<>();
page.setItems(response.body());
return page;
public Observable<List<ClusterInner>> listAsync() {
return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<ClusterInner>>, List<ClusterInner>>() {
@Override
public List<ClusterInner> call(ServiceResponse<List<ClusterInner>> response) {
return response.body();
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.microsoft.azure.ProxyResource;
import com.microsoft.azure.management.kusto.v2019_11_09.EventGridDataConnection;
import com.microsoft.azure.management.kusto.v2019_11_09.EventHubDataConnection;
import com.microsoft.azure.management.kusto.v2019_11_09.IotHubDataConnection;

/**
* Class representing an data connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.microsoft.azure.ProxyResource;
import com.microsoft.azure.management.kusto.v2019_11_09.ReadOnlyFollowingDatabase;
import com.microsoft.azure.management.kusto.v2019_11_09.ReadWriteDatabase;

/**
* Class representing a Kusto database.
Expand Down