// 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<BinaryData> response =
                receivedSharesClient.activateTenantEmailRegistrationWithResponse(
                        tenantEmailRegistration, requestOptions);
        // END:com.azure.analytics.purview.sharing.generated.receivedsharesactivatetenantemailregistration.receivedsharesactivatetenantemailregistration
    }
}
