All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.kiota.http.middleware.options.TelemetryHandlerOption Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
package com.microsoft.kiota.http.middleware.options;

import com.microsoft.kiota.RequestOption;

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;

import okhttp3.Request;

import java.util.function.Function;

/**
 * TelemetryHandlerOption class
 */
public class TelemetryHandlerOption implements RequestOption {
    /** Creates a new instance of the TelemetryHandlerOption class */
    public TelemetryHandlerOption() {}

    /**
     * A delegate which can be called to configure the Request with desired telemetry values.
     */
    @Nullable public Function telemetryConfigurator = (request) -> request;

    /** {@inheritDoc} */
    @Override
    @SuppressWarnings("unchecked")
    @Nonnull public  Class getType() {
        return (Class) TelemetryHandlerOption.class;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy