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

package shared

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

type SourceWrikeUpdate struct {
	// Permanent access token. You can find documentation on how to acquire a permanent access token  <a href="https://developers.wrike.com/oauth-20-authorization/">here</a>
	AccessToken string `json:"access_token"`
	// UTC date and time in the format 2017-01-25T00:00:00Z. Only comments after this date will be replicated.
	StartDate *string `json:"start_date,omitempty"`
	// Wrike's instance such as `app-us2.wrike.com`
	WrikeInstance *string `default:"app-us2.wrike.com" json:"wrike_instance"`
}

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

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

func (o *SourceWrikeUpdate) GetAccessToken() string {
	if o == nil {
		return ""
	}
	return o.AccessToken
}

func (o *SourceWrikeUpdate) GetStartDate() *string {
	if o == nil {
		return nil
	}
	return o.StartDate
}

func (o *SourceWrikeUpdate) GetWrikeInstance() *string {
	if o == nil {
		return nil
	}
	return o.WrikeInstance
}
