Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions google-gemini/1.0/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: google-gemini-connector
version: '1.0'
display_version: 1.0 (Mule 4)
title: Google Gemini Connector
nav:
- modules/ROOT/nav.adoc
asciidoc:
attributes:
page-component-desc: Enables you to connect to the Google Gemini API.
page-connector-type: Connector
page-connector-level: Select
page-exchange-group-id: com.mulesoft.connectors
page-exchange-asset-id: mule4-google-gemini-connector
page-runtime-version: 4.10.0
page-release-notes-page: release-notes::connector/google-gemini-connector-release-notes-mule-4.adoc
page-vendor-name: google-gemini
page-vendor-title: Google Gemini
page-notice-banner-message: Standard support for Java 8 and 11 ends in March 2025 for Mule 4.8 Edge and February 2026 for 4.6 LTS. Plan your upgrade path for apps that are running on Java 8 or 11 accordingly.
3 changes: 3 additions & 0 deletions google-gemini/1.0/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xref:index.adoc[Google Gemini Connector]
* xref:index.adoc[Google Gemini Connector Overview]
* xref:google-gemini-connector-reference.adoc[Google Gemini Connector Reference]
Original file line number Diff line number Diff line change
@@ -0,0 +1,311 @@
= Google Gemini Connector 1.0 Reference

== Configurations
---
[[Config]]
=== Config

Default configuration.

==== Parameters

[%header%autowidth.spread]
|===
| Name | Type | Description | Default Value | Required
|Name | String | The name for this configuration. Connectors reference the configuration with this name. | | x
| Connection a| <<Config_ApiKey, API Key>>
| The connection types to provide to this configuration. | | x
| Name a| String | The identifier of this element used to reference it in other components. | | x
| Expiration Policy a| <<ExpirationPolicy>> | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate. | |
|===

==== Connection Types
[[Config_ApiKey]]
===== API Key

====== Parameters

[%header%autowidth.spread]
|===
| Name | Type | Description | Default Value | Required
| apiKey a| String | API key for authentication. | | x
| baseUri a| String | Base URI for the Google Gemini API. | | x
| TLS Configuration a| <<Tls>> | TLS configuration for secure connections. | |
| Reconnection a| <<Reconnection>> | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn't pass after exhausting the associated reconnection strategy. | |
|===

== Supported Operations
* <<GenerateContent>>
* <<GetModel>>
* <<ListModels>>

== Operations

[[GenerateContent]]
== Generate Content
`<gemini:generate-content>`

Generates content.

=== Parameters

[%header%autowidth.spread]
|===
| Name | Type | Description | Default Value | Required
| Configuration | String | The name of the configuration to use. | | x
| modelName a| String | Name of the Gemini model to use for content generation. | | x
| body a| Any | Request body containing the content generation parameters. | #[payload] |
| Config Ref a| ConfigurationProvider | The name of the configuration to use to execute this component. | | x
| Target Variable a| String | Name of the variable that stores the operation's output. | |
| Target Value a| String | An expression to evaluate against the operation's output and store the expression outcome in the target variable. | #[payload] |
| Error Mappings a| Array of <<ErrorMapping>> | Set of error mappings. | |
|===

=== Output

[%autowidth.spread]
|===
|Type |Any
| Attributes Type a| Any
|===

=== For Configurations

* <<Config>>

=== Throws

* GEMINI:CLIENT_ERROR
* GEMINI:CONNECTIVITY
* GEMINI:FORBIDDEN
* GEMINI:SECURITY
* GEMINI:SERVER_ERROR
* GEMINI:TIMEOUT
* GEMINI:UNAUTHORIZED

[[GetModel]]
== Get Model
`<gemini:get-model>`

Gets a model.

=== Parameters

[%header%autowidth.spread]
|===
| Name | Type | Description | Default Value | Required
| Configuration | String | The name of the configuration to use. | | x
| modelName a| String | Name of the Gemini model to retrieve. | | x
| Config Ref a| ConfigurationProvider | The name of the configuration to use to execute this component. | | x
| Target Variable a| String | Name of the variable that stores the operation's output. | |
| Target Value a| String | An expression to evaluate against the operation's output and store the expression outcome in the target variable. | #[payload] |
| Error Mappings a| Array of <<ErrorMapping>> | Set of error mappings. | |
|===

=== Output

[%autowidth.spread]
|===
|Type |Any
| Attributes Type a| Any
|===

=== For Configurations

* <<Config>>

=== Throws

* GEMINI:CLIENT_ERROR
* GEMINI:CONNECTIVITY
* GEMINI:FORBIDDEN
* GEMINI:SECURITY
* GEMINI:SERVER_ERROR
* GEMINI:TIMEOUT
* GEMINI:UNAUTHORIZED

[[ListModels]]
== List Models
`<gemini:list-models>`

Lists models.

=== Parameters

[%header%autowidth.spread]
|===
| Name | Type | Description | Default Value | Required
| Configuration | String | The name of the configuration to use. | | x
| Config Ref a| ConfigurationProvider | The name of the configuration to use to execute this component. | | x
| Target Variable a| String | Name of the variable that stores the operation's output. | |
| Target Value a| String | An expression to evaluate against the operation's output and store the expression outcome in the target variable. | #[payload] |
| Error Mappings a| Array of <<ErrorMapping>> | Set of error mappings. | |
|===

=== Output

[%autowidth.spread]
|===
|Type |Any
| Attributes Type a| Any
|===

=== For Configurations

* <<Config>>

=== Throws

* GEMINI:CLIENT_ERROR
* GEMINI:CONNECTIVITY
* GEMINI:FORBIDDEN
* GEMINI:SECURITY
* GEMINI:SERVER_ERROR
* GEMINI:TIMEOUT
* GEMINI:UNAUTHORIZED

== Types
[[Tls]]
=== Tls

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Enabled Protocols a| String | A comma-separated list of protocols enabled for this context. | |
| Enabled Cipher Suites a| String | A comma-separated list of cipher suites enabled for this context. | |
| Trust Store a| <<TrustStore>> | Configuration for the truststore. | |
| Key Store a| <<KeyStore>> | Configuration for the keystore. | |
| Revocation Check a| * <<StandardRevocationCheck>>
* <<CustomOcspResponder>>
* <<CrlFile>> | Configuration for certificate revocation checking. | |
|===

[[TrustStore]]
=== Trust Store

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Path a| String | The location (which will be resolved relative to the current classpath and file system, if possible) of the trust store. | |
| Password a| String | The password used to protect the trust store. | |
| Type a| String | The type of store used. | |
| Algorithm a| String | The algorithm used by the trust store. | |
| Insecure a| Boolean | If true, no certificate validations will be performed, rendering connections vulnerable to attacks. Use at your own risk. | |
|===

[[KeyStore]]
=== Key Store

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Path a| String | The location (which will be resolved relative to the current classpath and file system, if possible) of the key store. | |
| Type a| String | The type of store used. | |
| Alias a| String | When the key store contains many private keys, this attribute indicates the alias of the key that should be used. If not defined, the first key in the file will be used by default. | |
| Key Password a| String | The password used to protect the private key. | |
| Password a| String | The password used to protect the key store. | |
| Algorithm a| String | The algorithm used by the key store. | |
|===

[[StandardRevocationCheck]]
=== Standard Revocation Check

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Only End Entities a| Boolean | Only verify the last element of the certificate chain. | |
| Prefer Crls a| Boolean | Try CRL instead of OCSP first. | |
| No Fallback a| Boolean | Do not use the secondary checking method (the one not selected before). | |
| Soft Fail a| Boolean | Avoid verification failure when the revocation server can not be reached or is busy. | |
|===

[[CustomOcspResponder]]
=== Custom Ocsp Responder

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Url a| String | The URL of the OCSP responder. | |
| Cert Alias a| String | Alias of the signing certificate for the OCSP response (must be in the trust store), if present. | |
|===

[[CrlFile]]
=== Crl File

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Path a| String | The path to the CRL file. | |
|===

[[Reconnection]]
=== Reconnection

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Fails Deployment a| Boolean | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn't pass after exhausting the associated reconnection strategy. | |
| Reconnection Strategy a| * <<Reconnect>>
* <<ReconnectForever>> | The reconnection strategy to use. | |
|===

[[Reconnect]]
=== Reconnect

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Frequency a| Number | How often in milliseconds to reconnect. | |
| Blocking a| Boolean | If false, the reconnection strategy will run in a separate, non-blocking thread. | |
| Count a| Number | How many reconnection attempts to make. | |
|===

[[ReconnectForever]]
=== Reconnect Forever

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Frequency a| Number | How often in milliseconds to reconnect. | |
| Blocking a| Boolean | If false, the reconnection strategy will run in a separate, non-blocking thread. | |
|===

[[ExpirationPolicy]]
=== Expiration Policy

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Max Idle Time a| Number | A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it's considered eligible for expiration. | |
| Time Unit a| Enumeration, one of:

** NANOSECONDS
** MICROSECONDS
** MILLISECONDS
** SECONDS
** MINUTES
** HOURS
** DAYS | Time unit for the *Max Idle Time* field. | |
|===

[[ErrorMapping]]
=== Error Mapping

[%header,cols="20s,25a,30a,15a,10a"]
|===
| Field | Type | Description | Default Value | Required
| Source a| Enumeration, one of:

** ANY
** REDELIVERY_EXHAUSTED
** TRANSFORMATION
** EXPRESSION
** SECURITY
** CLIENT_SECURITY
** SERVER_SECURITY
** ROUTING
** CONNECTIVITY
** RETRY_EXHAUSTED
** TIMEOUT | The source error type to map. | |
| Target a| String | The target error type to map to. | | x
|===
20 changes: 20 additions & 0 deletions google-gemini/1.0/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:connector-name: Google Gemini
:lc-connector-name: google-gemini

= {connector-name} Connector 1.0

Anypoint Connector for {connector-name} ({connector-name} Connector) enables Mule applications to access the {connector-name} API.

For information about compatibility and fixed issues, refer to the {connector-name} Connector Release Notes.

== Before You Begin

include::connectors::partial$t-index-partial.adoc[tags=prerequisites]

== Next Step

include::connectors::partial$t-index-partial.adoc[tags=next-step-basic]

== See Also

include::connectors::partial$t-index-partial.adoc[tags=see-also]