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

package shared

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

type SourceYoutubeAnalyticsUpdateAuthenticateViaOAuth20 struct {
	// The Client ID of your developer application
	ClientID string `json:"client_id"`
	// The client secret of your developer application
	ClientSecret string `json:"client_secret"`
	// A refresh token generated using the above client ID and secret
	RefreshToken         string `json:"refresh_token"`
	AdditionalProperties any    `additionalProperties:"true" json:"-"`
}

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

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

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

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

func (o *SourceYoutubeAnalyticsUpdateAuthenticateViaOAuth20) GetRefreshToken() string {
	if o == nil {
		return ""
	}
	return o.RefreshToken
}

func (o *SourceYoutubeAnalyticsUpdateAuthenticateViaOAuth20) GetAdditionalProperties() any {
	if o == nil {
		return nil
	}
	return o.AdditionalProperties
}

type SourceYoutubeAnalyticsUpdate struct {
	Credentials SourceYoutubeAnalyticsUpdateAuthenticateViaOAuth20 `json:"credentials"`
}

func (o *SourceYoutubeAnalyticsUpdate) GetCredentials() SourceYoutubeAnalyticsUpdateAuthenticateViaOAuth20 {
	if o == nil {
		return SourceYoutubeAnalyticsUpdateAuthenticateViaOAuth20{}
	}
	return o.Credentials
}
