Class HiddenLayerClientImpl
-
- All Implemented Interfaces:
-
com.hiddenlayer.api.client.HiddenLayerClient
public final class HiddenLayerClientImpl implements HiddenLayerClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classHiddenLayerClientImpl.WithRawResponseImpl
-
Constructor Summary
Constructors Constructor Description HiddenLayerClientImpl(ClientOptions clientOptions)
-
Method Summary
Modifier and Type Method Description HiddenLayerClientAsyncasync()Returns a version of this client that uses asynchronous execution. HiddenLayerClient.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. HiddenLayerClientwithOptions(Consumer<ClientOptions.Builder> modifier)Returns a view of this service with the given option modifications applied. ModelServicemodels()PromptAnalyzerServicepromptAnalyzer()InteractionServiceinteractions()SensorServicesensors()ScanServicescans()CommunityScannercommunityScanner()Community scanner that provides the communityScan method with polling functionality. ModelScannermodelScanner()Model scanner that provides file and folder scanning functionality. Unitclose()Closes this client, relinquishing any underlying resources. -
-
Constructor Detail
-
HiddenLayerClientImpl
HiddenLayerClientImpl(ClientOptions clientOptions)
-
-
Method Detail
-
async
HiddenLayerClientAsync async()
Returns a version of this client that uses asynchronous execution.
The returned client shares its resources, like its connection pool and thread pools, with this client.
-
withRawResponse
HiddenLayerClient.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
HiddenLayerClient withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
models
ModelService models()
-
promptAnalyzer
PromptAnalyzerService promptAnalyzer()
-
interactions
InteractionService interactions()
-
sensors
SensorService sensors()
-
scans
ScanService scans()
-
communityScanner
CommunityScanner communityScanner()
Community scanner that provides the communityScan method with polling functionality.
This extends the generated SDK to provide the same functionality as the old SDK's communityScan method, which initiates a scan and optionally waits for results.
-
modelScanner
ModelScanner modelScanner()
Model scanner that provides file and folder scanning functionality.
This extends the generated SDK to provide the same functionality as the old SDK's ModelScanAPI, including multipart upload functionality for files and folders.
-
close
Unit close()
Closes this client, relinquishing any underlying resources.
This is purposefully not inherited from AutoCloseable because the client is long-lived and usually should not be synchronously closed via try-with-resources.
It's also usually not necessary to call this method at all. the default HTTP client automatically releases threads and connections if they remain idle, but if you are writing an application that needs to aggressively release unused resources, then you may call this method.
-
-
-
-