Skip to content

Commit

Permalink
CodeGen from PR 32276 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c7fb6c841c27fd4f6cba7f2565ae87dd19b23a99 into 3a17b429e962d7a1a01c3c8fcdded8c8a2364196
  • Loading branch information
SDKAuto committed Jan 22, 2025
1 parent 400520f commit 9a91cf1
Show file tree
Hide file tree
Showing 125 changed files with 3,864 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.AutoCompleteOptions;
import com.azure.analytics.purview.datamap.models.AutoCompleteResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryAutoComplete {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryautocomplete.discoveryautocomplete
AutoCompleteResult response
= discoveryClient.autoComplete(new AutoCompleteOptions().setKeywords("fakeTokenPlaceholder")
.setLimit(10)
.setFilter(BinaryData.fromBytes(
"{and=[{entityType=azure_blob_path, includeSubTypes=false}]}".getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryautocomplete.discoveryautocomplete
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.analytics.purview.datamap.models.SearchFacetItem;
import com.azure.analytics.purview.datamap.models.SearchFacetSort;
import com.azure.analytics.purview.datamap.models.SearchSortOrder;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

public class DiscoveryQuery {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquery
QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder")
.setLimit(10)
.setOrderby(Arrays.asList(BinaryData.fromBytes("{name=ASC}".getBytes(StandardCharsets.UTF_8)),
BinaryData.fromBytes("{updateTime=DESC}".getBytes(StandardCharsets.UTF_8))))
.setFilter(BinaryData
.fromBytes("{and=[{objectType=Files}, {entityType=azure_blob_path}]}".getBytes(StandardCharsets.UTF_8)))
.setFacets(Arrays.asList(
new SearchFacetItem().setCount(0)
.setFacet("assetType")
.setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)),
new SearchFacetItem().setCount(10)
.setFacet("classification")
.setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)),
new SearchFacetItem().setCount(10)
.setFacet("contactId")
.setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)),
new SearchFacetItem().setCount(10)
.setFacet("label")
.setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)),
new SearchFacetItem().setCount(10)
.setFacet("term")
.setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquery
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryAnd {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryand
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes(
"{and=[{entityType=azure_blob_path}, {attributeName=qualifiedName, operator=contains, attributeValue=.csv}]}"
.getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryand
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryAndOrNested {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryandornested
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes(
"{and=[{entityType=azure_blob_path}, {attributeName=qualifiedName, operator=contains, attributeValue=.csv}, {or=[{attributeName=name, operator=eq, attributeValue=exampledata.csv}, {attributeName=qualifiedName, operator=prefix, attributeValue=https://}]}]}"
.getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryandornested
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryAssetType {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryassettype
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes(
"{or=[{assetType=SQL Server}, {assetType=Azure SQL Server}, {assetType=Azure SQL Database}, {assetType=Azure SQL Data Warehouse}, {assetType=Azure SQL Managed Instance}, {assetType=Azure Storage Account}, {assetType=Azure Blob Storage}, {assetType=Azure Files}, {assetType=Azure Table Storage}, {assetType=Azure Data Lake Storage Gen1}, {assetType=Azure Data Lake Storage Gen2}, {assetType=Azure Cosmos DB}, {assetType=Azure Data Factory}, {assetType=Azure Cognitive Search}, {assetType=Power BI}, {assetType=Azure Data Explorer}, {assetType=Amazon S3}, {assetType=Azure Data Share}, {assetType=Teradata}, {assetType=SAP S4HANA}, {assetType=SAP ECC}, {assetType=SQL Server Integration Services}, {assetType=hive}, {assetType=Azure Database for MySQL}, {assetType=Azure Database for MariaDB}, {assetType=Azure Database for PostgreSQL}, {assetType=Azure Synapse Analytics}]}"
.getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryassettype
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryAttribute {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryattribute
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes(
"{or=[{attributeName=name, operator=eq, attributeValue=exampledata.csv}, {attributeName=createTime, operator=ge, attributeValue=1545580800000}, {attributeName=modifiedTime, operator=timerange, attributeValue=LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D}]}"
.getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryattribute
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryBusinessMetadataAttribute {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerybusinessmetadataattribute
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes(
"{or=[{attributeName=<BusinessMetadataName>.<StringAttributeName>, operator=eq|ne|contains|prefix, attributeValue=string value}, {attributeName=<BusinessMetadataName>.<NumberAttributeName>, operator=eq|ne|gt|ge|lt|le, attributeValue=123}, {attributeName=<BusinessMetadataName>.<BooleanAttributeName>, operator=eq|ne, attributeValue=true}, {attributeName=<BusinessMetadataName>.<DateAttributeName>, operator=timerange, attributeValue=LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D}]}"
.getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerybusinessmetadataattribute
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryClassification {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryclassification
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes("{classification=MICROSOFT.PERSONAL.EMAIL, includeSubClassifications=true}"
.getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryclassification
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryCollection {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerycollection
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes("{collectionId=collectionName}".getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerycollection
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.analytics.purview.datamap.models.SearchFacetItem;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

public class DiscoveryQueryFacet {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfacet
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes("{objectType=Tables}".getBytes(StandardCharsets.UTF_8)))
.setFacets(Arrays.asList(new SearchFacetItem().setCount(10).setFacet("assetType"),
new SearchFacetItem().setCount(10).setFacet("classification"),
new SearchFacetItem().setCount(10).setFacet("term"),
new SearchFacetItem().setCount(10).setFacet("label"))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfacet
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.analytics.purview.datamap.generated;

import com.azure.analytics.purview.datamap.DataMapClientBuilder;
import com.azure.analytics.purview.datamap.DiscoveryClient;
import com.azure.analytics.purview.datamap.models.QueryOptions;
import com.azure.analytics.purview.datamap.models.QueryResult;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;
import java.nio.charset.StandardCharsets;

public class DiscoveryQueryFileExtension {
public static void main(String[] args) {
DiscoveryClient discoveryClient
= new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
.endpoint("{Endpoint}")
.buildDiscoveryClient();
// BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfileextension
QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10)
.setFilter(BinaryData.fromBytes("{and=[{fileExtension=txt}]}".getBytes(StandardCharsets.UTF_8))));
// END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfileextension
}
}
Loading

0 comments on commit 9a91cf1

Please sign in to comment.