// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.media.videoanalyzer.edge.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes how media is transferred to the extension plugin. */
@Fluent
public final class GrpcExtensionDataTransfer {
    /*
     * The share memory buffer for sample transfers, in mebibytes. It can only
     * be used with the 'SharedMemory' transfer mode.
     */
    @JsonProperty(value = "sharedMemorySizeMiB")
    private String sharedMemorySizeMiB;

    /*
     * Data transfer mode: embedded or sharedMemory.
     */
    @JsonProperty(value = "mode", required = true)
    private GrpcExtensionDataTransferMode mode;

    /**
     * Creates an instance of GrpcExtensionDataTransfer class.
     *
     * @param mode the mode value to set.
     */
    @JsonCreator
    public GrpcExtensionDataTransfer(
            @JsonProperty(value = "mode", required = true) GrpcExtensionDataTransferMode mode) {
        this.mode = mode;
    }

    /**
     * Get the sharedMemorySizeMiB property: The share memory buffer for sample transfers, in mebibytes. It can only be
     * used with the 'SharedMemory' transfer mode.
     *
     * @return the sharedMemorySizeMiB value.
     */
    public String getSharedMemorySizeMiB() {
        return this.sharedMemorySizeMiB;
    }

    /**
     * Set the sharedMemorySizeMiB property: The share memory buffer for sample transfers, in mebibytes. It can only be
     * used with the 'SharedMemory' transfer mode.
     *
     * @param sharedMemorySizeMiB the sharedMemorySizeMiB value to set.
     * @return the GrpcExtensionDataTransfer object itself.
     */
    public GrpcExtensionDataTransfer setSharedMemorySizeMiB(String sharedMemorySizeMiB) {
        this.sharedMemorySizeMiB = sharedMemorySizeMiB;
        return this;
    }

    /**
     * Get the mode property: Data transfer mode: embedded or sharedMemory.
     *
     * @return the mode value.
     */
    public GrpcExtensionDataTransferMode getMode() {
        return this.mode;
    }
}
