== Google Calendar Source Kamelet Description

=== Authentication methods

This Kamelet uses OAuth 2.0 authentication to connect to Google Calendar. You need to provide:

- Client ID and Client Secret from your Google Cloud Console application
- Access Token for immediate access (typically expires after an hour)
- Refresh Token for long-term usage (allows automatic token renewal)
- Application Name registered in Google Cloud Console

=== Output format

The Kamelet produces calendar event data in JSON format. It supports two output data types:

- **json**: Json representation of a Google Calendar event object
- **cloudevents**: Output data as CloudEvent V1 format with specific headers

=== Headers

When processing calendar events, the following headers are set:

- `CamelGoogleCalendarEventId`: The calendar event id

For CloudEvents output format, additional headers are set:
- `CamelCloudEventID`: The Camel exchange id set as event id
- `CamelCloudEventType`: The event type (default: "org.apache.camel.event.google.calendar.stream.consume")
- `CamelCloudEventSource`: The event source (Calendar Event Id with prefix "google.calendar.stream.")
- `CamelCloudEventSubject`: The event subject (Calendar event type)
- `CamelCloudEventTime`: The exchange creation timestamp as event time

=== Configuration

The Kamelet requires the following parameters:

- `index`: An index for the Google Calendar endpoint
- `calendarId`: The calendar ID to use as the source of event data
- `clientId`: The Client ID of the Google Calendar application
- `clientSecret`: The Client secret of the Google Calendar application
- `accessToken`: The OAuth 2 access token
- `refreshToken`: The OAuth 2 refresh token for long term usage
- `applicationName`: The Google Calendar application name

Optional parameters:
- `delay`: The number of milliseconds before the next poll (default: 500)
- `syncFlow`: Specifies to sync events for incremental synchronization (default: false)
- `consumeFromNow`: Specifies to consume events in the calendar from now on (default: true)

=== Usage example

```yaml
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: google-calendar-source-binding
spec:
  source:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1alpha1
      name: google-calendar-source
    properties:
      index: "events"
      calendarId: "primary"
      clientId: "{{client-id}}"
      clientSecret: "{{client-secret}}"
      accessToken: "{{access-token}}"
      refreshToken: "{{refresh-token}}"
      applicationName: "My Calendar App"
      delay: 1000
      syncFlow: true
      consumeFromNow: true
  sink:
    ref:
      kind: Service
      apiVersion: v1
      name: my-service
```