registerTenantEmailRegistrationWithResponse(RequestOptions requestOptions) {
+ return registerTenantEmailRegistrationWithResponseAsync(requestOptions).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of received shares along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAllAttachedReceivedSharesNextSinglePageAsync(
+ String nextLink, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getAllAttachedReceivedSharesNext(
+ nextLink, this.client.getEndpoint(), accept, requestOptions, context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ getValues(res.getValue(), "value"),
+ getNextLink(res.getValue(), "nextLink"),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of received shares along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAllDetachedReceivedSharesNextSinglePageAsync(
+ String nextLink, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getAllDetachedReceivedSharesNext(
+ nextLink, this.client.getEndpoint(), accept, requestOptions, context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ getValues(res.getValue(), "value"),
+ getNextLink(res.getValue(), "nextLink"),
+ null));
+ }
+
+ private List getValues(BinaryData binaryData, String path) {
+ try {
+ Map, ?> obj = binaryData.toObject(Map.class);
+ List> values = (List>) obj.get(path);
+ return values.stream().map(BinaryData::fromObject).collect(Collectors.toList());
+ } catch (RuntimeException e) {
+ return null;
+ }
+ }
+
+ private String getNextLink(BinaryData binaryData, String path) {
+ try {
+ Map, ?> obj = binaryData.toObject(Map.class);
+ return (String) obj.get(path);
+ } catch (RuntimeException e) {
+ return null;
+ }
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/SentSharesImpl.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/SentSharesImpl.java
new file mode 100644
index 0000000000000..e50442a940229
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/SentSharesImpl.java
@@ -0,0 +1,1390 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.DefaultPollingStrategy;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.core.util.serializer.TypeReference;
+import java.time.Duration;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in SentShares. */
+public final class SentSharesImpl {
+ /** The proxy service used to perform REST calls. */
+ private final SentSharesService service;
+
+ /** The service client containing this operation class. */
+ private final PurviewShareClientImpl client;
+
+ /**
+ * Initializes an instance of SentSharesImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SentSharesImpl(PurviewShareClientImpl client) {
+ this.service =
+ RestProxy.create(SentSharesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PurviewShareClientSentShares to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "PurviewShareClientSe")
+ public interface SentSharesService {
+ @Get("/sentShares")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getAllSentShares(
+ @HostParam("endpoint") String endpoint,
+ @QueryParam("referenceName") String referenceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("/sentShares/{sentShareId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getSentShare(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Put("/sentShares/{sentShareId}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> createOrReplaceSentShare(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") BinaryData sentShare,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Delete("/sentShares/{sentShareId}")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> deleteSentShare(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("/sentShares/{sentShareId}/sentShareInvitations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getAllSentShareInvitations(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getSentShareInvitation(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @PathParam("sentShareInvitationId") String sentShareInvitationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Put("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}")
+ @ExpectedResponses({201})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> createSentShareInvitation(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @PathParam("sentShareInvitationId") String sentShareInvitationId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") BinaryData sentShareInvitation,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Delete("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> deleteSentShareInvitation(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @PathParam("sentShareInvitationId") String sentShareInvitationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Post("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}:notify")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> notifyUserSentShareInvitation(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("sentShareId") String sentShareId,
+ @PathParam("sentShareInvitationId") String sentShareInvitationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getAllSentSharesNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> getAllSentShareInvitationsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions,
+ Context context);
+ }
+
+ /**
+ * Get a list of sent shares.
+ *
+ * List sent shares.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * skipToken | String | No | The continuation token to list the next page |
+ * filter | String | No | Filters the results using OData syntax |
+ * orderby | String | No | Sorts the results using OData syntax |
+ *
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param referenceName A name that references a data store.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of sent shares along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAllSentSharesSinglePageAsync(
+ String referenceName, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getAllSentShares(
+ this.client.getEndpoint(),
+ referenceName,
+ this.client.getServiceVersion().getVersion(),
+ accept,
+ requestOptions,
+ context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ getValues(res.getValue(), "value"),
+ getNextLink(res.getValue(), "nextLink"),
+ null));
+ }
+
+ /**
+ * Get a list of sent shares.
+ *
+ * List sent shares.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * skipToken | String | No | The continuation token to list the next page |
+ * filter | String | No | Filters the results using OData syntax |
+ * orderby | String | No | Sorts the results using OData syntax |
+ *
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param referenceName A name that references a data store.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of sent shares as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getAllSentSharesAsync(String referenceName, RequestOptions requestOptions) {
+ RequestOptions requestOptionsForNextPage = new RequestOptions();
+ requestOptionsForNextPage.setContext(
+ requestOptions != null && requestOptions.getContext() != null
+ ? requestOptions.getContext()
+ : Context.NONE);
+ return new PagedFlux<>(
+ () -> getAllSentSharesSinglePageAsync(referenceName, requestOptions),
+ nextLink -> getAllSentSharesNextSinglePageAsync(nextLink, requestOptionsForNextPage));
+ }
+
+ /**
+ * Get a list of sent shares.
+ *
+ * List sent shares.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * skipToken | String | No | The continuation token to list the next page |
+ * filter | String | No | Filters the results using OData syntax |
+ * orderby | String | No | Sorts the results using OData syntax |
+ *
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param referenceName A name that references a data store.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of sent shares as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable getAllSentShares(String referenceName, RequestOptions requestOptions) {
+ return new PagedIterable<>(getAllSentSharesAsync(referenceName, requestOptions));
+ }
+
+ /**
+ * Get a sent share by guid.
+ *
+ * Get a sent share.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a sent share along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getSentShareWithResponseAsync(String sentShareId, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getSentShare(
+ this.client.getEndpoint(),
+ sentShareId,
+ this.client.getServiceVersion().getVersion(),
+ accept,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * Get a sent share by guid.
+ *
+ * Get a sent share.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a sent share along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getSentShareWithResponse(String sentShareId, RequestOptions requestOptions) {
+ return getSentShareWithResponseAsync(sentShareId, requestOptions).block();
+ }
+
+ /**
+ * Create or replace a sent share.
+ *
+ * Create or replace a sent share.
+ *
+ *
Request Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShare The sent share to create or replace.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a sent share data transfer object along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrReplaceSentShareWithResponseAsync(
+ String sentShareId, BinaryData sentShare, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.createOrReplaceSentShare(
+ this.client.getEndpoint(),
+ sentShareId,
+ this.client.getServiceVersion().getVersion(),
+ sentShare,
+ accept,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * Create or replace a sent share.
+ *
+ * Create or replace a sent share.
+ *
+ *
Request Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShare The sent share to create or replace.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of a sent share data transfer object.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginCreateOrReplaceSentShareAsync(
+ String sentShareId, BinaryData sentShare, RequestOptions requestOptions) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.createOrReplaceSentShareWithResponseAsync(sentShareId, sentShare, requestOptions),
+ new DefaultPollingStrategy<>(
+ this.client.getHttpPipeline(),
+ "{endpoint}".replace("{endpoint}", this.client.getEndpoint()),
+ null,
+ requestOptions != null && requestOptions.getContext() != null
+ ? requestOptions.getContext()
+ : Context.NONE),
+ TypeReference.createInstance(BinaryData.class),
+ TypeReference.createInstance(BinaryData.class));
+ }
+
+ /**
+ * Create or replace a sent share.
+ *
+ * Create or replace a sent share.
+ *
+ *
Request Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShare The sent share to create or replace.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of a sent share data transfer object.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginCreateOrReplaceSentShare(
+ String sentShareId, BinaryData sentShare, RequestOptions requestOptions) {
+ return this.beginCreateOrReplaceSentShareAsync(sentShareId, sentShare, requestOptions).getSyncPoller();
+ }
+
+ /**
+ * Deletes a sent share.
+ *
+ * Delete a sent share.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * endTime: OffsetDateTime (Optional)
+ * error (Optional): {
+ * code: String (Required)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * message: String (Required)
+ * target: String (Optional)
+ * }
+ * id: String (Optional)
+ * startTime: OffsetDateTime (Optional)
+ * status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return response for long running operation along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteSentShareWithResponseAsync(
+ String sentShareId, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.deleteSentShare(
+ this.client.getEndpoint(),
+ sentShareId,
+ this.client.getServiceVersion().getVersion(),
+ accept,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * Deletes a sent share.
+ *
+ * Delete a sent share.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * endTime: OffsetDateTime (Optional)
+ * error (Optional): {
+ * code: String (Required)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * message: String (Required)
+ * target: String (Optional)
+ * }
+ * id: String (Optional)
+ * startTime: OffsetDateTime (Optional)
+ * status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of response for long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteSentShareAsync(String sentShareId, RequestOptions requestOptions) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.deleteSentShareWithResponseAsync(sentShareId, requestOptions),
+ new DefaultPollingStrategy<>(
+ this.client.getHttpPipeline(),
+ "{endpoint}".replace("{endpoint}", this.client.getEndpoint()),
+ null,
+ requestOptions != null && requestOptions.getContext() != null
+ ? requestOptions.getContext()
+ : Context.NONE),
+ TypeReference.createInstance(BinaryData.class),
+ TypeReference.createInstance(Void.class));
+ }
+
+ /**
+ * Deletes a sent share.
+ *
+ * Delete a sent share.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * endTime: OffsetDateTime (Optional)
+ * error (Optional): {
+ * code: String (Required)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * message: String (Required)
+ * target: String (Optional)
+ * }
+ * id: String (Optional)
+ * startTime: OffsetDateTime (Optional)
+ * status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of response for long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteSentShare(String sentShareId, RequestOptions requestOptions) {
+ return this.beginDeleteSentShareAsync(sentShareId, requestOptions).getSyncPoller();
+ }
+
+ /**
+ * List all sent share invitations in a sent share
+ *
+ * List sent share recipients.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * skipToken | String | No | The continuation token to list the next page |
+ * filter | String | No | Filters the results using OData syntax |
+ * orderby | String | No | Sorts the results using OData syntax |
+ *
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of the sent share invitations along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAllSentShareInvitationsSinglePageAsync(
+ String sentShareId, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getAllSentShareInvitations(
+ this.client.getEndpoint(),
+ sentShareId,
+ this.client.getServiceVersion().getVersion(),
+ accept,
+ requestOptions,
+ context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ getValues(res.getValue(), "value"),
+ getNextLink(res.getValue(), "nextLink"),
+ null));
+ }
+
+ /**
+ * List all sent share invitations in a sent share
+ *
+ * List sent share recipients.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * skipToken | String | No | The continuation token to list the next page |
+ * filter | String | No | Filters the results using OData syntax |
+ * orderby | String | No | Sorts the results using OData syntax |
+ *
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of the sent share invitations as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getAllSentShareInvitationsAsync(String sentShareId, RequestOptions requestOptions) {
+ RequestOptions requestOptionsForNextPage = new RequestOptions();
+ requestOptionsForNextPage.setContext(
+ requestOptions != null && requestOptions.getContext() != null
+ ? requestOptions.getContext()
+ : Context.NONE);
+ return new PagedFlux<>(
+ () -> getAllSentShareInvitationsSinglePageAsync(sentShareId, requestOptions),
+ nextLink -> getAllSentShareInvitationsNextSinglePageAsync(nextLink, requestOptionsForNextPage));
+ }
+
+ /**
+ * List all sent share invitations in a sent share
+ *
+ * List sent share recipients.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * skipToken | String | No | The continuation token to list the next page |
+ * filter | String | No | Filters the results using OData syntax |
+ * orderby | String | No | Sorts the results using OData syntax |
+ *
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of the sent share invitations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable getAllSentShareInvitations(String sentShareId, RequestOptions requestOptions) {
+ return new PagedIterable<>(getAllSentShareInvitationsAsync(sentShareId, requestOptions));
+ }
+
+ /**
+ * Get sent share invitation for a given sent share
+ *
+ * Get recipient for a given sent share.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return recipient for a given sent share along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getSentShareInvitationWithResponseAsync(
+ String sentShareId, String sentShareInvitationId, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getSentShareInvitation(
+ this.client.getEndpoint(),
+ sentShareId,
+ sentShareInvitationId,
+ this.client.getServiceVersion().getVersion(),
+ accept,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * Get sent share invitation for a given sent share
+ *
+ * Get recipient for a given sent share.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return recipient for a given sent share along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getSentShareInvitationWithResponse(
+ String sentShareId, String sentShareInvitationId, RequestOptions requestOptions) {
+ return getSentShareInvitationWithResponseAsync(sentShareId, sentShareInvitationId, requestOptions).block();
+ }
+
+ /**
+ * Create a sent share invitation.
+ *
+ * Create a recipient for a given sent share.
+ *
+ *
Request Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param sentShareInvitation The sent share invitation to create.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a sent share invitation data transfer object along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createSentShareInvitationWithResponseAsync(
+ String sentShareId,
+ String sentShareInvitationId,
+ BinaryData sentShareInvitation,
+ RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.createSentShareInvitation(
+ this.client.getEndpoint(),
+ sentShareId,
+ sentShareInvitationId,
+ this.client.getServiceVersion().getVersion(),
+ sentShareInvitation,
+ accept,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * Create a sent share invitation.
+ *
+ * Create a recipient for a given sent share.
+ *
+ *
Request Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param sentShareInvitation The sent share invitation to create.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a sent share invitation data transfer object along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createSentShareInvitationWithResponse(
+ String sentShareId,
+ String sentShareInvitationId,
+ BinaryData sentShareInvitation,
+ RequestOptions requestOptions) {
+ return createSentShareInvitationWithResponseAsync(
+ sentShareId, sentShareInvitationId, sentShareInvitation, requestOptions)
+ .block();
+ }
+
+ /**
+ * Delete Invitation in a share.
+ *
+ * Delete a sent share invitation.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * endTime: OffsetDateTime (Optional)
+ * error (Optional): {
+ * code: String (Required)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * message: String (Required)
+ * target: String (Optional)
+ * }
+ * id: String (Optional)
+ * startTime: OffsetDateTime (Optional)
+ * status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return response for long running operation along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteSentShareInvitationWithResponseAsync(
+ String sentShareId, String sentShareInvitationId, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.deleteSentShareInvitation(
+ this.client.getEndpoint(),
+ sentShareId,
+ sentShareInvitationId,
+ this.client.getServiceVersion().getVersion(),
+ accept,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * Delete Invitation in a share.
+ *
+ * Delete a sent share invitation.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * endTime: OffsetDateTime (Optional)
+ * error (Optional): {
+ * code: String (Required)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * message: String (Required)
+ * target: String (Optional)
+ * }
+ * id: String (Optional)
+ * startTime: OffsetDateTime (Optional)
+ * status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of response for long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteSentShareInvitationAsync(
+ String sentShareId, String sentShareInvitationId, RequestOptions requestOptions) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () ->
+ this.deleteSentShareInvitationWithResponseAsync(
+ sentShareId, sentShareInvitationId, requestOptions),
+ new DefaultPollingStrategy<>(
+ this.client.getHttpPipeline(),
+ "{endpoint}".replace("{endpoint}", this.client.getEndpoint()),
+ null,
+ requestOptions != null && requestOptions.getContext() != null
+ ? requestOptions.getContext()
+ : Context.NONE),
+ TypeReference.createInstance(BinaryData.class),
+ TypeReference.createInstance(Void.class));
+ }
+
+ /**
+ * Delete Invitation in a share.
+ *
+ * Delete a sent share invitation.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * endTime: OffsetDateTime (Optional)
+ * error (Optional): {
+ * code: String (Required)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * message: String (Required)
+ * target: String (Optional)
+ * }
+ * id: String (Optional)
+ * startTime: OffsetDateTime (Optional)
+ * status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of response for long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteSentShareInvitation(
+ String sentShareId, String sentShareInvitationId, RequestOptions requestOptions) {
+ return this.beginDeleteSentShareInvitationAsync(sentShareId, sentShareInvitationId, requestOptions)
+ .getSyncPoller();
+ }
+
+ /**
+ * Notifies the recipient of the sent share invitation.
+ *
+ * Notifies the user recipient of the sent share invitation, does not apply to service invitations.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a sent share invitation data transfer object along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> notifyUserSentShareInvitationWithResponseAsync(
+ String sentShareId, String sentShareInvitationId, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.notifyUserSentShareInvitation(
+ this.client.getEndpoint(),
+ sentShareId,
+ sentShareInvitationId,
+ this.client.getServiceVersion().getVersion(),
+ accept,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * Notifies the recipient of the sent share invitation.
+ *
+ * Notifies the user recipient of the sent share invitation, does not apply to service invitations.
+ *
+ *
Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param sentShareId Id of the sent share.
+ * @param sentShareInvitationId Id of the sent share invitation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a sent share invitation data transfer object along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response notifyUserSentShareInvitationWithResponse(
+ String sentShareId, String sentShareInvitationId, RequestOptions requestOptions) {
+ return notifyUserSentShareInvitationWithResponseAsync(sentShareId, sentShareInvitationId, requestOptions)
+ .block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of sent shares along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAllSentSharesNextSinglePageAsync(
+ String nextLink, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getAllSentSharesNext(
+ nextLink, this.client.getEndpoint(), accept, requestOptions, context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ getValues(res.getValue(), "value"),
+ getNextLink(res.getValue(), "nextLink"),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * id: String (Optional)
+ * type: String (Optional)
+ * }
+ * }
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return list of the sent share invitations along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAllSentShareInvitationsNextSinglePageAsync(
+ String nextLink, RequestOptions requestOptions) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.getAllSentShareInvitationsNext(
+ nextLink, this.client.getEndpoint(), accept, requestOptions, context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ getValues(res.getValue(), "value"),
+ getNextLink(res.getValue(), "nextLink"),
+ null));
+ }
+
+ private List getValues(BinaryData binaryData, String path) {
+ try {
+ Map, ?> obj = binaryData.toObject(Map.class);
+ List> values = (List>) obj.get(path);
+ return values.stream().map(BinaryData::fromObject).collect(Collectors.toList());
+ } catch (RuntimeException e) {
+ return null;
+ }
+ }
+
+ private String getNextLink(BinaryData binaryData, String path) {
+ try {
+ Map, ?> obj = binaryData.toObject(Map.class);
+ return (String) obj.get(path);
+ } catch (RuntimeException e) {
+ return null;
+ }
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/package-info.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/package-info.java
new file mode 100644
index 0000000000000..66eb79a8b9701
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the implementations for PurviewShareClient. Creates a data plane client for Purview Share. */
+package com.azure.analytics.purview.sharing.implementation;
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSink.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSink.java
new file mode 100644
index 0000000000000..e163c7b129794
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSink.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** AdlsGen2 Sink. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "storeKind")
+@JsonTypeName("AdlsGen2Account")
+@JsonFlatten
+@Fluent
+public class AdlsGen2AccountSink extends Sink {
+ /*
+ * Adls Gen 2 Container Name
+ */
+ @JsonProperty(value = "properties.containerName", required = true)
+ private String containerName;
+
+ /*
+ * Adls Gen 2 Folder
+ */
+ @JsonProperty(value = "properties.folder", required = true)
+ private String folder;
+
+ /*
+ * Adls Gen 2 Location
+ */
+ @JsonProperty(value = "properties.location", access = JsonProperty.Access.WRITE_ONLY)
+ private String location;
+
+ /*
+ * Adls Gen 2 Mount Path
+ */
+ @JsonProperty(value = "properties.mountPath")
+ private String mountPath;
+
+ /** Creates an instance of AdlsGen2AccountSink class. */
+ public AdlsGen2AccountSink() {}
+
+ /**
+ * Get the containerName property: Adls Gen 2 Container Name.
+ *
+ * @return the containerName value.
+ */
+ public String getContainerName() {
+ return this.containerName;
+ }
+
+ /**
+ * Set the containerName property: Adls Gen 2 Container Name.
+ *
+ * @param containerName the containerName value to set.
+ * @return the AdlsGen2AccountSink object itself.
+ */
+ public AdlsGen2AccountSink setContainerName(String containerName) {
+ this.containerName = containerName;
+ return this;
+ }
+
+ /**
+ * Get the folder property: Adls Gen 2 Folder.
+ *
+ * @return the folder value.
+ */
+ public String getFolder() {
+ return this.folder;
+ }
+
+ /**
+ * Set the folder property: Adls Gen 2 Folder.
+ *
+ * @param folder the folder value to set.
+ * @return the AdlsGen2AccountSink object itself.
+ */
+ public AdlsGen2AccountSink setFolder(String folder) {
+ this.folder = folder;
+ return this;
+ }
+
+ /**
+ * Get the location property: Adls Gen 2 Location.
+ *
+ * @return the location value.
+ */
+ public String getLocation() {
+ return this.location;
+ }
+
+ /**
+ * Get the mountPath property: Adls Gen 2 Mount Path.
+ *
+ * @return the mountPath value.
+ */
+ public String getMountPath() {
+ return this.mountPath;
+ }
+
+ /**
+ * Set the mountPath property: Adls Gen 2 Mount Path.
+ *
+ * @param mountPath the mountPath value to set.
+ * @return the AdlsGen2AccountSink object itself.
+ */
+ public AdlsGen2AccountSink setMountPath(String mountPath) {
+ this.mountPath = mountPath;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AdlsGen2AccountSink setStoreReference(StoreReference storeReference) {
+ super.setStoreReference(storeReference);
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/AdlsGen2Artifact.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/AdlsGen2Artifact.java
new file mode 100644
index 0000000000000..239e7edb80497
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/AdlsGen2Artifact.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.util.List;
+
+/** An ADLS Gen2 account artifact. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "storeKind")
+@JsonTypeName("AdlsGen2Account")
+@JsonFlatten
+@Fluent
+public class AdlsGen2Artifact extends Artifact {
+ /*
+ * Location of the storage account.
+ */
+ @JsonProperty(value = "properties.location", access = JsonProperty.Access.WRITE_ONLY)
+ private String location;
+
+ /*
+ * A list of ADLS Gen2 storage account paths.
+ */
+ @JsonProperty(value = "properties.paths", required = true)
+ private List paths;
+
+ /** Creates an instance of AdlsGen2Artifact class. */
+ public AdlsGen2Artifact() {}
+
+ /**
+ * Get the location property: Location of the storage account.
+ *
+ * @return the location value.
+ */
+ public String getLocation() {
+ return this.location;
+ }
+
+ /**
+ * Get the paths property: A list of ADLS Gen2 storage account paths.
+ *
+ * @return the paths value.
+ */
+ public List getPaths() {
+ return this.paths;
+ }
+
+ /**
+ * Set the paths property: A list of ADLS Gen2 storage account paths.
+ *
+ * @param paths the paths value to set.
+ * @return the AdlsGen2Artifact object itself.
+ */
+ public AdlsGen2Artifact setPaths(List paths) {
+ this.paths = paths;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AdlsGen2Artifact setStoreReference(StoreReference storeReference) {
+ super.setStoreReference(storeReference);
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Artifact.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Artifact.java
new file mode 100644
index 0000000000000..5f154d26028d4
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Artifact.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** A class for sent share artifact. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "storeKind",
+ defaultImpl = Artifact.class)
+@JsonTypeName("Artifact")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "AdlsGen2Account", value = AdlsGen2Artifact.class),
+ @JsonSubTypes.Type(name = "BlobAccount", value = BlobStorageArtifact.class)
+})
+@Fluent
+public class Artifact {
+ /*
+ * A Store Reference for an artifact or sink.
+ */
+ @JsonProperty(value = "storeReference", required = true)
+ private StoreReference storeReference;
+
+ /** Creates an instance of Artifact class. */
+ public Artifact() {}
+
+ /**
+ * Get the storeReference property: A Store Reference for an artifact or sink.
+ *
+ * @return the storeReference value.
+ */
+ public StoreReference getStoreReference() {
+ return this.storeReference;
+ }
+
+ /**
+ * Set the storeReference property: A Store Reference for an artifact or sink.
+ *
+ * @param storeReference the storeReference value to set.
+ * @return the Artifact object itself.
+ */
+ public Artifact setStoreReference(StoreReference storeReference) {
+ this.storeReference = storeReference;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/BlobAccountSink.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/BlobAccountSink.java
new file mode 100644
index 0000000000000..e057aeb77182b
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/BlobAccountSink.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** Blob Sink. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "storeKind")
+@JsonTypeName("BlobAccount")
+@JsonFlatten
+@Fluent
+public class BlobAccountSink extends Sink {
+ /*
+ * Blob Container Name
+ */
+ @JsonProperty(value = "properties.containerName", required = true)
+ private String containerName;
+
+ /*
+ * Blob Folder
+ */
+ @JsonProperty(value = "properties.folder", required = true)
+ private String folder;
+
+ /*
+ * Blob Location
+ */
+ @JsonProperty(value = "properties.location", access = JsonProperty.Access.WRITE_ONLY)
+ private String location;
+
+ /*
+ * Blob Mount Path
+ */
+ @JsonProperty(value = "properties.mountPath")
+ private String mountPath;
+
+ /** Creates an instance of BlobAccountSink class. */
+ public BlobAccountSink() {}
+
+ /**
+ * Get the containerName property: Blob Container Name.
+ *
+ * @return the containerName value.
+ */
+ public String getContainerName() {
+ return this.containerName;
+ }
+
+ /**
+ * Set the containerName property: Blob Container Name.
+ *
+ * @param containerName the containerName value to set.
+ * @return the BlobAccountSink object itself.
+ */
+ public BlobAccountSink setContainerName(String containerName) {
+ this.containerName = containerName;
+ return this;
+ }
+
+ /**
+ * Get the folder property: Blob Folder.
+ *
+ * @return the folder value.
+ */
+ public String getFolder() {
+ return this.folder;
+ }
+
+ /**
+ * Set the folder property: Blob Folder.
+ *
+ * @param folder the folder value to set.
+ * @return the BlobAccountSink object itself.
+ */
+ public BlobAccountSink setFolder(String folder) {
+ this.folder = folder;
+ return this;
+ }
+
+ /**
+ * Get the location property: Blob Location.
+ *
+ * @return the location value.
+ */
+ public String getLocation() {
+ return this.location;
+ }
+
+ /**
+ * Get the mountPath property: Blob Mount Path.
+ *
+ * @return the mountPath value.
+ */
+ public String getMountPath() {
+ return this.mountPath;
+ }
+
+ /**
+ * Set the mountPath property: Blob Mount Path.
+ *
+ * @param mountPath the mountPath value to set.
+ * @return the BlobAccountSink object itself.
+ */
+ public BlobAccountSink setMountPath(String mountPath) {
+ this.mountPath = mountPath;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public BlobAccountSink setStoreReference(StoreReference storeReference) {
+ super.setStoreReference(storeReference);
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifact.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifact.java
new file mode 100644
index 0000000000000..c8d6c00a5618f
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifact.java
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.util.List;
+
+/** Blob storage account artifact. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "storeKind")
+@JsonTypeName("BlobAccount")
+@JsonFlatten
+@Fluent
+public class BlobStorageArtifact extends Artifact {
+ /*
+ * Location of the storage account.
+ */
+ @JsonProperty(value = "properties.location", access = JsonProperty.Access.WRITE_ONLY)
+ private String location;
+
+ /*
+ * A list of blob storage account paths.
+ */
+ @JsonProperty(value = "properties.paths", required = true)
+ private List paths;
+
+ /** Creates an instance of BlobStorageArtifact class. */
+ public BlobStorageArtifact() {}
+
+ /**
+ * Get the location property: Location of the storage account.
+ *
+ * @return the location value.
+ */
+ public String getLocation() {
+ return this.location;
+ }
+
+ /**
+ * Get the paths property: A list of blob storage account paths.
+ *
+ * @return the paths value.
+ */
+ public List getPaths() {
+ return this.paths;
+ }
+
+ /**
+ * Set the paths property: A list of blob storage account paths.
+ *
+ * @param paths the paths value to set.
+ * @return the BlobStorageArtifact object itself.
+ */
+ public BlobStorageArtifact setPaths(List paths) {
+ this.paths = paths;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public BlobStorageArtifact setStoreReference(StoreReference storeReference) {
+ super.setStoreReference(storeReference);
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShare.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShare.java
new file mode 100644
index 0000000000000..1bfd6ecad8576
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShare.java
@@ -0,0 +1,306 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.time.OffsetDateTime;
+
+/** An InPlace received share kind. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "shareKind")
+@JsonTypeName("InPlace")
+@JsonFlatten
+@Fluent
+public class InPlaceReceivedShare extends ReceivedShare {
+ /*
+ * Location of the shared Asset.
+ */
+ @JsonProperty(value = "properties.assetLocation", access = JsonProperty.Access.WRITE_ONLY)
+ private String assetLocation;
+
+ /*
+ * The types of asset.
+ */
+ @JsonProperty(value = "properties.assetStoreKind", access = JsonProperty.Access.WRITE_ONLY)
+ private StoreKind assetStoreKind;
+
+ /*
+ * Time at which the received share was created.
+ */
+ @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdAt;
+
+ /*
+ * Received Share Name
+ */
+ @JsonProperty(value = "properties.displayName")
+ private String displayName;
+
+ /*
+ * The expiration date of the received share.
+ */
+ @JsonProperty(value = "properties.expirationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime expirationDate;
+
+ /*
+ * Provisioning status of the resource
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Email of the user/receiver who received the sent share invitation
+ */
+ @JsonProperty(value = "properties.receiverEmail", access = JsonProperty.Access.WRITE_ONLY)
+ private String receiverEmail;
+
+ /*
+ * Name of the user/receiver who received the sent share invitation
+ */
+ @JsonProperty(value = "properties.receiverName", access = JsonProperty.Access.WRITE_ONLY)
+ private String receiverName;
+
+ /*
+ * Tenant name of the user/receiver who received the sent share invitation
+ */
+ @JsonProperty(value = "properties.receiverTenantName", access = JsonProperty.Access.WRITE_ONLY)
+ private String receiverTenantName;
+
+ /*
+ * Email of the sender who created the sent share invitation
+ */
+ @JsonProperty(value = "properties.senderEmail", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderEmail;
+
+ /*
+ * Name of the sender who created the sent share invitation
+ */
+ @JsonProperty(value = "properties.senderName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderName;
+
+ /*
+ * Tenant name of the sender who created the sent share invitation
+ */
+ @JsonProperty(value = "properties.senderTenantName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderTenantName;
+
+ /*
+ * Share description.
+ */
+ @JsonProperty(value = "properties.sentShareDescription", access = JsonProperty.Access.WRITE_ONLY)
+ private String sentShareDescription;
+
+ /*
+ * Time at which the sent share was shared.
+ */
+ @JsonProperty(value = "properties.sharedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime sharedAt;
+
+ /*
+ * Share status.
+ */
+ @JsonProperty(value = "properties.shareStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private ShareStatus shareStatus;
+
+ /*
+ * Received share sink
+ */
+ @JsonProperty(value = "properties.sink")
+ private Sink sink;
+
+ /** Creates an instance of InPlaceReceivedShare class. */
+ public InPlaceReceivedShare() {}
+
+ /**
+ * Get the assetLocation property: Location of the shared Asset.
+ *
+ * @return the assetLocation value.
+ */
+ public String getAssetLocation() {
+ return this.assetLocation;
+ }
+
+ /**
+ * Get the assetStoreKind property: The types of asset.
+ *
+ * @return the assetStoreKind value.
+ */
+ public StoreKind getAssetStoreKind() {
+ return this.assetStoreKind;
+ }
+
+ /**
+ * Set the assetStoreKind property: The types of asset.
+ *
+ * @param assetStoreKind the assetStoreKind value to set.
+ * @return the InPlaceReceivedShare object itself.
+ */
+ public InPlaceReceivedShare setAssetStoreKind(StoreKind assetStoreKind) {
+ this.assetStoreKind = assetStoreKind;
+ return this;
+ }
+
+ /**
+ * Get the createdAt property: Time at which the received share was created.
+ *
+ * @return the createdAt value.
+ */
+ public OffsetDateTime getCreatedAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the displayName property: Received Share Name.
+ *
+ * @return the displayName value.
+ */
+ public String getDisplayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: Received Share Name.
+ *
+ * @param displayName the displayName value to set.
+ * @return the InPlaceReceivedShare object itself.
+ */
+ public InPlaceReceivedShare setDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the expirationDate property: The expiration date of the received share.
+ *
+ * @return the expirationDate value.
+ */
+ public OffsetDateTime getExpirationDate() {
+ return this.expirationDate;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning status of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState getProvisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the receiverEmail property: Email of the user/receiver who received the sent share invitation.
+ *
+ * @return the receiverEmail value.
+ */
+ public String getReceiverEmail() {
+ return this.receiverEmail;
+ }
+
+ /**
+ * Get the receiverName property: Name of the user/receiver who received the sent share invitation.
+ *
+ * @return the receiverName value.
+ */
+ public String getReceiverName() {
+ return this.receiverName;
+ }
+
+ /**
+ * Get the receiverTenantName property: Tenant name of the user/receiver who received the sent share invitation.
+ *
+ * @return the receiverTenantName value.
+ */
+ public String getReceiverTenantName() {
+ return this.receiverTenantName;
+ }
+
+ /**
+ * Get the senderEmail property: Email of the sender who created the sent share invitation.
+ *
+ * @return the senderEmail value.
+ */
+ public String getSenderEmail() {
+ return this.senderEmail;
+ }
+
+ /**
+ * Get the senderName property: Name of the sender who created the sent share invitation.
+ *
+ * @return the senderName value.
+ */
+ public String getSenderName() {
+ return this.senderName;
+ }
+
+ /**
+ * Get the senderTenantName property: Tenant name of the sender who created the sent share invitation.
+ *
+ * @return the senderTenantName value.
+ */
+ public String getSenderTenantName() {
+ return this.senderTenantName;
+ }
+
+ /**
+ * Get the sentShareDescription property: Share description.
+ *
+ * @return the sentShareDescription value.
+ */
+ public String getSentShareDescription() {
+ return this.sentShareDescription;
+ }
+
+ /**
+ * Get the sharedAt property: Time at which the sent share was shared.
+ *
+ * @return the sharedAt value.
+ */
+ public OffsetDateTime getSharedAt() {
+ return this.sharedAt;
+ }
+
+ /**
+ * Get the shareStatus property: Share status.
+ *
+ * @return the shareStatus value.
+ */
+ public ShareStatus getShareStatus() {
+ return this.shareStatus;
+ }
+
+ /**
+ * Set the shareStatus property: Share status.
+ *
+ * @param shareStatus the shareStatus value to set.
+ * @return the InPlaceReceivedShare object itself.
+ */
+ public InPlaceReceivedShare setShareStatus(ShareStatus shareStatus) {
+ this.shareStatus = shareStatus;
+ return this;
+ }
+
+ /**
+ * Get the sink property: Received share sink.
+ *
+ * @return the sink value.
+ */
+ public Sink getSink() {
+ return this.sink;
+ }
+
+ /**
+ * Set the sink property: Received share sink.
+ *
+ * @param sink the sink value to set.
+ * @return the InPlaceReceivedShare object itself.
+ */
+ public InPlaceReceivedShare setSink(Sink sink) {
+ this.sink = sink;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InPlaceSentShare.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InPlaceSentShare.java
new file mode 100644
index 0000000000000..390770a4fc390
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InPlaceSentShare.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.UUID;
+
+/** An InPlace share kind. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "shareKind")
+@JsonTypeName("InPlace")
+@JsonFlatten
+@Fluent
+public class InPlaceSentShare extends SentShare {
+ /*
+ * A class for sent share artifact.
+ */
+ @JsonProperty(value = "properties.artifact", required = true)
+ private Artifact artifact;
+
+ /*
+ * Time at which the sent share was created.
+ */
+ @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdAt;
+
+ /*
+ * List of shares on which the sent share depends.
+ */
+ @JsonProperty(value = "properties.dependsOn", access = JsonProperty.Access.WRITE_ONLY)
+ private List dependsOn;
+
+ /*
+ * Sent share description.
+ */
+ @JsonProperty(value = "properties.description")
+ private String description;
+
+ /*
+ * The name of the sent share
+ */
+ @JsonProperty(value = "properties.displayName", required = true)
+ private String displayName;
+
+ /*
+ * Provisioning status of the resource
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Email of the sender who created the sent share.
+ */
+ @JsonProperty(value = "properties.senderEmail", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderEmail;
+
+ /*
+ * Name of the sender who created the sent share.
+ */
+ @JsonProperty(value = "properties.senderName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderName;
+
+ /*
+ * Tenant name of the sender who created the sent share.
+ */
+ @JsonProperty(value = "properties.senderTenantName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderTenantName;
+
+ /** Creates an instance of InPlaceSentShare class. */
+ public InPlaceSentShare() {}
+
+ /**
+ * Get the artifact property: A class for sent share artifact.
+ *
+ * @return the artifact value.
+ */
+ public Artifact getArtifact() {
+ return this.artifact;
+ }
+
+ /**
+ * Set the artifact property: A class for sent share artifact.
+ *
+ * @param artifact the artifact value to set.
+ * @return the InPlaceSentShare object itself.
+ */
+ public InPlaceSentShare setArtifact(Artifact artifact) {
+ this.artifact = artifact;
+ return this;
+ }
+
+ /**
+ * Get the createdAt property: Time at which the sent share was created.
+ *
+ * @return the createdAt value.
+ */
+ public OffsetDateTime getCreatedAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the dependsOn property: List of shares on which the sent share depends.
+ *
+ * @return the dependsOn value.
+ */
+ public List getDependsOn() {
+ return this.dependsOn;
+ }
+
+ /**
+ * Get the description property: Sent share description.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Sent share description.
+ *
+ * @param description the description value to set.
+ * @return the InPlaceSentShare object itself.
+ */
+ public InPlaceSentShare setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The name of the sent share.
+ *
+ * @return the displayName value.
+ */
+ public String getDisplayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The name of the sent share.
+ *
+ * @param displayName the displayName value to set.
+ * @return the InPlaceSentShare object itself.
+ */
+ public InPlaceSentShare setDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning status of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState getProvisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the senderEmail property: Email of the sender who created the sent share.
+ *
+ * @return the senderEmail value.
+ */
+ public String getSenderEmail() {
+ return this.senderEmail;
+ }
+
+ /**
+ * Get the senderName property: Name of the sender who created the sent share.
+ *
+ * @return the senderName value.
+ */
+ public String getSenderName() {
+ return this.senderName;
+ }
+
+ /**
+ * Get the senderTenantName property: Tenant name of the sender who created the sent share.
+ *
+ * @return the senderTenantName value.
+ */
+ public String getSenderTenantName() {
+ return this.senderTenantName;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InvitationKind.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InvitationKind.java
new file mode 100644
index 0000000000000..53c5a60a5ebd3
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/InvitationKind.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** The types of invitations. */
+public final class InvitationKind extends ExpandableStringEnum {
+ /** Static value User for InvitationKind. */
+ public static final InvitationKind USER = fromString("User");
+
+ /** Static value Service for InvitationKind. */
+ public static final InvitationKind SERVICE = fromString("Service");
+
+ /**
+ * Creates a new instance of InvitationKind value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public InvitationKind() {}
+
+ /**
+ * Creates or finds a InvitationKind from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding InvitationKind.
+ */
+ @JsonCreator
+ public static InvitationKind fromString(String name) {
+ return fromString(name, InvitationKind.class);
+ }
+
+ /**
+ * Gets known InvitationKind values.
+ *
+ * @return known InvitationKind values.
+ */
+ public static Collection values() {
+ return values(InvitationKind.class);
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ProvisioningState.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ProvisioningState.java
new file mode 100644
index 0000000000000..8cd634925a790
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ProvisioningState.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Provisioning status of the resource. */
+public final class ProvisioningState extends ExpandableStringEnum {
+ /** Static value Unknown for ProvisioningState. */
+ public static final ProvisioningState UNKNOWN = fromString("Unknown");
+
+ /** Static value Succeeded for ProvisioningState. */
+ public static final ProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Creating for ProvisioningState. */
+ public static final ProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Deleting for ProvisioningState. */
+ public static final ProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Moving for ProvisioningState. */
+ public static final ProvisioningState MOVING = fromString("Moving");
+
+ /** Static value Failed for ProvisioningState. */
+ public static final ProvisioningState FAILED = fromString("Failed");
+
+ /**
+ * Creates a new instance of ProvisioningState value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ProvisioningState() {}
+
+ /**
+ * Creates or finds a ProvisioningState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ProvisioningState.
+ */
+ @JsonCreator
+ public static ProvisioningState fromString(String name) {
+ return fromString(name, ProvisioningState.class);
+ }
+
+ /**
+ * Gets known ProvisioningState values.
+ *
+ * @return known ProvisioningState values.
+ */
+ public static Collection values() {
+ return values(ProvisioningState.class);
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareError.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareError.java
new file mode 100644
index 0000000000000..711fad242f45f
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareError.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The purview share error model. */
+@Fluent
+public final class PurviewShareError {
+ /*
+ * The purview share error body model.
+ */
+ @JsonProperty(value = "error", required = true)
+ private PurviewShareErrorInfo error;
+
+ /** Creates an instance of PurviewShareError class. */
+ public PurviewShareError() {}
+
+ /**
+ * Get the error property: The purview share error body model.
+ *
+ * @return the error value.
+ */
+ public PurviewShareErrorInfo getError() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: The purview share error body model.
+ *
+ * @param error the error value to set.
+ * @return the PurviewShareError object itself.
+ */
+ public PurviewShareError setError(PurviewShareErrorInfo error) {
+ this.error = error;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorException.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorException.java
new file mode 100644
index 0000000000000..6f1aef2a28b6d
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorException.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.http.HttpResponse;
+
+/** Exception thrown for an invalid response with PurviewShareError information. */
+public final class PurviewShareErrorException extends HttpResponseException {
+ /**
+ * Initializes a new instance of the PurviewShareErrorException class.
+ *
+ * @param message the exception message or the response content if a message is not available.
+ * @param response the HTTP response.
+ */
+ public PurviewShareErrorException(String message, HttpResponse response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the PurviewShareErrorException class.
+ *
+ * @param message the exception message or the response content if a message is not available.
+ * @param response the HTTP response.
+ * @param value the deserialized response value.
+ */
+ public PurviewShareErrorException(String message, HttpResponse response, PurviewShareError value) {
+ super(message, response, value);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public PurviewShareError getValue() {
+ return (PurviewShareError) super.getValue();
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorInfo.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorInfo.java
new file mode 100644
index 0000000000000..0977d71f41238
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorInfo.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The purview share error body model. */
+@Fluent
+public final class PurviewShareErrorInfo {
+ /*
+ * Code of the error
+ */
+ @JsonProperty(value = "code", required = true)
+ private String code;
+
+ /*
+ * Nested details of the error model
+ */
+ @JsonProperty(value = "details")
+ private List details;
+
+ /*
+ * Message of the error
+ */
+ @JsonProperty(value = "message", required = true)
+ private String message;
+
+ /*
+ * Target of the error
+ */
+ @JsonProperty(value = "target")
+ private String target;
+
+ /** Creates an instance of PurviewShareErrorInfo class. */
+ public PurviewShareErrorInfo() {}
+
+ /**
+ * Get the code property: Code of the error.
+ *
+ * @return the code value.
+ */
+ public String getCode() {
+ return this.code;
+ }
+
+ /**
+ * Set the code property: Code of the error.
+ *
+ * @param code the code value to set.
+ * @return the PurviewShareErrorInfo object itself.
+ */
+ public PurviewShareErrorInfo setCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get the details property: Nested details of the error model.
+ *
+ * @return the details value.
+ */
+ public List getDetails() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: Nested details of the error model.
+ *
+ * @param details the details value to set.
+ * @return the PurviewShareErrorInfo object itself.
+ */
+ public PurviewShareErrorInfo setDetails(List details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Get the message property: Message of the error.
+ *
+ * @return the message value.
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Message of the error.
+ *
+ * @param message the message value to set.
+ * @return the PurviewShareErrorInfo object itself.
+ */
+ public PurviewShareErrorInfo setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the target property: Target of the error.
+ *
+ * @return the target value.
+ */
+ public String getTarget() {
+ return this.target;
+ }
+
+ /**
+ * Set the target property: Target of the error.
+ *
+ * @param target the target value to set.
+ * @return the PurviewShareErrorInfo object itself.
+ */
+ public PurviewShareErrorInfo setTarget(String target) {
+ this.target = target;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReceivedShare.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReceivedShare.java
new file mode 100644
index 0000000000000..2090f7686be0c
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReceivedShare.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** A received share data transfer object. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "shareKind",
+ defaultImpl = ReceivedShare.class)
+@JsonTypeName("ReceivedShare")
+@JsonSubTypes({@JsonSubTypes.Type(name = "InPlace", value = InPlaceReceivedShare.class)})
+@Immutable
+public class ReceivedShare extends Resource {
+ /** Creates an instance of ReceivedShare class. */
+ public ReceivedShare() {}
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReceivedShareList.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReceivedShareList.java
new file mode 100644
index 0000000000000..e232fdb56fe75
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReceivedShareList.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List of received shares. */
+@Fluent
+public final class ReceivedShareList {
+ /*
+ * The Url of next result page.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /*
+ * Collection of items of type DataTransferObjects.
+ */
+ @JsonProperty(value = "value", required = true)
+ private List value;
+
+ /** Creates an instance of ReceivedShareList class. */
+ public ReceivedShareList() {}
+
+ /**
+ * Get the nextLink property: The Url of next result page.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The Url of next result page.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the ReceivedShareList object itself.
+ */
+ public ReceivedShareList setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Get the value property: Collection of items of type DataTransferObjects.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Collection of items of type DataTransferObjects.
+ *
+ * @param value the value value to set.
+ * @return the ReceivedShareList object itself.
+ */
+ public ReceivedShareList setValue(List value) {
+ this.value = value;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReferenceNameType.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReferenceNameType.java
new file mode 100644
index 0000000000000..d372a280c9e49
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ReferenceNameType.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines the type of resource being shared. */
+public final class ReferenceNameType extends ExpandableStringEnum {
+ /** Static value ArmResourceReference for ReferenceNameType. */
+ public static final ReferenceNameType ARM_RESOURCE_REFERENCE = fromString("ArmResourceReference");
+
+ /**
+ * Creates a new instance of ReferenceNameType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ReferenceNameType() {}
+
+ /**
+ * Creates or finds a ReferenceNameType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ReferenceNameType.
+ */
+ @JsonCreator
+ public static ReferenceNameType fromString(String name) {
+ return fromString(name, ReferenceNameType.class);
+ }
+
+ /**
+ * Gets known ReferenceNameType values.
+ *
+ * @return known ReferenceNameType values.
+ */
+ public static Collection values() {
+ return values(ReferenceNameType.class);
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Resource.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Resource.java
new file mode 100644
index 0000000000000..f71c93713b582
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Resource.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Base data transfer object implementation for proxy resources. */
+@Immutable
+public class Resource {
+ /*
+ * The resource id of the resource.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * Type of the resource.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /** Creates an instance of Resource class. */
+ public Resource() {}
+
+ /**
+ * Get the id property: The resource id of the resource.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Get the type property: Type of the resource.
+ *
+ * @return the type value.
+ */
+ public String getType() {
+ return this.type;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShare.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShare.java
new file mode 100644
index 0000000000000..57cef4e2c4166
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShare.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** A sent share data transfer object. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "shareKind",
+ defaultImpl = SentShare.class)
+@JsonTypeName("SentShare")
+@JsonSubTypes({@JsonSubTypes.Type(name = "InPlace", value = InPlaceSentShare.class)})
+@Immutable
+public class SentShare extends Resource {
+ /** Creates an instance of SentShare class. */
+ public SentShare() {}
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareInvitation.java
new file mode 100644
index 0000000000000..14feaf09ff40f
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareInvitation.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** A sent share invitation data transfer object. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "invitationKind",
+ defaultImpl = SentShareInvitation.class)
+@JsonTypeName("SentShareInvitation")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "Service", value = ServiceInvitation.class),
+ @JsonSubTypes.Type(name = "User", value = UserInvitation.class)
+})
+@Immutable
+public class SentShareInvitation extends Resource {
+ /** Creates an instance of SentShareInvitation class. */
+ public SentShareInvitation() {}
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareInvitationList.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareInvitationList.java
new file mode 100644
index 0000000000000..3d2ddea49dbe0
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareInvitationList.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List of the sent share invitations. */
+@Fluent
+public final class SentShareInvitationList {
+ /*
+ * The Url of next result page.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /*
+ * Collection of items of type DataTransferObjects.
+ */
+ @JsonProperty(value = "value", required = true)
+ private List value;
+
+ /** Creates an instance of SentShareInvitationList class. */
+ public SentShareInvitationList() {}
+
+ /**
+ * Get the nextLink property: The Url of next result page.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The Url of next result page.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the SentShareInvitationList object itself.
+ */
+ public SentShareInvitationList setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Get the value property: Collection of items of type DataTransferObjects.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Collection of items of type DataTransferObjects.
+ *
+ * @param value the value value to set.
+ * @return the SentShareInvitationList object itself.
+ */
+ public SentShareInvitationList setValue(List value) {
+ this.value = value;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareList.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareList.java
new file mode 100644
index 0000000000000..5c3580caea5bf
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/SentShareList.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List of sent shares. */
+@Fluent
+public final class SentShareList {
+ /*
+ * The Url of next result page.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /*
+ * Collection of items of type DataTransferObjects.
+ */
+ @JsonProperty(value = "value", required = true)
+ private List value;
+
+ /** Creates an instance of SentShareList class. */
+ public SentShareList() {}
+
+ /**
+ * Get the nextLink property: The Url of next result page.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The Url of next result page.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the SentShareList object itself.
+ */
+ public SentShareList setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Get the value property: Collection of items of type DataTransferObjects.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Collection of items of type DataTransferObjects.
+ *
+ * @param value the value value to set.
+ * @return the SentShareList object itself.
+ */
+ public SentShareList setValue(List value) {
+ this.value = value;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ServiceInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ServiceInvitation.java
new file mode 100644
index 0000000000000..bd4fd48730ea7
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ServiceInvitation.java
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.time.OffsetDateTime;
+import java.util.UUID;
+
+/** An service invitation kind. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "invitationKind")
+@JsonTypeName("Service")
+@JsonFlatten
+@Fluent
+public class ServiceInvitation extends SentShareInvitation {
+ /*
+ * The time at which the invitation will expire.
+ */
+ @JsonProperty(value = "properties.expirationDate")
+ private OffsetDateTime expirationDate;
+
+ /*
+ * Provisioning status of the resource
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Email address of the sender.
+ */
+ @JsonProperty(value = "properties.senderEmail", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderEmail;
+
+ /*
+ * Name of the sender
+ */
+ @JsonProperty(value = "properties.senderName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderName;
+
+ /*
+ * Tenant name of the sender
+ */
+ @JsonProperty(value = "properties.senderTenantName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderTenantName;
+
+ /*
+ * Gets the time at which the invitation was sent.
+ */
+ @JsonProperty(value = "properties.sentAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime sentAt;
+
+ /*
+ * Share status.
+ */
+ @JsonProperty(value = "properties.shareStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private ShareStatus shareStatus;
+
+ /*
+ * The target azure active directory id the invitation is sent to.
+ */
+ @JsonProperty(value = "properties.targetActiveDirectoryId", required = true)
+ private UUID targetActiveDirectoryId;
+
+ /*
+ * The target object id in the azure active directory the invitation is sent to.
+ */
+ @JsonProperty(value = "properties.targetObjectId", required = true)
+ private UUID targetObjectId;
+
+ /** Creates an instance of ServiceInvitation class. */
+ public ServiceInvitation() {}
+
+ /**
+ * Get the expirationDate property: The time at which the invitation will expire.
+ *
+ * @return the expirationDate value.
+ */
+ public OffsetDateTime getExpirationDate() {
+ return this.expirationDate;
+ }
+
+ /**
+ * Set the expirationDate property: The time at which the invitation will expire.
+ *
+ * @param expirationDate the expirationDate value to set.
+ * @return the ServiceInvitation object itself.
+ */
+ public ServiceInvitation setExpirationDate(OffsetDateTime expirationDate) {
+ this.expirationDate = expirationDate;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning status of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState getProvisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the senderEmail property: Email address of the sender.
+ *
+ * @return the senderEmail value.
+ */
+ public String getSenderEmail() {
+ return this.senderEmail;
+ }
+
+ /**
+ * Get the senderName property: Name of the sender.
+ *
+ * @return the senderName value.
+ */
+ public String getSenderName() {
+ return this.senderName;
+ }
+
+ /**
+ * Get the senderTenantName property: Tenant name of the sender.
+ *
+ * @return the senderTenantName value.
+ */
+ public String getSenderTenantName() {
+ return this.senderTenantName;
+ }
+
+ /**
+ * Get the sentAt property: Gets the time at which the invitation was sent.
+ *
+ * @return the sentAt value.
+ */
+ public OffsetDateTime getSentAt() {
+ return this.sentAt;
+ }
+
+ /**
+ * Get the shareStatus property: Share status.
+ *
+ * @return the shareStatus value.
+ */
+ public ShareStatus getShareStatus() {
+ return this.shareStatus;
+ }
+
+ /**
+ * Set the shareStatus property: Share status.
+ *
+ * @param shareStatus the shareStatus value to set.
+ * @return the ServiceInvitation object itself.
+ */
+ public ServiceInvitation setShareStatus(ShareStatus shareStatus) {
+ this.shareStatus = shareStatus;
+ return this;
+ }
+
+ /**
+ * Get the targetActiveDirectoryId property: The target azure active directory id the invitation is sent to.
+ *
+ * @return the targetActiveDirectoryId value.
+ */
+ public UUID getTargetActiveDirectoryId() {
+ return this.targetActiveDirectoryId;
+ }
+
+ /**
+ * Set the targetActiveDirectoryId property: The target azure active directory id the invitation is sent to.
+ *
+ * @param targetActiveDirectoryId the targetActiveDirectoryId value to set.
+ * @return the ServiceInvitation object itself.
+ */
+ public ServiceInvitation setTargetActiveDirectoryId(UUID targetActiveDirectoryId) {
+ this.targetActiveDirectoryId = targetActiveDirectoryId;
+ return this;
+ }
+
+ /**
+ * Get the targetObjectId property: The target object id in the azure active directory the invitation is sent to.
+ *
+ * @return the targetObjectId value.
+ */
+ public UUID getTargetObjectId() {
+ return this.targetObjectId;
+ }
+
+ /**
+ * Set the targetObjectId property: The target object id in the azure active directory the invitation is sent to.
+ *
+ * @param targetObjectId the targetObjectId value to set.
+ * @return the ServiceInvitation object itself.
+ */
+ public ServiceInvitation setTargetObjectId(UUID targetObjectId) {
+ this.targetObjectId = targetObjectId;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ShareKind.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ShareKind.java
new file mode 100644
index 0000000000000..b4cba510b9300
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ShareKind.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines the supported types for share. */
+public final class ShareKind extends ExpandableStringEnum {
+ /** Static value InPlace for ShareKind. */
+ public static final ShareKind IN_PLACE = fromString("InPlace");
+
+ /**
+ * Creates a new instance of ShareKind value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ShareKind() {}
+
+ /**
+ * Creates or finds a ShareKind from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ShareKind.
+ */
+ @JsonCreator
+ public static ShareKind fromString(String name) {
+ return fromString(name, ShareKind.class);
+ }
+
+ /**
+ * Gets known ShareKind values.
+ *
+ * @return known ShareKind values.
+ */
+ public static Collection values() {
+ return values(ShareKind.class);
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ShareStatus.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ShareStatus.java
new file mode 100644
index 0000000000000..f5404a5f76fa5
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/ShareStatus.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Share status. */
+public final class ShareStatus extends ExpandableStringEnum {
+ /** Static value Detached for ShareStatus. */
+ public static final ShareStatus DETACHED = fromString("Detached");
+
+ /** Static value Attached for ShareStatus. */
+ public static final ShareStatus ATTACHED = fromString("Attached");
+
+ /**
+ * Creates a new instance of ShareStatus value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ShareStatus() {}
+
+ /**
+ * Creates or finds a ShareStatus from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ShareStatus.
+ */
+ @JsonCreator
+ public static ShareStatus fromString(String name) {
+ return fromString(name, ShareStatus.class);
+ }
+
+ /**
+ * Gets known ShareStatus values.
+ *
+ * @return known ShareStatus values.
+ */
+ public static Collection values() {
+ return values(ShareStatus.class);
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Sink.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Sink.java
new file mode 100644
index 0000000000000..da4603726fda2
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/Sink.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** Received share sink. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "storeKind",
+ defaultImpl = Sink.class)
+@JsonTypeName("Sink")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "AdlsGen2Account", value = AdlsGen2AccountSink.class),
+ @JsonSubTypes.Type(name = "BlobAccount", value = BlobAccountSink.class)
+})
+@Fluent
+public class Sink {
+ /*
+ * A Store Reference for an artifact or sink.
+ */
+ @JsonProperty(value = "storeReference", required = true)
+ private StoreReference storeReference;
+
+ /** Creates an instance of Sink class. */
+ public Sink() {}
+
+ /**
+ * Get the storeReference property: A Store Reference for an artifact or sink.
+ *
+ * @return the storeReference value.
+ */
+ public StoreReference getStoreReference() {
+ return this.storeReference;
+ }
+
+ /**
+ * Set the storeReference property: A Store Reference for an artifact or sink.
+ *
+ * @param storeReference the storeReference value to set.
+ * @return the Sink object itself.
+ */
+ public Sink setStoreReference(StoreReference storeReference) {
+ this.storeReference = storeReference;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StorageAccountPath.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StorageAccountPath.java
new file mode 100644
index 0000000000000..adb04646fc663
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StorageAccountPath.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Defines a single StorageAccountPath path. */
+@Fluent
+public final class StorageAccountPath {
+ /*
+ * Gets or sets the container name
+ */
+ @JsonProperty(value = "containerName", required = true)
+ private String containerName;
+
+ /*
+ * Gets or sets the path on the receiver side where the artifact is to be mapped
+ */
+ @JsonProperty(value = "receiverPath")
+ private String receiverPath;
+
+ /*
+ * Gets or sets the path to file/folder within the container to be shared
+ */
+ @JsonProperty(value = "senderPath")
+ private String senderPath;
+
+ /** Creates an instance of StorageAccountPath class. */
+ public StorageAccountPath() {}
+
+ /**
+ * Get the containerName property: Gets or sets the container name.
+ *
+ * @return the containerName value.
+ */
+ public String getContainerName() {
+ return this.containerName;
+ }
+
+ /**
+ * Set the containerName property: Gets or sets the container name.
+ *
+ * @param containerName the containerName value to set.
+ * @return the StorageAccountPath object itself.
+ */
+ public StorageAccountPath setContainerName(String containerName) {
+ this.containerName = containerName;
+ return this;
+ }
+
+ /**
+ * Get the receiverPath property: Gets or sets the path on the receiver side where the artifact is to be mapped.
+ *
+ * @return the receiverPath value.
+ */
+ public String getReceiverPath() {
+ return this.receiverPath;
+ }
+
+ /**
+ * Set the receiverPath property: Gets or sets the path on the receiver side where the artifact is to be mapped.
+ *
+ * @param receiverPath the receiverPath value to set.
+ * @return the StorageAccountPath object itself.
+ */
+ public StorageAccountPath setReceiverPath(String receiverPath) {
+ this.receiverPath = receiverPath;
+ return this;
+ }
+
+ /**
+ * Get the senderPath property: Gets or sets the path to file/folder within the container to be shared.
+ *
+ * @return the senderPath value.
+ */
+ public String getSenderPath() {
+ return this.senderPath;
+ }
+
+ /**
+ * Set the senderPath property: Gets or sets the path to file/folder within the container to be shared.
+ *
+ * @param senderPath the senderPath value to set.
+ * @return the StorageAccountPath object itself.
+ */
+ public StorageAccountPath setSenderPath(String senderPath) {
+ this.senderPath = senderPath;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StoreKind.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StoreKind.java
new file mode 100644
index 0000000000000..823ccef17103a
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StoreKind.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** The types of asset. */
+public final class StoreKind extends ExpandableStringEnum {
+ /** Static value AdlsGen2Account for StoreKind. */
+ public static final StoreKind ADLS_GEN2ACCOUNT = fromString("AdlsGen2Account");
+
+ /** Static value BlobAccount for StoreKind. */
+ public static final StoreKind BLOB_ACCOUNT = fromString("BlobAccount");
+
+ /**
+ * Creates a new instance of StoreKind value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public StoreKind() {}
+
+ /**
+ * Creates or finds a StoreKind from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding StoreKind.
+ */
+ @JsonCreator
+ public static StoreKind fromString(String name) {
+ return fromString(name, StoreKind.class);
+ }
+
+ /**
+ * Gets known StoreKind values.
+ *
+ * @return known StoreKind values.
+ */
+ public static Collection values() {
+ return values(StoreKind.class);
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StoreReference.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StoreReference.java
new file mode 100644
index 0000000000000..38075881465b9
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/StoreReference.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A Store Reference for an artifact or sink. */
+@Fluent
+public final class StoreReference {
+ /*
+ * Reference name for resource associated with the sink or artifact.
+ */
+ @JsonProperty(value = "referenceName")
+ private String referenceName;
+
+ /*
+ * Defines the type of resource being shared
+ */
+ @JsonProperty(value = "type")
+ private ReferenceNameType type;
+
+ /** Creates an instance of StoreReference class. */
+ public StoreReference() {}
+
+ /**
+ * Get the referenceName property: Reference name for resource associated with the sink or artifact.
+ *
+ * @return the referenceName value.
+ */
+ public String getReferenceName() {
+ return this.referenceName;
+ }
+
+ /**
+ * Set the referenceName property: Reference name for resource associated with the sink or artifact.
+ *
+ * @param referenceName the referenceName value to set.
+ * @return the StoreReference object itself.
+ */
+ public StoreReference setReferenceName(String referenceName) {
+ this.referenceName = referenceName;
+ return this;
+ }
+
+ /**
+ * Get the type property: Defines the type of resource being shared.
+ *
+ * @return the type value.
+ */
+ public ReferenceNameType getType() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Defines the type of resource being shared.
+ *
+ * @param type the type value to set.
+ * @return the StoreReference object itself.
+ */
+ public StoreReference setType(ReferenceNameType type) {
+ this.type = type;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistration.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistration.java
new file mode 100644
index 0000000000000..8bd7c88f9b662
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistration.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A tenant email registration data transfer object. */
+@JsonFlatten
+@Fluent
+public class TenantEmailRegistration extends Resource {
+ /*
+ * Activation code for the registration.
+ */
+ @JsonProperty(value = "properties.activationCode")
+ private String activationCode;
+
+ /*
+ * Date of the activation expiration.
+ */
+ @JsonProperty(value = "properties.activationExpiration", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime activationExpiration;
+
+ /*
+ * The email to register.
+ */
+ @JsonProperty(value = "properties.email", access = JsonProperty.Access.WRITE_ONLY)
+ private String email;
+
+ /*
+ * Provisioning status of the resource
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Defines the supported types for registration.
+ */
+ @JsonProperty(value = "properties.registrationStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private TenantEmailRegistrationStatus registrationStatus;
+
+ /*
+ * The tenant id to register.
+ */
+ @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /** Creates an instance of TenantEmailRegistration class. */
+ public TenantEmailRegistration() {}
+
+ /**
+ * Get the activationCode property: Activation code for the registration.
+ *
+ * @return the activationCode value.
+ */
+ public String getActivationCode() {
+ return this.activationCode;
+ }
+
+ /**
+ * Set the activationCode property: Activation code for the registration.
+ *
+ * @param activationCode the activationCode value to set.
+ * @return the TenantEmailRegistration object itself.
+ */
+ public TenantEmailRegistration setActivationCode(String activationCode) {
+ this.activationCode = activationCode;
+ return this;
+ }
+
+ /**
+ * Get the activationExpiration property: Date of the activation expiration.
+ *
+ * @return the activationExpiration value.
+ */
+ public OffsetDateTime getActivationExpiration() {
+ return this.activationExpiration;
+ }
+
+ /**
+ * Get the email property: The email to register.
+ *
+ * @return the email value.
+ */
+ public String getEmail() {
+ return this.email;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning status of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState getProvisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the registrationStatus property: Defines the supported types for registration.
+ *
+ * @return the registrationStatus value.
+ */
+ public TenantEmailRegistrationStatus getRegistrationStatus() {
+ return this.registrationStatus;
+ }
+
+ /**
+ * Get the tenantId property: The tenant id to register.
+ *
+ * @return the tenantId value.
+ */
+ public String getTenantId() {
+ return this.tenantId;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationStatus.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationStatus.java
new file mode 100644
index 0000000000000..16a43bf2c8283
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationStatus.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines the supported types for registration. */
+public final class TenantEmailRegistrationStatus extends ExpandableStringEnum {
+ /** Static value ActivationPending for TenantEmailRegistrationStatus. */
+ public static final TenantEmailRegistrationStatus ACTIVATION_PENDING = fromString("ActivationPending");
+
+ /** Static value Activated for TenantEmailRegistrationStatus. */
+ public static final TenantEmailRegistrationStatus ACTIVATED = fromString("Activated");
+
+ /** Static value ActivationAttemptsExhausted for TenantEmailRegistrationStatus. */
+ public static final TenantEmailRegistrationStatus ACTIVATION_ATTEMPTS_EXHAUSTED =
+ fromString("ActivationAttemptsExhausted");
+
+ /**
+ * Creates a new instance of TenantEmailRegistrationStatus value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public TenantEmailRegistrationStatus() {}
+
+ /**
+ * Creates or finds a TenantEmailRegistrationStatus from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding TenantEmailRegistrationStatus.
+ */
+ @JsonCreator
+ public static TenantEmailRegistrationStatus fromString(String name) {
+ return fromString(name, TenantEmailRegistrationStatus.class);
+ }
+
+ /**
+ * Gets known TenantEmailRegistrationStatus values.
+ *
+ * @return known TenantEmailRegistrationStatus values.
+ */
+ public static Collection values() {
+ return values(TenantEmailRegistrationStatus.class);
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/UserInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/UserInvitation.java
new file mode 100644
index 0000000000000..2afecb369f760
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/UserInvitation.java
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+package com.azure.analytics.purview.sharing.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.time.OffsetDateTime;
+
+/** A user invitation kind. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "invitationKind")
+@JsonTypeName("User")
+@JsonFlatten
+@Fluent
+public class UserInvitation extends SentShareInvitation {
+ /*
+ * The time at which the invitation will expire.
+ */
+ @JsonProperty(value = "properties.expirationDate")
+ private OffsetDateTime expirationDate;
+
+ /*
+ * Whether or not the recipient was notified via email.
+ */
+ @JsonProperty(value = "properties.notify")
+ private Boolean notify;
+
+ /*
+ * Provisioning status of the resource
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Email address of the sender.
+ */
+ @JsonProperty(value = "properties.senderEmail", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderEmail;
+
+ /*
+ * Name of the sender
+ */
+ @JsonProperty(value = "properties.senderName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderName;
+
+ /*
+ * Tenant name of the sender
+ */
+ @JsonProperty(value = "properties.senderTenantName", access = JsonProperty.Access.WRITE_ONLY)
+ private String senderTenantName;
+
+ /*
+ * Gets the time at which the invitation was sent.
+ */
+ @JsonProperty(value = "properties.sentAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime sentAt;
+
+ /*
+ * Share status.
+ */
+ @JsonProperty(value = "properties.shareStatus")
+ private ShareStatus shareStatus;
+
+ /*
+ * The receiver email for the invitation is being sent.
+ */
+ @JsonProperty(value = "properties.targetEmail", required = true)
+ private String targetEmail;
+
+ /** Creates an instance of UserInvitation class. */
+ public UserInvitation() {}
+
+ /**
+ * Get the expirationDate property: The time at which the invitation will expire.
+ *
+ * @return the expirationDate value.
+ */
+ public OffsetDateTime getExpirationDate() {
+ return this.expirationDate;
+ }
+
+ /**
+ * Set the expirationDate property: The time at which the invitation will expire.
+ *
+ * @param expirationDate the expirationDate value to set.
+ * @return the UserInvitation object itself.
+ */
+ public UserInvitation setExpirationDate(OffsetDateTime expirationDate) {
+ this.expirationDate = expirationDate;
+ return this;
+ }
+
+ /**
+ * Get the notify property: Whether or not the recipient was notified via email.
+ *
+ * @return the notify value.
+ */
+ public Boolean isNotify() {
+ return this.notify;
+ }
+
+ /**
+ * Set the notify property: Whether or not the recipient was notified via email.
+ *
+ * @param notify the notify value to set.
+ * @return the UserInvitation object itself.
+ */
+ public UserInvitation setNotify(Boolean notify) {
+ this.notify = notify;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning status of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState getProvisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the senderEmail property: Email address of the sender.
+ *
+ * @return the senderEmail value.
+ */
+ public String getSenderEmail() {
+ return this.senderEmail;
+ }
+
+ /**
+ * Get the senderName property: Name of the sender.
+ *
+ * @return the senderName value.
+ */
+ public String getSenderName() {
+ return this.senderName;
+ }
+
+ /**
+ * Get the senderTenantName property: Tenant name of the sender.
+ *
+ * @return the senderTenantName value.
+ */
+ public String getSenderTenantName() {
+ return this.senderTenantName;
+ }
+
+ /**
+ * Get the sentAt property: Gets the time at which the invitation was sent.
+ *
+ * @return the sentAt value.
+ */
+ public OffsetDateTime getSentAt() {
+ return this.sentAt;
+ }
+
+ /**
+ * Get the shareStatus property: Share status.
+ *
+ * @return the shareStatus value.
+ */
+ public ShareStatus getShareStatus() {
+ return this.shareStatus;
+ }
+
+ /**
+ * Set the shareStatus property: Share status.
+ *
+ * @param shareStatus the shareStatus value to set.
+ * @return the UserInvitation object itself.
+ */
+ public UserInvitation setShareStatus(ShareStatus shareStatus) {
+ this.shareStatus = shareStatus;
+ return this;
+ }
+
+ /**
+ * Get the targetEmail property: The receiver email for the invitation is being sent.
+ *
+ * @return the targetEmail value.
+ */
+ public String getTargetEmail() {
+ return this.targetEmail;
+ }
+
+ /**
+ * Set the targetEmail property: The receiver email for the invitation is being sent.
+ *
+ * @param targetEmail the targetEmail value to set.
+ * @return the UserInvitation object itself.
+ */
+ public UserInvitation setTargetEmail(String targetEmail) {
+ this.targetEmail = targetEmail;
+ return this;
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/package-info.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/package-info.java
new file mode 100644
index 0000000000000..b1064de9c6658
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/models/package-info.java
@@ -0,0 +1,7 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+
+/** Package containing the data models for PurviewShareClient. Creates a data plane client for Purview Share. */
+package com.azure.analytics.purview.sharing.models;
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/package-info.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/package-info.java
new file mode 100644
index 0000000000000..6059212b8f8cc
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the classes for PurviewShareClient. Creates a data plane client for Purview Share. */
+package com.azure.analytics.purview.sharing;
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/module-info.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/module-info.java
new file mode 100644
index 0000000000000..a64b5cc833ad1
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/module-info.java
@@ -0,0 +1,12 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+module com.azure.analytics.purview.sharing {
+ requires transitive com.azure.core;
+
+ exports com.azure.analytics.purview.sharing;
+
+ exports com.azure.analytics.purview.sharing.models;
+ opens com.azure.analytics.purview.sharing.models to com.azure.core, com.fasterxml.jackson.databind;
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/resources/azure-analytics-purview-sharing.properties b/sdk/purview/azure-analytics-purview-sharing/src/main/resources/azure-analytics-purview-sharing.properties
new file mode 100644
index 0000000000000..ca812989b4f27
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/main/resources/azure-analytics-purview-sharing.properties
@@ -0,0 +1,2 @@
+name=${project.artifactId}
+version=${project.version}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/README.md b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/README.md
new file mode 100644
index 0000000000000..6d898e8b2d9bd
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/README.md
@@ -0,0 +1,33 @@
+---
+page_type: sample
+languages:
+ - java
+products:
+ - azure
+urlFragment: purview-sharing-java-samples
+---
+
+# Azure Purview Sharing client library for Java samples
+This document explains samples and how to use them.
+
+## Key concepts
+Key concepts are explained in detail [here][SDK_README_KEY_CONCEPTS].
+
+## Getting started
+Getting started explained in detail [here][SDK_README_GETTING_STARTED].
+
+## Examples
+End-to-end examples for the client library can be viewed [here][sample_readme].
+
+## Next steps
+Start using Azure Purview Sharing Java SDK in your solutions. Our SDK details could be found at [SDK README][SHARE_SDK_README].
+
+## Contributing
+This project welcomes contributions and suggestions. Find [more contributing][SDK_README_CONTRIBUTING] details here.
+
+
+[SHARE_SDK_README]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/README.md
+[SDK_README_GETTING_STARTED]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/README.md#getting-started
+[SDK_README_KEY_CONCEPTS]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/README.md#key-concepts
+[SDK_README_CONTRIBUTING]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[sample_readme]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java
\ No newline at end of file
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java
new file mode 100644
index 0000000000000..eeba3915e1f49
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java
@@ -0,0 +1,327 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.analytics.purview.sharing;
+
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import com.azure.analytics.purview.sharing.models.BlobAccountSink;
+import com.azure.analytics.purview.sharing.models.BlobStorageArtifact;
+import com.azure.analytics.purview.sharing.models.InPlaceReceivedShare;
+import com.azure.analytics.purview.sharing.models.InPlaceSentShare;
+import com.azure.analytics.purview.sharing.models.ReceivedShare;
+import com.azure.analytics.purview.sharing.models.ReferenceNameType;
+import com.azure.analytics.purview.sharing.models.SentShare;
+import com.azure.analytics.purview.sharing.models.ServiceInvitation;
+import com.azure.analytics.purview.sharing.models.StorageAccountPath;
+import com.azure.analytics.purview.sharing.models.StoreReference;
+import com.azure.analytics.purview.sharing.models.UserInvitation;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+@SuppressWarnings("unused")
+public final class ReadmeSamples {
+
+ public void createSentShareClientSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.createSentShareClient
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+ // END: com.azure.analytics.purview.sharing.createSentShareClient
+ }
+
+ public void createSentShareSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.createSentShare
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ String sentShareId = UUID.randomUUID().toString();
+ InPlaceSentShare sentShare = new InPlaceSentShare()
+ .setDisplayName("sample-share")
+ .setDescription("A sample share");
+
+ StoreReference storeReference = new StoreReference()
+ .setReferenceName("/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/provider-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage")
+ .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE);
+
+ StorageAccountPath storageAccountPath = new StorageAccountPath()
+ .setContainerName("container-name")
+ .setReceiverPath("shared-file-name.txt")
+ .setSenderPath("original/file-name.txt");
+
+ List paths = new ArrayList<>();
+ paths.add(storageAccountPath);
+
+ BlobStorageArtifact artifact = new BlobStorageArtifact()
+ .setStoreReference(storeReference)
+ .setPaths(paths);
+
+ sentShare.setArtifact(artifact);
+
+ SyncPoller response =
+ sentSharesClient.beginCreateOrReplaceSentShare(
+ sentShareId,
+ BinaryData.fromObject(sentShare),
+ new RequestOptions());
+ // END: com.azure.analytics.purview.sharing.createSentShare
+ }
+
+ public void getSentShareSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.getSentShare
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ SentShare retrievedSentShare = sentSharesClient
+ .getSentShareWithResponse("", new RequestOptions())
+ .getValue()
+ .toObject(SentShare.class);
+ // END: com.azure.analytics.purview.sharing.getSentShare
+ }
+
+ public void deleteSentShareSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.deleteSentShare
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ sentSharesClient.beginDeleteSentShare(".purview.azure.com/share")
+ .buildClient();
+
+ PagedIterable sentShareResults = sentSharesClient.getAllSentShares(
+ "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/provider-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage",
+ new RequestOptions());
+
+ List sentShares = sentShareResults.stream()
+ .map(binaryData -> binaryData.toObject(SentShare.class))
+ .collect(Collectors.toList());
+ // END: com.azure.analytics.purview.sharing.getAllSentShares
+ }
+
+ public void sendUserInvitationSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.sendUserInvitation
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ String sentShareId = "";
+ String sentShareInvitationId = UUID.randomUUID().toString();
+
+ UserInvitation sentShareInvitation = new UserInvitation()
+ .setTargetEmail("receiver@microsoft.com")
+ .setNotify(true)
+ .setExpirationDate(OffsetDateTime.now().plusDays(60));
+
+ Response response =
+ sentSharesClient.createSentShareInvitationWithResponse(
+ sentShareId,
+ sentShareInvitationId,
+ BinaryData.fromObject(sentShareInvitation),
+ new RequestOptions());
+ // END: com.azure.analytics.purview.sharing.sendUserInvitation
+ }
+
+ public void sendServiceInvitationSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.sendServiceInvitation
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ String sentShareId = "";
+ String sentShareInvitationId = UUID.randomUUID().toString();
+
+ ServiceInvitation sentShareInvitation = new ServiceInvitation()
+ .setTargetActiveDirectoryId(UUID.fromString(""))
+ .setTargetObjectId(UUID.fromString(""))
+ .setExpirationDate(OffsetDateTime.now().plusDays(60));
+
+ Response response =
+ sentSharesClient.createSentShareInvitationWithResponse(
+ sentShareId,
+ sentShareInvitationId,
+ BinaryData.fromObject(sentShareInvitation),
+ new RequestOptions());
+ // END: com.azure.analytics.purview.sharing.sendServiceInvitation
+ }
+
+ public void viewSentInvitationsSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.getAllSentShareInvitations
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ String sentShareId = "";
+
+ RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/sentAt desc");
+ PagedIterable response =
+ sentSharesClient.getAllSentShareInvitations(sentShareId, requestOptions);
+ // END: com.azure.analytics.purview.sharing.getAllSentShareInvitations
+ }
+
+ public void getSentInvitationSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.getSentShareInvitation
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ String sentShareId = "";
+ String sentShareInvitationId = "";
+
+ Response sentShareInvitation =
+ sentSharesClient.getSentShareInvitationWithResponse(sentShareId, sentShareInvitationId, new RequestOptions());
+ // END: com.azure.analytics.purview.sharing.getSentShareInvitation
+ }
+
+ public void createReceivedShareClientSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.createReceivedShareClient
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+ // END: com.azure.analytics.purview.sharing.createReceivedShareClient
+ }
+
+ public void getAllDetachedReceivedSharesSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.getAllDetachedReceivedShares
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc");
+ PagedIterable response = receivedSharesClient.getAllDetachedReceivedShares(requestOptions);
+ // END: com.azure.analytics.purview.sharing.getAllDetachedReceivedShares
+ }
+
+ public void attachReceivedShareSample() throws JsonMappingException, JsonProcessingException {
+ // BEGIN: com.azure.analytics.purview.sharing.attachReceivedShare
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ RequestOptions listRequestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc");
+ PagedIterable listResponse = receivedSharesClient.getAllDetachedReceivedShares(listRequestOptions);
+
+ Optional detachedReceivedShare = listResponse.stream().findFirst();
+
+ if (!detachedReceivedShare.isPresent()) {
+ return;
+ }
+
+ String receivedShareId = new ObjectMapper()
+ .readValue(detachedReceivedShare.get().toString(), ObjectNode.class)
+ .get("id")
+ .textValue();
+
+ InPlaceReceivedShare receivedShare = new InPlaceReceivedShare()
+ .setDisplayName("my-received-share");
+
+ StoreReference storeReference = new StoreReference()
+ .setReferenceName("/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/consumer-storage-rg/providers/Microsoft.Storage/storageAccounts/consumerstorage")
+ .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE);
+
+ BlobAccountSink sink = new BlobAccountSink()
+ .setStoreReference(storeReference)
+ .setContainerName("container-name")
+ .setFolder("folderName")
+ .setMountPath("optionalMountPath");
+
+ receivedShare.setSink(sink);
+
+ SyncPoller createResponse =
+ receivedSharesClient.beginCreateOrReplaceReceivedShare(receivedShareId, BinaryData.fromObject(receivedShare), new RequestOptions());
+ // END: com.azure.analytics.purview.sharing.attachReceivedShare
+ }
+
+ public void getReceivedShareSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.getReceivedShare
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ Response receivedShare =
+ receivedSharesClient.getReceivedShareWithResponse("", new RequestOptions());
+ // END: com.azure.analytics.purview.sharing.getReceivedShare
+ }
+
+ public void listAttachedReceivedShareSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.getAllAttachedReceivedShares
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc");
+ PagedIterable response =
+ receivedSharesClient.getAllAttachedReceivedShares(
+ "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/consumer-storage-rg/providers/Microsoft.Storage/storageAccounts/consumerstorage",
+ requestOptions);
+
+ Optional receivedShare = response.stream().findFirst();
+
+ if (!receivedShare.isPresent()) {
+ return;
+ }
+
+ ReceivedShare receivedShareResponse = receivedShare.get().toObject(InPlaceReceivedShare.class);
+ // END: com.azure.analytics.purview.sharing.getAllAttachedReceivedShares
+ }
+
+ public void deleteReceivedShareSample() {
+ // BEGIN: com.azure.analytics.purview.sharing.deleteReceivedShare
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://.purview.azure.com/share")
+ .buildClient();
+
+ receivedSharesClient.beginDeleteReceivedShare("", new RequestOptions());
+ // END: com.azure.analytics.purview.sharing.deleteReceivedShare
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistration.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistration.java
new file mode 100644
index 0000000000000..b8c4efe860d94
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistration.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesActivateTenantEmailRegistration {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesactivatetenantemailregistration.receivedsharesactivatetenantemailregistration
+ BinaryData tenantEmailRegistration =
+ BinaryData.fromString("{\"properties\":{\"activationCode\":\"15ee7153fe0df5a3a449a897d6cec836\"}}");
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ receivedSharesClient.activateTenantEmailRegistrationWithResponse(
+ tenantEmailRegistration, requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesactivatetenantemailregistration.receivedsharesactivatetenantemailregistration
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplace.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplace.java
new file mode 100644
index 0000000000000..dbb73c0874744
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplace.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesCreateOrReplace {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharescreateorreplacereceivedshare.receivedsharescreateorreplace
+ BinaryData receivedShare =
+ BinaryData.fromString(
+ "{\"properties\":{\"displayName\":\"updatedReceivedShareName\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}}},\"shareKind\":\"InPlace\"}");
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ receivedSharesClient.beginCreateOrReplaceReceivedShare(
+ "0D67B9C8-A6C6-4990-9EDE-12EA059D3002", receivedShare, requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharescreateorreplacereceivedshare.receivedsharescreateorreplace
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2Account.java
new file mode 100644
index 0000000000000..5b08cf629b855
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2Account.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesCreateOrReplaceAdlsGen2Account {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharescreateorreplacereceivedshare.receivedsharescreateorreplaceadlsgen2account
+ BinaryData receivedShare =
+ BinaryData.fromString(
+ "{\"properties\":{\"displayName\":\"updatedReceivedShareNameAdls\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainerAbc\",\"folder\":\"receivingFolderAbc\",\"mountPath\":\"pathAbc\"},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/adlsAccount\"}}},\"shareKind\":\"InPlace\"}");
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ receivedSharesClient.beginCreateOrReplaceReceivedShare(
+ "35E28F0E-DEA4-472F-84E4-5F1E45FB9937", receivedShare, requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharescreateorreplacereceivedshare.receivedsharescreateorreplaceadlsgen2account
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccount.java
new file mode 100644
index 0000000000000..dcee873efd481
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccount.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesCreateOrReplaceBlobAccount {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharescreateorreplacereceivedshare.receivedsharescreateorreplaceblobaccount
+ BinaryData receivedShare =
+ BinaryData.fromString(
+ "{\"properties\":{\"displayName\":\"updatedReceivedShareName\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}}},\"shareKind\":\"InPlace\"}");
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ receivedSharesClient.beginCreateOrReplaceReceivedShare(
+ "0D67B9C8-A6C6-4990-9EDE-12EA059D3002", receivedShare, requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharescreateorreplacereceivedshare.receivedsharescreateorreplaceblobaccount
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDelete.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDelete.java
new file mode 100644
index 0000000000000..08c413bd4122d
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDelete.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesDelete {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesdeletereceivedshare.receivedsharesdelete
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ receivedSharesClient.beginDeleteReceivedShare("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesdeletereceivedshare.receivedsharesdelete
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGet.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGet.java
new file mode 100644
index 0000000000000..d533b60d982cf
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGet.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesGet {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesgetreceivedshare.receivedsharesget
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ receivedSharesClient.getReceivedShareWithResponse(
+ "0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesgetreceivedshare.receivedsharesget
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2Account.java
new file mode 100644
index 0000000000000..7bf063fedce9b
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2Account.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesGetAdlsGen2Account {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesgetreceivedshare.receivedsharesgetadlsgen2account
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ receivedSharesClient.getReceivedShareWithResponse(
+ "0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesgetreceivedshare.receivedsharesgetadlsgen2account
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccount.java
new file mode 100644
index 0000000000000..91e333fcd8c14
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccount.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesGetBlobAccount {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesgetreceivedshare.receivedsharesgetblobaccount
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ receivedSharesClient.getReceivedShareWithResponse(
+ "0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesgetreceivedshare.receivedsharesgetblobaccount
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttached.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttached.java
new file mode 100644
index 0000000000000..de8e805f28714
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttached.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesListAttached {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesgetallattachedreceivedshares.receivedshareslistattached
+ RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'");
+ PagedIterable response =
+ receivedSharesClient.getAllAttachedReceivedShares(
+ "/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount",
+ requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesgetallattachedreceivedshares.receivedshareslistattached
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetached.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetached.java
new file mode 100644
index 0000000000000..5aa37e6c544eb
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetached.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesListDetached {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesgetalldetachedreceivedshares.receivedshareslistdetached
+ RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'");
+ PagedIterable response = receivedSharesClient.getAllDetachedReceivedShares(requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesgetalldetachedreceivedshares.receivedshareslistdetached
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistration.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistration.java
new file mode 100644
index 0000000000000..f86e669cc632e
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistration.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.ReceivedSharesClient;
+import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class ReceivedSharesRegisterTenantEmailRegistration {
+ public static void main(String[] args) {
+ ReceivedSharesClient receivedSharesClient =
+ new ReceivedSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.receivedsharesregistertenantemailregistration.receivedsharesregistertenantemailregistration
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ receivedSharesClient.registerTenantEmailRegistrationWithResponse(requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.receivedsharesregistertenantemailregistration.receivedsharesregistertenantemailregistration
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitation.java
new file mode 100644
index 0000000000000..9ce3a8fe02a57
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitation.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesCreateInvitation {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharescreatesentshareinvitation.sentsharescreateinvitation
+ BinaryData sentShareInvitation =
+ BinaryData.fromString(
+ "{\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"targetEmail\":\"testReceiver@microsoft.com\"}}");
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.createSentShareInvitationWithResponse(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
+ "9F154FA4-93D1-426B-A908-A9CAC7192B21",
+ sentShareInvitation,
+ requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharescreatesentshareinvitation.sentsharescreateinvitation
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplace.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplace.java
new file mode 100644
index 0000000000000..122285dd4bc87
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplace.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesCreateOrReplace {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharescreateorreplacesentshare.sentsharescreateorreplace
+ BinaryData sentShare =
+ BinaryData.fromString(
+ "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}");
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ sentSharesClient.beginCreateOrReplaceSentShare(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharescreateorreplacesentshare.sentsharescreateorreplace
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2Account.java
new file mode 100644
index 0000000000000..73a7ecad078dc
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2Account.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesCreateOrReplaceAdlsGen2Account {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharescreateorreplacesentshare.sentsharescreateorreplaceadlsgen2account
+ BinaryData sentShare =
+ BinaryData.fromString(
+ "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}");
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ sentSharesClient.beginCreateOrReplaceSentShare(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharescreateorreplacesentshare.sentsharescreateorreplaceadlsgen2account
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccount.java
new file mode 100644
index 0000000000000..bffd7b4b56221
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccount.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesCreateOrReplaceBlobAccount {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharescreateorreplacesentshare.sentsharescreateorreplaceblobaccount
+ BinaryData sentShare =
+ BinaryData.fromString(
+ "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}");
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ sentSharesClient.beginCreateOrReplaceSentShare(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharescreateorreplacesentshare.sentsharescreateorreplaceblobaccount
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitation.java
new file mode 100644
index 0000000000000..49be2f2cf4c74
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitation.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesCreateServiceInvitation {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharescreatesentshareinvitation.sentsharescreateserviceinvitation
+ BinaryData sentShareInvitation =
+ BinaryData.fromString(
+ "{\"invitationKind\":\"Service\",\"properties\":{\"expirationDate\":null,\"targetActiveDirectoryId\":\"5DAE1226-9FAA-4D71-B8D4-87B81DFF672E\",\"targetObjectId\":\"EFA02830-BB7A-4586-B615-A6DFF19FEBBF\"}}");
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.createSentShareInvitationWithResponse(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
+ "9F154FA4-93D1-426B-A908-A9CAC7192B21",
+ sentShareInvitation,
+ requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharescreatesentshareinvitation.sentsharescreateserviceinvitation
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitation.java
new file mode 100644
index 0000000000000..cb774f540e244
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitation.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesCreateUserInvitation {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharescreatesentshareinvitation.sentsharescreateuserinvitation
+ BinaryData sentShareInvitation =
+ BinaryData.fromString(
+ "{\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":\"2025-07-21T23:52:00.7691109Z\",\"notify\":true,\"targetEmail\":\"testReceiver@microsoft.com\"}}");
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.createSentShareInvitationWithResponse(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E",
+ "9F154FA4-93D1-426B-A908-A9CAC7192B21",
+ sentShareInvitation,
+ requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharescreatesentshareinvitation.sentsharescreateuserinvitation
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDelete.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDelete.java
new file mode 100644
index 0000000000000..6ee41dd3c6dca
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDelete.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesDelete {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesdeletesentshare.sentsharesdelete
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ sentSharesClient.beginDeleteSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharesdeletesentshare.sentsharesdelete
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitation.java
new file mode 100644
index 0000000000000..4717cefa83967
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitation.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesDeleteInvitation {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesdeletesentshareinvitation.sentsharesdeleteinvitation
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ sentSharesClient.beginDeleteSentShareInvitation(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharesdeletesentshareinvitation.sentsharesdeleteinvitation
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGet.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGet.java
new file mode 100644
index 0000000000000..1995b86e331d3
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGet.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesGet {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshare.sentsharesget
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshare.sentsharesget
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2Account.java
new file mode 100644
index 0000000000000..e65cc291dba07
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2Account.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesGetAdlsGen2Account {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshare.sentsharesgetadlsgen2account
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshare.sentsharesgetadlsgen2account
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccount.java
new file mode 100644
index 0000000000000..360f58e0ca987
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccount.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesGetBlobAccount {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshare.sentsharesgetblobaccount
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshare.sentsharesgetblobaccount
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitation.java
new file mode 100644
index 0000000000000..4025e374c8565
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitation.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesGetInvitation {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshareinvitation.sentsharesgetinvitation
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.getSentShareInvitationWithResponse(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshareinvitation.sentsharesgetinvitation
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitation.java
new file mode 100644
index 0000000000000..7c55f74342c98
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitation.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesGetServiceInvitation {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshareinvitation.sentsharesgetserviceinvitation
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ sentSharesClient.getSentShareInvitationWithResponse(
+ "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions);
+ // END:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshareinvitation.sentsharesgetserviceinvitation
+ }
+}
diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitation.java
new file mode 100644
index 0000000000000..67f350cbebce4
--- /dev/null
+++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitation.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.analytics.purview.sharing.generated;
+
+import com.azure.analytics.purview.sharing.SentSharesClient;
+import com.azure.analytics.purview.sharing.SentSharesClientBuilder;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class SentSharesGetUserInvitation {
+ public static void main(String[] args) {
+ SentSharesClient sentSharesClient =
+ new SentSharesClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("accountName.purview.azure.com/share")
+ .buildClient();
+ // BEGIN:com.azure.analytics.purview.sharing.generated.sentsharesgetsentshareinvitation.sentsharesgetuserinvitation
+ RequestOptions requestOptions = new RequestOptions();
+ Response