// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package shared

import (
	"encoding/json"
	"fmt"
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils"
)

type Zoom string

const (
	ZoomZoom Zoom = "zoom"
)

func (e Zoom) ToPointer() *Zoom {
	return &e
}
func (e *Zoom) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "zoom":
		*e = Zoom(v)
		return nil
	default:
		return fmt.Errorf("invalid value for Zoom: %v", v)
	}
}

type SourceZoom struct {
	// The account ID for your Zoom account. You can find this in the Zoom Marketplace under the "Manage" tab for your app.
	AccountID             string  `json:"account_id"`
	AuthorizationEndpoint *string `default:"https://zoom.us/oauth/token" json:"authorization_endpoint"`
	// The client ID for your Zoom app. You can find this in the Zoom Marketplace under the "Manage" tab for your app.
	ClientID string `json:"client_id"`
	// The client secret for your Zoom app. You can find this in the Zoom Marketplace under the "Manage" tab for your app.
	ClientSecret string `json:"client_secret"`
	sourceType   Zoom   `const:"zoom" json:"sourceType"`
}

func (s SourceZoom) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceZoom) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *SourceZoom) GetAccountID() string {
	if o == nil {
		return ""
	}
	return o.AccountID
}

func (o *SourceZoom) GetAuthorizationEndpoint() *string {
	if o == nil {
		return nil
	}
	return o.AuthorizationEndpoint
}

func (o *SourceZoom) GetClientID() string {
	if o == nil {
		return ""
	}
	return o.ClientID
}

func (o *SourceZoom) GetClientSecret() string {
	if o == nil {
		return ""
	}
	return o.ClientSecret
}

func (o *SourceZoom) GetSourceType() Zoom {
	return ZoomZoom
}
