Skip to content

Commit

Permalink
Release 0.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 4, 2023
0 parents commit 29c7dde
Show file tree
Hide file tree
Showing 331 changed files with 17,558 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fernignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Specify files that shouldn't be modified by Fern
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Fern

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 39 additions & 0 deletions alert_rule.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// This file was auto-generated by Fern from our API Definition.

package api

import (
json "encoding/json"
)

type AlertRule struct {
Strategy AlertStrategy `json:"strategy,omitempty"`
type_ string
}

func (a *AlertRule) Type() string {
return a.type_
}

func (a *AlertRule) UnmarshalJSON(data []byte) error {
type unmarshaler AlertRule
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AlertRule(value)
a.type_ = "alert"
return nil
}

func (a *AlertRule) MarshalJSON() ([]byte, error) {
type embed AlertRule
var marshaler = struct {
embed
Type string `json:"type,omitempty"`
}{
embed: embed(*a),
Type: "alert",
}
return json.Marshal(marshaler)
}
48 changes: 48 additions & 0 deletions alert_strategy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// This file was auto-generated by Fern from our API Definition.

package api

import (
json "encoding/json"
fmt "fmt"
strconv "strconv"
)

// Alert strategy to use
type AlertStrategy uint8

const (
AlertStrategyEachAttempt AlertStrategy = iota + 1
AlertStrategyLastAttempt
)

func (a AlertStrategy) String() string {
switch a {
default:
return strconv.Itoa(int(a))
case AlertStrategyEachAttempt:
return "each_attempt"
case AlertStrategyLastAttempt:
return "last_attempt"
}
}

func (a AlertStrategy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("%q", a.String())), nil
}

func (a *AlertStrategy) UnmarshalJSON(data []byte) error {
var raw string
if err := json.Unmarshal(data, &raw); err != nil {
return err
}
switch raw {
case "each_attempt":
value := AlertStrategyEachAttempt
*a = value
case "last_attempt":
value := AlertStrategyLastAttempt
*a = value
}
return nil
}
14 changes: 14 additions & 0 deletions api_error_response.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.

package api

// Error response model
type ApiErrorResponse struct {
// Error code
Code string `json:"code,omitempty"`
// Status code
Status float64 `json:"status,omitempty"`
// Error description
Message string `json:"message,omitempty"`
Data *ApiErrorResponseData `json:"data,omitempty"`
}
6 changes: 6 additions & 0 deletions api_error_response_data.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This file was auto-generated by Fern from our API Definition.

package api

type ApiErrorResponseData struct {
}
8 changes: 8 additions & 0 deletions api_key_integration_configs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This file was auto-generated by Fern from our API Definition.

package api

type ApiKeyIntegrationConfigs struct {
HeaderKey string `json:"header_key,omitempty"`
ApiKey string `json:"api_key,omitempty"`
}
7 changes: 7 additions & 0 deletions attached_integration_to_source.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This file was auto-generated by Fern from our API Definition.

package api

type AttachedIntegrationToSource struct {
Success bool `json:"success,omitempty"`
}
150 changes: 150 additions & 0 deletions attempt_error_codes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
// This file was auto-generated by Fern from our API Definition.

package api

import (
json "encoding/json"
fmt "fmt"
strconv "strconv"
)

// Attempt could not complete because of an error
type AttemptErrorCodes uint8

const (
AttemptErrorCodesTimeout AttemptErrorCodes = iota + 1
AttemptErrorCodesNotFound
AttemptErrorCodesConnectionRefused
AttemptErrorCodesConnectionReset
AttemptErrorCodesMissingUrl
AttemptErrorCodesCli
AttemptErrorCodesCliUnavailable
AttemptErrorCodesSelfSignedCert
AttemptErrorCodesErrTlsCertAltnameInvalid
AttemptErrorCodesSslErrorCaUnknown
AttemptErrorCodesTtlExpired
AttemptErrorCodesDataArchived
AttemptErrorCodesSslCertExpired
AttemptErrorCodesBulkRetryCancelled
AttemptErrorCodesDnsLookupFailed
AttemptErrorCodesHostUnreachable
AttemptErrorCodesProtocolError
AttemptErrorCodesSocketClosed
AttemptErrorCodesUnknown
)

func (a AttemptErrorCodes) String() string {
switch a {
default:
return strconv.Itoa(int(a))
case AttemptErrorCodesTimeout:
return "TIMEOUT"
case AttemptErrorCodesNotFound:
return "NOT_FOUND"
case AttemptErrorCodesConnectionRefused:
return "CONNECTION_REFUSED"
case AttemptErrorCodesConnectionReset:
return "CONNECTION_RESET"
case AttemptErrorCodesMissingUrl:
return "MISSING_URL"
case AttemptErrorCodesCli:
return "CLI"
case AttemptErrorCodesCliUnavailable:
return "CLI_UNAVAILABLE"
case AttemptErrorCodesSelfSignedCert:
return "SELF_SIGNED_CERT"
case AttemptErrorCodesErrTlsCertAltnameInvalid:
return "ERR_TLS_CERT_ALTNAME_INVALID"
case AttemptErrorCodesSslErrorCaUnknown:
return "SSL_ERROR_CA_UNKNOWN"
case AttemptErrorCodesTtlExpired:
return "TTL_EXPIRED"
case AttemptErrorCodesDataArchived:
return "DATA_ARCHIVED"
case AttemptErrorCodesSslCertExpired:
return "SSL_CERT_EXPIRED"
case AttemptErrorCodesBulkRetryCancelled:
return "BULK_RETRY_CANCELLED"
case AttemptErrorCodesDnsLookupFailed:
return "DNS_LOOKUP_FAILED"
case AttemptErrorCodesHostUnreachable:
return "HOST_UNREACHABLE"
case AttemptErrorCodesProtocolError:
return "PROTOCOL_ERROR"
case AttemptErrorCodesSocketClosed:
return "SOCKET_CLOSED"
case AttemptErrorCodesUnknown:
return "UNKNOWN"
}
}

func (a AttemptErrorCodes) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("%q", a.String())), nil
}

func (a *AttemptErrorCodes) UnmarshalJSON(data []byte) error {
var raw string
if err := json.Unmarshal(data, &raw); err != nil {
return err
}
switch raw {
case "TIMEOUT":
value := AttemptErrorCodesTimeout
*a = value
case "NOT_FOUND":
value := AttemptErrorCodesNotFound
*a = value
case "CONNECTION_REFUSED":
value := AttemptErrorCodesConnectionRefused
*a = value
case "CONNECTION_RESET":
value := AttemptErrorCodesConnectionReset
*a = value
case "MISSING_URL":
value := AttemptErrorCodesMissingUrl
*a = value
case "CLI":
value := AttemptErrorCodesCli
*a = value
case "CLI_UNAVAILABLE":
value := AttemptErrorCodesCliUnavailable
*a = value
case "SELF_SIGNED_CERT":
value := AttemptErrorCodesSelfSignedCert
*a = value
case "ERR_TLS_CERT_ALTNAME_INVALID":
value := AttemptErrorCodesErrTlsCertAltnameInvalid
*a = value
case "SSL_ERROR_CA_UNKNOWN":
value := AttemptErrorCodesSslErrorCaUnknown
*a = value
case "TTL_EXPIRED":
value := AttemptErrorCodesTtlExpired
*a = value
case "DATA_ARCHIVED":
value := AttemptErrorCodesDataArchived
*a = value
case "SSL_CERT_EXPIRED":
value := AttemptErrorCodesSslCertExpired
*a = value
case "BULK_RETRY_CANCELLED":
value := AttemptErrorCodesBulkRetryCancelled
*a = value
case "DNS_LOOKUP_FAILED":
value := AttemptErrorCodesDnsLookupFailed
*a = value
case "HOST_UNREACHABLE":
value := AttemptErrorCodesHostUnreachable
*a = value
case "PROTOCOL_ERROR":
value := AttemptErrorCodesProtocolError
*a = value
case "SOCKET_CLOSED":
value := AttemptErrorCodesSocketClosed
*a = value
case "UNKNOWN":
value := AttemptErrorCodesUnknown
*a = value
}
return nil
}
65 changes: 65 additions & 0 deletions attempt_state.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// This file was auto-generated by Fern from our API Definition.

package api

import (
json "encoding/json"
fmt "fmt"
strconv "strconv"
)

type AttemptState uint8

const (
AttemptStateDelivering AttemptState = iota + 1
AttemptStateQueued
AttemptStatePending
AttemptStateCompleted
AttemptStateHold
)

func (a AttemptState) String() string {
switch a {
default:
return strconv.Itoa(int(a))
case AttemptStateDelivering:
return "DELIVERING"
case AttemptStateQueued:
return "QUEUED"
case AttemptStatePending:
return "PENDING"
case AttemptStateCompleted:
return "COMPLETED"
case AttemptStateHold:
return "HOLD"
}
}

func (a AttemptState) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("%q", a.String())), nil
}

func (a *AttemptState) UnmarshalJSON(data []byte) error {
var raw string
if err := json.Unmarshal(data, &raw); err != nil {
return err
}
switch raw {
case "DELIVERING":
value := AttemptStateDelivering
*a = value
case "QUEUED":
value := AttemptStateQueued
*a = value
case "PENDING":
value := AttemptStatePending
*a = value
case "COMPLETED":
value := AttemptStateCompleted
*a = value
case "HOLD":
value := AttemptStateHold
*a = value
}
return nil
}
Loading

0 comments on commit 29c7dde

Please sign in to comment.