Skip to content

Commit 9a50508

Browse files
authored
[Automation] Generate Fluent Lite from TypeSpec (#43891)
* [Automation] External Change * [Automation] Generate Fluent Lite from TypeSpec
1 parent 139081a commit 9a50508

File tree

81 files changed

+8177
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+8177
-0
lines changed

eng/versioning/version_client.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ com.azure.resourcemanager:azure-resourcemanager-containerorchestratorruntime;1.0
468468
com.azure.resourcemanager:azure-resourcemanager-terraform;1.0.0-beta.1;1.0.0-beta.2
469469
com.azure.resourcemanager:azure-resourcemanager-connectedcache;1.0.0-beta.1;1.0.0-beta.2
470470
com.azure.resourcemanager:azure-resourcemanager-neonpostgres;1.0.0-beta.1;1.0.0-beta.2
471+
com.azure.resourcemanager:azure-resourcemanager-pineconevectordb;1.0.0-beta.1;1.0.0-beta.1
471472
com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1
472473
com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1
473474
io.clientcore:clientcore-parent;1.0.0-beta.1;1.0.0-beta.1

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
<module>sdk/parents</module>
164164
<module>sdk/peering</module>
165165
<module>sdk/personalizer</module>
166+
<module>sdk/pineconevectordb</module>
166167
<module>sdk/playwrighttesting</module>
167168
<module>sdk/policyinsights</module>
168169
<module>sdk/postgresql</module>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2025-01-23)
4+
5+
- Azure Resource Manager Pinecone Vector Db client library for Java. This package contains Microsoft Azure SDK for Pinecone Vector Db Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
6+
7+
### Features Added
8+
9+
- Initial release for the azure-resourcemanager-pineconevectordb Java SDK.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Azure Resource Manager Pinecone Vector Db client library for Java
2+
3+
Azure Resource Manager Pinecone Vector Db client library for Java.
4+
5+
This package contains Microsoft Azure SDK for Pinecone Vector Db Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
6+
7+
## We'd love to hear your feedback
8+
9+
We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
10+
11+
If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
12+
13+
Thank you in advance for your collaboration. We really appreciate your time!
14+
15+
## Documentation
16+
17+
Various documentation is available to help you get started
18+
19+
- [API reference documentation][docs]
20+
21+
## Getting started
22+
23+
### Prerequisites
24+
25+
- [Java Development Kit (JDK)][jdk] with version 8 or above
26+
- [Azure Subscription][azure_subscription]
27+
28+
### Adding the package to your product
29+
30+
[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-pineconevectordb;current})
31+
```xml
32+
<dependency>
33+
<groupId>com.azure.resourcemanager</groupId>
34+
<artifactId>azure-resourcemanager-pineconevectordb</artifactId>
35+
<version>1.0.0-beta.1</version>
36+
</dependency>
37+
```
38+
[//]: # ({x-version-update-end})
39+
40+
### Include the recommended packages
41+
42+
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
43+
44+
[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
45+
46+
### Authentication
47+
48+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
49+
50+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
51+
52+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
53+
54+
```java
55+
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
56+
TokenCredential credential = new DefaultAzureCredentialBuilder()
57+
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
58+
.build();
59+
PineconeVectorDbManager manager = PineconeVectorDbManager
60+
.authenticate(credential, profile);
61+
```
62+
63+
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
64+
65+
See [Authentication][authenticate] for more options.
66+
67+
## Key concepts
68+
69+
See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
70+
71+
## Examples
72+
73+
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/SAMPLE.md)
74+
75+
76+
## Troubleshooting
77+
78+
## Next steps
79+
80+
## Contributing
81+
82+
For details on contributing to this repository, see the [contributing guide][cg].
83+
84+
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.microsoft.com>.
85+
86+
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
87+
88+
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact <[email protected]> with any additional questions or comments.
89+
90+
<!-- LINKS -->
91+
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
92+
[docs]: https://azure.github.io/azure-sdk-for-java/
93+
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
94+
[azure_subscription]: https://azure.microsoft.com/free/
95+
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
96+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
97+
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
98+
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
99+
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
100+
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101+
[coc]: https://opensource.microsoft.com/codeofconduct/
102+
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103+
104+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fpineconevectordb%2Fazure-resourcemanager-pineconevectordb%2FREADME.png)
Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
# Code snippets and samples
2+
3+
4+
## Operations
5+
6+
- [List](#operations_list)
7+
8+
## Organizations
9+
10+
- [CreateOrUpdate](#organizations_createorupdate)
11+
- [Delete](#organizations_delete)
12+
- [GetByResourceGroup](#organizations_getbyresourcegroup)
13+
- [List](#organizations_list)
14+
- [ListByResourceGroup](#organizations_listbyresourcegroup)
15+
- [Update](#organizations_update)
16+
### Operations_List
17+
18+
```java
19+
/**
20+
* Samples for Operations List.
21+
*/
22+
public final class OperationsListSamples {
23+
/*
24+
* x-ms-original-file: 2024-10-22-preview/Operations_List_MinimumSet_Gen.json
25+
*/
26+
/**
27+
* Sample code: Operations_List_MinimumSet.
28+
*
29+
* @param manager Entry point to PineconeVectorDbManager.
30+
*/
31+
public static void
32+
operationsListMinimumSet(com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
33+
manager.operations().list(com.azure.core.util.Context.NONE);
34+
}
35+
36+
/*
37+
* x-ms-original-file: 2024-10-22-preview/Operations_List_MaximumSet_Gen.json
38+
*/
39+
/**
40+
* Sample code: Operations_List_MaximumSet.
41+
*
42+
* @param manager Entry point to PineconeVectorDbManager.
43+
*/
44+
public static void
45+
operationsListMaximumSet(com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
46+
manager.operations().list(com.azure.core.util.Context.NONE);
47+
}
48+
}
49+
```
50+
51+
### Organizations_CreateOrUpdate
52+
53+
```java
54+
import com.azure.resourcemanager.pineconevectordb.models.ManagedServiceIdentity;
55+
import com.azure.resourcemanager.pineconevectordb.models.ManagedServiceIdentityType;
56+
import com.azure.resourcemanager.pineconevectordb.models.MarketplaceDetails;
57+
import com.azure.resourcemanager.pineconevectordb.models.OfferDetails;
58+
import com.azure.resourcemanager.pineconevectordb.models.OrganizationProperties;
59+
import com.azure.resourcemanager.pineconevectordb.models.PartnerProperties;
60+
import com.azure.resourcemanager.pineconevectordb.models.SingleSignOnPropertiesV2;
61+
import com.azure.resourcemanager.pineconevectordb.models.SingleSignOnStates;
62+
import com.azure.resourcemanager.pineconevectordb.models.SingleSignOnType;
63+
import com.azure.resourcemanager.pineconevectordb.models.UserAssignedIdentity;
64+
import com.azure.resourcemanager.pineconevectordb.models.UserDetails;
65+
import java.util.Arrays;
66+
import java.util.HashMap;
67+
import java.util.Map;
68+
69+
/**
70+
* Samples for Organizations CreateOrUpdate.
71+
*/
72+
public final class OrganizationsCreateOrUpdateSamples {
73+
/*
74+
* x-ms-original-file: 2024-10-22-preview/Organizations_CreateOrUpdate_MaximumSet_Gen.json
75+
*/
76+
/**
77+
* Sample code: Organizations_CreateOrUpdate_MaximumSet.
78+
*
79+
* @param manager Entry point to PineconeVectorDbManager.
80+
*/
81+
public static void organizationsCreateOrUpdateMaximumSet(
82+
com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
83+
manager.organizations()
84+
.define("example-organization-name")
85+
.withRegion("us-east")
86+
.withExistingResourceGroup("rgopenapi")
87+
.withTags(mapOf("my-tag", "tag.value"))
88+
.withProperties(new OrganizationProperties()
89+
.withMarketplace(new MarketplaceDetails().withSubscriptionId("76a38ef6-c8c1-4f0d-bfe0-00ec782c8077")
90+
.withOfferDetails(new OfferDetails().withPublisherId("4d194daf-fa20-46a8-bfb4-5b7d96cae009")
91+
.withOfferId("013124d0-bf05-4eab-a6bb-01fa83870642")
92+
.withPlanId("62dda065-5acd-4ac5-b418-8610beed92a2")
93+
.withPlanName("Freemium")
94+
.withTermUnit("der")
95+
.withTermId("a2b7ce01-f06d-4874-9f77-6ea4a4875c16")))
96+
.withUser(new UserDetails().withFirstName("Jimmy")
97+
.withLastName("McExample")
98+
.withEmailAddress("[email protected]")
99+
.withUpn("[email protected]")
100+
.withPhoneNumber("555-555-5555"))
101+
.withPartnerProperties(new PartnerProperties().withDisplayName("My Example Organization"))
102+
.withSingleSignOnProperties(new SingleSignOnPropertiesV2().withType(SingleSignOnType.SAML)
103+
.withState(SingleSignOnStates.INITIAL)
104+
.withEnterpriseAppId("44d3fb26-d8d5-41ff-9b9a-769737f22f13")
105+
.withUrl("https://login.pinecone.io/?sso=true&connection=dfwgsqzkbrjqrglcsa")
106+
.withAadDomains(Arrays.asList("exampledomain"))))
107+
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
108+
.withUserAssignedIdentities(mapOf("ident904655400", new UserAssignedIdentity())))
109+
.create();
110+
}
111+
112+
// Use "Map.of" if available
113+
@SuppressWarnings("unchecked")
114+
private static <T> Map<String, T> mapOf(Object... inputs) {
115+
Map<String, T> map = new HashMap<>();
116+
for (int i = 0; i < inputs.length; i += 2) {
117+
String key = (String) inputs[i];
118+
T value = (T) inputs[i + 1];
119+
map.put(key, value);
120+
}
121+
return map;
122+
}
123+
}
124+
```
125+
126+
### Organizations_Delete
127+
128+
```java
129+
/**
130+
* Samples for Organizations Delete.
131+
*/
132+
public final class OrganizationsDeleteSamples {
133+
/*
134+
* x-ms-original-file: 2024-10-22-preview/Organizations_Delete_MaximumSet_Gen.json
135+
*/
136+
/**
137+
* Sample code: Organizations_Delete_MaximumSet.
138+
*
139+
* @param manager Entry point to PineconeVectorDbManager.
140+
*/
141+
public static void
142+
organizationsDeleteMaximumSet(com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
143+
manager.organizations().delete("rgopenapi", "example-organization-name", com.azure.core.util.Context.NONE);
144+
}
145+
}
146+
```
147+
148+
### Organizations_GetByResourceGroup
149+
150+
```java
151+
/**
152+
* Samples for Organizations GetByResourceGroup.
153+
*/
154+
public final class OrganizationsGetByResourceGroupSamples {
155+
/*
156+
* x-ms-original-file: 2024-10-22-preview/Organizations_Get_MaximumSet_Gen.json
157+
*/
158+
/**
159+
* Sample code: Organizations_Get_MaximumSet.
160+
*
161+
* @param manager Entry point to PineconeVectorDbManager.
162+
*/
163+
public static void
164+
organizationsGetMaximumSet(com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
165+
manager.organizations()
166+
.getByResourceGroupWithResponse("rgopenapi", "example-organization-name", com.azure.core.util.Context.NONE);
167+
}
168+
}
169+
```
170+
171+
### Organizations_List
172+
173+
```java
174+
/**
175+
* Samples for Organizations List.
176+
*/
177+
public final class OrganizationsListSamples {
178+
/*
179+
* x-ms-original-file: 2024-10-22-preview/Organizations_ListBySubscription_MaximumSet_Gen.json
180+
*/
181+
/**
182+
* Sample code: Organizations_ListBySubscription_MaximumSet.
183+
*
184+
* @param manager Entry point to PineconeVectorDbManager.
185+
*/
186+
public static void organizationsListBySubscriptionMaximumSet(
187+
com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
188+
manager.organizations().list(com.azure.core.util.Context.NONE);
189+
}
190+
}
191+
```
192+
193+
### Organizations_ListByResourceGroup
194+
195+
```java
196+
/**
197+
* Samples for Organizations ListByResourceGroup.
198+
*/
199+
public final class OrganizationsListByResourceGroupSamples {
200+
/*
201+
* x-ms-original-file: 2024-10-22-preview/Organizations_ListByResourceGroup_MaximumSet_Gen.json
202+
*/
203+
/**
204+
* Sample code: Organizations_ListByResourceGroup_MaximumSet.
205+
*
206+
* @param manager Entry point to PineconeVectorDbManager.
207+
*/
208+
public static void organizationsListByResourceGroupMaximumSet(
209+
com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
210+
manager.organizations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE);
211+
}
212+
}
213+
```
214+
215+
### Organizations_Update
216+
217+
```java
218+
import com.azure.resourcemanager.pineconevectordb.models.ManagedServiceIdentity;
219+
import com.azure.resourcemanager.pineconevectordb.models.ManagedServiceIdentityType;
220+
import com.azure.resourcemanager.pineconevectordb.models.OrganizationResource;
221+
import com.azure.resourcemanager.pineconevectordb.models.UserAssignedIdentity;
222+
import java.util.HashMap;
223+
import java.util.Map;
224+
225+
/**
226+
* Samples for Organizations Update.
227+
*/
228+
public final class OrganizationsUpdateSamples {
229+
/*
230+
* x-ms-original-file: 2024-10-22-preview/Organizations_Update_MaximumSet_Gen.json
231+
*/
232+
/**
233+
* Sample code: Organizations_Update_MaximumSet.
234+
*
235+
* @param manager Entry point to PineconeVectorDbManager.
236+
*/
237+
public static void
238+
organizationsUpdateMaximumSet(com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager) {
239+
OrganizationResource resource = manager.organizations()
240+
.getByResourceGroupWithResponse("rgopenapi", "example-organization-name", com.azure.core.util.Context.NONE)
241+
.getValue();
242+
resource.update()
243+
.withTags(mapOf("new-tag", "new.tag.value"))
244+
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
245+
.withUserAssignedIdentities(mapOf("ident573739201", new UserAssignedIdentity())))
246+
.apply();
247+
}
248+
249+
// Use "Map.of" if available
250+
@SuppressWarnings("unchecked")
251+
private static <T> Map<String, T> mapOf(Object... inputs) {
252+
Map<String, T> map = new HashMap<>();
253+
for (int i = 0; i < inputs.length; i += 2) {
254+
String key = (String) inputs[i];
255+
T value = (T) inputs[i + 1];
256+
map.put(key, value);
257+
}
258+
return map;
259+
}
260+
}
261+
```
262+

0 commit comments

Comments
 (0)