forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 32276 in Azure/azure-rest-api-specs
Merge c7fb6c841c27fd4f6cba7f2565ae87dd19b23a99 into 3a17b429e962d7a1a01c3c8fcdded8c8a2364196
- Loading branch information
SDKAuto
committed
Jan 22, 2025
1 parent
400520f
commit 9a91cf1
Showing
125 changed files
with
3,864 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryAutoComplete.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...atamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...map/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAnd.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAndOrNested.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...c/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAssetType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...c/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...om/azure/analytics/purview/datamap/generated/DiscoveryQueryBusinessMetadataAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...ples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryClassification.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
.../samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryCollection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...p/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFacet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...mples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFileExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
Oops, something went wrong.