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

package shared

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasAuthTypeService SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType = "Service"
)

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

type SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication struct {
	authType *SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType `const:"Service" json:"auth_type,omitempty"`
	// The JSON key linked to the service account used for authorization. For steps on obtaining this key, refer to <a href="https://docs.airbyte.com/integrations/sources/google-analytics-data-api/#setup-guide">the setup guide</a>.
	CredentialsJSON string `json:"credentials_json"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) GetAuthType() *SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasAuthTypeService.ToPointer()
}

func (o *SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) GetCredentialsJSON() string {
	if o == nil {
		return ""
	}
	return o.CredentialsJSON
}

type SourceGoogleAnalyticsDataAPIUpdateAuthType string

const (
	SourceGoogleAnalyticsDataAPIUpdateAuthTypeClient SourceGoogleAnalyticsDataAPIUpdateAuthType = "Client"
)

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

type SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth struct {
	// Access Token for making authenticated requests.
	AccessToken *string                                     `json:"access_token,omitempty"`
	authType    *SourceGoogleAnalyticsDataAPIUpdateAuthType `const:"Client" json:"auth_type,omitempty"`
	// The Client ID of your Google Analytics developer application.
	ClientID string `json:"client_id"`
	// The Client Secret of your Google Analytics developer application.
	ClientSecret string `json:"client_secret"`
	// The token for obtaining a new access token.
	RefreshToken string `json:"refresh_token"`
}

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

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth) GetAuthType() *SourceGoogleAnalyticsDataAPIUpdateAuthType {
	return SourceGoogleAnalyticsDataAPIUpdateAuthTypeClient.ToPointer()
}

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

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

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

type SourceGoogleAnalyticsDataAPIUpdateCredentialsType string

const (
	SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth      SourceGoogleAnalyticsDataAPIUpdateCredentialsType = "source-google-analytics-data-api-update_Authenticate via Google (Oauth)"
	SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsDataAPIUpdateCredentialsType = "source-google-analytics-data-api-update_Service Account Key Authentication"
)

// SourceGoogleAnalyticsDataAPIUpdateCredentials - Credentials for the service
type SourceGoogleAnalyticsDataAPIUpdateCredentials struct {
	SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth      *SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth      `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication *SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateCredentialsType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateCredentialsSourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth(sourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth) SourceGoogleAnalyticsDataAPIUpdateCredentials {
	typ := SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth

	return SourceGoogleAnalyticsDataAPIUpdateCredentials{
		SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth: &sourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateCredentialsSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication(sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) SourceGoogleAnalyticsDataAPIUpdateCredentials {
	typ := SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication

	return SourceGoogleAnalyticsDataAPIUpdateCredentials{
		SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication: &sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateCredentials) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication = SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication = &sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication
		u.Type = SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth = SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth = &sourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth
		u.Type = SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateCredentials", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateCredentials) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateAuthenticateViaGoogleOauth, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateCredentials: all fields are null")
}

// SourceGoogleAnalyticsDataAPIUpdateCohortReportSettings - Optional settings for a cohort report.
type SourceGoogleAnalyticsDataAPIUpdateCohortReportSettings struct {
	// If true, accumulates the result from first touch day to the end day
	Accumulate *bool `json:"accumulate,omitempty"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCohortReportSettings) GetAccumulate() *bool {
	if o == nil {
		return nil
	}
	return o.Accumulate
}

type SourceGoogleAnalyticsDataAPIUpdateDateRange struct {
	EndDate   types.Date `json:"endDate"`
	StartDate types.Date `json:"startDate"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateDateRange) GetEndDate() types.Date {
	if o == nil {
		return types.Date{}
	}
	return o.EndDate
}

func (o *SourceGoogleAnalyticsDataAPIUpdateDateRange) GetStartDate() types.Date {
	if o == nil {
		return types.Date{}
	}
	return o.StartDate
}

// SourceGoogleAnalyticsDataAPIUpdateDimension - Dimension used by the cohort. Required and only supports `firstSessionDate`
type SourceGoogleAnalyticsDataAPIUpdateDimension string

const (
	SourceGoogleAnalyticsDataAPIUpdateDimensionFirstSessionDate SourceGoogleAnalyticsDataAPIUpdateDimension = "firstSessionDate"
)

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

type SourceGoogleAnalyticsDataAPIUpdateCohorts struct {
	DateRange SourceGoogleAnalyticsDataAPIUpdateDateRange `json:"dateRange"`
	// Dimension used by the cohort. Required and only supports `firstSessionDate`
	Dimension SourceGoogleAnalyticsDataAPIUpdateDimension `json:"dimension"`
	// Assigns a name to this cohort. If not set, cohorts are named by their zero based index cohort_0, cohort_1, etc.
	Name *string `json:"name,omitempty"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCohorts) GetDateRange() SourceGoogleAnalyticsDataAPIUpdateDateRange {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateDateRange{}
	}
	return o.DateRange
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCohorts) GetDimension() SourceGoogleAnalyticsDataAPIUpdateDimension {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateDimension("")
	}
	return o.Dimension
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCohorts) GetName() *string {
	if o == nil {
		return nil
	}
	return o.Name
}

// SourceGoogleAnalyticsDataAPIUpdateGranularity - The granularity used to interpret the startOffset and endOffset for the extended reporting date range for a cohort report.
type SourceGoogleAnalyticsDataAPIUpdateGranularity string

const (
	SourceGoogleAnalyticsDataAPIUpdateGranularityGranularityUnspecified SourceGoogleAnalyticsDataAPIUpdateGranularity = "GRANULARITY_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateGranularityDaily                  SourceGoogleAnalyticsDataAPIUpdateGranularity = "DAILY"
	SourceGoogleAnalyticsDataAPIUpdateGranularityWeekly                 SourceGoogleAnalyticsDataAPIUpdateGranularity = "WEEKLY"
	SourceGoogleAnalyticsDataAPIUpdateGranularityMonthly                SourceGoogleAnalyticsDataAPIUpdateGranularity = "MONTHLY"
)

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

type SourceGoogleAnalyticsDataAPIUpdateCohortsRange struct {
	// Specifies the end date of the extended reporting date range for a cohort report.
	EndOffset int64 `json:"endOffset"`
	// The granularity used to interpret the startOffset and endOffset for the extended reporting date range for a cohort report.
	Granularity SourceGoogleAnalyticsDataAPIUpdateGranularity `json:"granularity"`
	// Specifies the start date of the extended reporting date range for a cohort report.
	StartOffset *int64 `json:"startOffset,omitempty"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCohortsRange) GetEndOffset() int64 {
	if o == nil {
		return 0
	}
	return o.EndOffset
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCohortsRange) GetGranularity() SourceGoogleAnalyticsDataAPIUpdateGranularity {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateGranularity("")
	}
	return o.Granularity
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCohortsRange) GetStartOffset() *int64 {
	if o == nil {
		return nil
	}
	return o.StartOffset
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasEnabled string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasEnabledTrue SourceGoogleAnalyticsDataAPIUpdateSchemasEnabled = "true"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled struct {
	// Optional settings for a cohort report.
	CohortReportSettings *SourceGoogleAnalyticsDataAPIUpdateCohortReportSettings `json:"cohortReportSettings,omitempty"`
	Cohorts              []SourceGoogleAnalyticsDataAPIUpdateCohorts             `json:"cohorts,omitempty"`
	CohortsRange         *SourceGoogleAnalyticsDataAPIUpdateCohortsRange         `json:"cohortsRange,omitempty"`
	enabled              *SourceGoogleAnalyticsDataAPIUpdateSchemasEnabled       `const:"true" json:"enabled,omitempty"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled) GetCohortReportSettings() *SourceGoogleAnalyticsDataAPIUpdateCohortReportSettings {
	if o == nil {
		return nil
	}
	return o.CohortReportSettings
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled) GetCohorts() []SourceGoogleAnalyticsDataAPIUpdateCohorts {
	if o == nil {
		return nil
	}
	return o.Cohorts
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled) GetCohortsRange() *SourceGoogleAnalyticsDataAPIUpdateCohortsRange {
	if o == nil {
		return nil
	}
	return o.CohortsRange
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled) GetEnabled() *SourceGoogleAnalyticsDataAPIUpdateSchemasEnabled {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasEnabledTrue.ToPointer()
}

type SourceGoogleAnalyticsDataAPIUpdateEnabled string

const (
	SourceGoogleAnalyticsDataAPIUpdateEnabledFalse SourceGoogleAnalyticsDataAPIUpdateEnabled = "false"
)

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

type SourceGoogleAnalyticsDataAPIUpdateDisabled struct {
	enabled *SourceGoogleAnalyticsDataAPIUpdateEnabled `const:"false" json:"enabled,omitempty"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateDisabled) GetEnabled() *SourceGoogleAnalyticsDataAPIUpdateEnabled {
	return SourceGoogleAnalyticsDataAPIUpdateEnabledFalse.ToPointer()
}

type SourceGoogleAnalyticsDataAPIUpdateCohortReportsType string

const (
	SourceGoogleAnalyticsDataAPIUpdateCohortReportsTypeSourceGoogleAnalyticsDataAPIUpdateDisabled                         SourceGoogleAnalyticsDataAPIUpdateCohortReportsType = "source-google-analytics-data-api-update_Disabled"
	SourceGoogleAnalyticsDataAPIUpdateCohortReportsTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled SourceGoogleAnalyticsDataAPIUpdateCohortReportsType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_Enabled"
)

// SourceGoogleAnalyticsDataAPIUpdateCohortReports - Cohort reports creates a time series of user retention for the cohort.
type SourceGoogleAnalyticsDataAPIUpdateCohortReports struct {
	SourceGoogleAnalyticsDataAPIUpdateDisabled                         *SourceGoogleAnalyticsDataAPIUpdateDisabled                         `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateCohortReportsType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateCohortReportsSourceGoogleAnalyticsDataAPIUpdateDisabled(sourceGoogleAnalyticsDataAPIUpdateDisabled SourceGoogleAnalyticsDataAPIUpdateDisabled) SourceGoogleAnalyticsDataAPIUpdateCohortReports {
	typ := SourceGoogleAnalyticsDataAPIUpdateCohortReportsTypeSourceGoogleAnalyticsDataAPIUpdateDisabled

	return SourceGoogleAnalyticsDataAPIUpdateCohortReports{
		SourceGoogleAnalyticsDataAPIUpdateDisabled: &sourceGoogleAnalyticsDataAPIUpdateDisabled,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateCohortReportsSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled) SourceGoogleAnalyticsDataAPIUpdateCohortReports {
	typ := SourceGoogleAnalyticsDataAPIUpdateCohortReportsTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled

	return SourceGoogleAnalyticsDataAPIUpdateCohortReports{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateCohortReports) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateDisabled SourceGoogleAnalyticsDataAPIUpdateDisabled = SourceGoogleAnalyticsDataAPIUpdateDisabled{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateDisabled, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateDisabled = &sourceGoogleAnalyticsDataAPIUpdateDisabled
		u.Type = SourceGoogleAnalyticsDataAPIUpdateCohortReportsTypeSourceGoogleAnalyticsDataAPIUpdateDisabled
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled
		u.Type = SourceGoogleAnalyticsDataAPIUpdateCohortReportsTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateCohortReports", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateCohortReports) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateDisabled != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateDisabled, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayEnabled, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateCohortReports: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue struct {
	Value     float64                                                                             `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value struct {
	Value     string                                                               `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateFromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value  SourceGoogleAnalyticsDataAPIUpdateFromValueType = "source-google-analytics-data-api-update_Schemas_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue SourceGoogleAnalyticsDataAPIUpdateFromValueType = "source-google-analytics-data-api-update_Schemas_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateFromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateFromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value) SourceGoogleAnalyticsDataAPIUpdateFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue) SourceGoogleAnalyticsDataAPIUpdateFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateFromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateFromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateFromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateFromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter4ValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter4ValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue struct {
	Value     float64                                                                                              `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter4ValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter4ValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value struct {
	Value     string                                                                                              `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value  SourceGoogleAnalyticsDataAPIUpdateToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue SourceGoogleAnalyticsDataAPIUpdateToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value) SourceGoogleAnalyticsDataAPIUpdateToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue) SourceGoogleAnalyticsDataAPIUpdateToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateBetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateFromValue                                          `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateToValue                                            `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateBetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateBetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateFromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateFromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateBetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateDoubleValue struct {
	Value     float64                                            `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateInt64Value struct {
	Value     string                                      `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateValueType {
	return SourceGoogleAnalyticsDataAPIUpdateValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateInt64Value  SourceGoogleAnalyticsDataAPIUpdateValueUnionType = "source-google-analytics-data-api-update_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateDoubleValue SourceGoogleAnalyticsDataAPIUpdateValueUnionType = "source-google-analytics-data-api-update_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateValue struct {
	SourceGoogleAnalyticsDataAPIUpdateInt64Value  *SourceGoogleAnalyticsDataAPIUpdateInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateDoubleValue *SourceGoogleAnalyticsDataAPIUpdateDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateValueSourceGoogleAnalyticsDataAPIUpdateInt64Value(sourceGoogleAnalyticsDataAPIUpdateInt64Value SourceGoogleAnalyticsDataAPIUpdateInt64Value) SourceGoogleAnalyticsDataAPIUpdateValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateValue{
		SourceGoogleAnalyticsDataAPIUpdateInt64Value: &sourceGoogleAnalyticsDataAPIUpdateInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateValueSourceGoogleAnalyticsDataAPIUpdateDoubleValue(sourceGoogleAnalyticsDataAPIUpdateDoubleValue SourceGoogleAnalyticsDataAPIUpdateDoubleValue) SourceGoogleAnalyticsDataAPIUpdateValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateValue{
		SourceGoogleAnalyticsDataAPIUpdateDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateInt64Value SourceGoogleAnalyticsDataAPIUpdateInt64Value = SourceGoogleAnalyticsDataAPIUpdateInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateInt64Value = &sourceGoogleAnalyticsDataAPIUpdateInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateDoubleValue SourceGoogleAnalyticsDataAPIUpdateDoubleValue = SourceGoogleAnalyticsDataAPIUpdateDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateNumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterName `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums                 `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateValue                               `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateNumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateNumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateNumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateValue{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasFilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasFilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateInListFilter struct {
	CaseSensitive *bool                                               `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasFilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                            `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateInListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateInListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasFilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateInListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateFilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateFilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateStringFilter struct {
	CaseSensitive *bool                                          `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateFilterName   `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateValidEnums `json:"matchType,omitempty"`
	Value         string                                         `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateStringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateStringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateFilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateStringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateStringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateStringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionType = "source-google-analytics-data-api-update_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateInListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionType = "source-google-analytics-data-api-update_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionType = "source-google-analytics-data-api-update_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionType = "source-google-analytics-data-api-update_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter struct {
	SourceGoogleAnalyticsDataAPIUpdateStringFilter  *SourceGoogleAnalyticsDataAPIUpdateStringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateInListFilter  *SourceGoogleAnalyticsDataAPIUpdateInListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateNumericFilter *SourceGoogleAnalyticsDataAPIUpdateNumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateBetweenFilter *SourceGoogleAnalyticsDataAPIUpdateBetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterSourceGoogleAnalyticsDataAPIUpdateStringFilter(sourceGoogleAnalyticsDataAPIUpdateStringFilter SourceGoogleAnalyticsDataAPIUpdateStringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateStringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateStringFilter: &sourceGoogleAnalyticsDataAPIUpdateStringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterSourceGoogleAnalyticsDataAPIUpdateInListFilter(sourceGoogleAnalyticsDataAPIUpdateInListFilter SourceGoogleAnalyticsDataAPIUpdateInListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateInListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateInListFilter: &sourceGoogleAnalyticsDataAPIUpdateInListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterSourceGoogleAnalyticsDataAPIUpdateNumericFilter(sourceGoogleAnalyticsDataAPIUpdateNumericFilter SourceGoogleAnalyticsDataAPIUpdateNumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateNumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateNumericFilter: &sourceGoogleAnalyticsDataAPIUpdateNumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterSourceGoogleAnalyticsDataAPIUpdateBetweenFilter(sourceGoogleAnalyticsDataAPIUpdateBetweenFilter SourceGoogleAnalyticsDataAPIUpdateBetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateBetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateBetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateBetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateInListFilter SourceGoogleAnalyticsDataAPIUpdateInListFilter = SourceGoogleAnalyticsDataAPIUpdateInListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateInListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateInListFilter = &sourceGoogleAnalyticsDataAPIUpdateInListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateInListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateNumericFilter SourceGoogleAnalyticsDataAPIUpdateNumericFilter = SourceGoogleAnalyticsDataAPIUpdateNumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateNumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateNumericFilter = &sourceGoogleAnalyticsDataAPIUpdateNumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateNumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateBetweenFilter SourceGoogleAnalyticsDataAPIUpdateBetweenFilter = SourceGoogleAnalyticsDataAPIUpdateBetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateBetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateBetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateBetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateBetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateStringFilter SourceGoogleAnalyticsDataAPIUpdateStringFilter = SourceGoogleAnalyticsDataAPIUpdateStringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateStringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateStringFilter = &sourceGoogleAnalyticsDataAPIUpdateStringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateStringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateStringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateStringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateInListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateInListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateNumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateNumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateBetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateBetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterTypeFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterType = "filter"
)

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

// SourceGoogleAnalyticsDataAPIUpdateFilter - A primitive filter. In the same FilterExpression, all of the filter's field names need to be either all dimensions.
type SourceGoogleAnalyticsDataAPIUpdateFilter struct {
	FieldName  string                                                                                `json:"field_name"`
	Filter     SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter      `json:"filter"`
	filterType *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterType `const:"filter" json:"filter_type,omitempty"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateFilter) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateFilter) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilter{}
	}
	return o.Filter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateFilter) GetFilterType() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFilterTypeFilter.ToPointer()
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue struct {
	Value     float64                                                                                                                    `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value struct {
	Value     string                                                                                                               `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_3_expression_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_3_expression_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ToValueValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ToValueValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ToValueValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue struct {
	Value     float64                                                                                                                            `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ToValueValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ToValueValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ToValueValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value struct {
	Value     string                                                                                                                      `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilter4ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_3_expression_filter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_3_expression_filter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue                                                        `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue                                                          `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue struct {
	Value     float64                                                                                                        `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value struct {
	Value     string                                                                                               `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_3_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_3_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Int64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3DoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterName `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums               `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue                                                      `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterFilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValue{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter struct {
	CaseSensitive *bool                                                                                                           `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                                                                                        `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3ExpressionFilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter struct {
	CaseSensitive *bool                                                                                                  `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterName  `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums `json:"matchType,omitempty"`
	Value         string                                                                                                 `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayStringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayInListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayNumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayBetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayExpression struct {
	FieldName string                                                                                            `json:"field_name"`
	Filter    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter `json:"filter"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayExpression) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayExpression) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter3Filter{}
	}
	return o.Filter
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterTypeNotExpression SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterType = "notExpression"
)

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

// SourceGoogleAnalyticsDataAPIUpdateNotExpression - The FilterExpression is NOT of notExpression.
type SourceGoogleAnalyticsDataAPIUpdateNotExpression struct {
	Expression *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayExpression `json:"expression,omitempty"`
	filterType *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterType `const:"notExpression" json:"filter_type,omitempty"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateNotExpression) GetExpression() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayExpression {
	if o == nil {
		return nil
	}
	return o.Expression
}

func (o *SourceGoogleAnalyticsDataAPIUpdateNotExpression) GetFilterType() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterTypeNotExpression.ToPointer()
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue struct {
	Value     float64                                                                                                                     `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value struct {
	Value     string                                                                                                                `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ToValueValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ToValueValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ToValueValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue struct {
	Value     float64                                                                                                                             `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ToValueValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ToValueValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ToValueValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value struct {
	Value     string                                                                                                                       `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilter4ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_2_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_2_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2Int64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2DoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue                    `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue                      `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue struct {
	Value     float64                                                                                                         `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value struct {
	Value     string                                                                                               `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterName `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums                           `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue                  `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ExpressionsFilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterValue{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2FilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2FilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2FilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter struct {
	CaseSensitive *bool                                                                                                 `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2FilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                                                                              `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2FilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2FilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter struct {
	CaseSensitive *bool                                                                                                   `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterName    `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums `json:"matchType,omitempty"`
	Value         string                                                                                                  `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter2ValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterStringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterInListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterNumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterBetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasExpression struct {
	FieldName string                                                                                           `json:"field_name"`
	Filter    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter `json:"filter"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasExpression) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasExpression) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilterFilter{}
	}
	return o.Filter
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasFilterTypeOrGroup SourceGoogleAnalyticsDataAPIUpdateSchemasFilterType = "orGroup"
)

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

// SourceGoogleAnalyticsDataAPIUpdateOrGroup - The FilterExpressions in orGroup have an OR relationship.
type SourceGoogleAnalyticsDataAPIUpdateOrGroup struct {
	Expressions []SourceGoogleAnalyticsDataAPIUpdateSchemasExpression `json:"expressions"`
	filterType  SourceGoogleAnalyticsDataAPIUpdateSchemasFilterType   `const:"orGroup" json:"filter_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateOrGroup) GetExpressions() []SourceGoogleAnalyticsDataAPIUpdateSchemasExpression {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasExpression{}
	}
	return o.Expressions
}

func (o *SourceGoogleAnalyticsDataAPIUpdateOrGroup) GetFilterType() SourceGoogleAnalyticsDataAPIUpdateSchemasFilterType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasFilterTypeOrGroup
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue struct {
	Value     float64                                                                                                                      `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value struct {
	Value     string                                                                                                                      `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_1_expressions_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_1_expressions_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue struct {
	Value     float64                                                                                              `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ToValueValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ToValueValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ToValueValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value struct {
	Value     string                                                                                                                              `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ToValueValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ToValueValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilter4ToValueValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_1_expressions_filter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_1_expressions_filter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue                                          `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue                                            `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterFromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue struct {
	Value     float64                                                                                                               `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value struct {
	Value     string                                                                                                          `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_1_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_Dimensions filter_1_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Int64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1DoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterName `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums     `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue                                        `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterFilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterValue{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter struct {
	CaseSensitive *bool                                                                                                            `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                                                                                         `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ExpressionsFilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter struct {
	CaseSensitive *bool                                                                                                   `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterName   `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums `json:"matchType,omitempty"`
	Value         string                                                                                                  `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1ValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_dimensionFilter_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1FilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterStringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterInListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterNumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterBetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateExpression struct {
	FieldName string                                                                                            `json:"field_name"`
	Filter    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter `json:"filter"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateExpression) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateExpression) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayDimensionFilterDimensionsFilter1Filter{}
	}
	return o.Filter
}

type SourceGoogleAnalyticsDataAPIUpdateFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateFilterTypeAndGroup SourceGoogleAnalyticsDataAPIUpdateFilterType = "andGroup"
)

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

// SourceGoogleAnalyticsDataAPIUpdateAndGroup - The FilterExpressions in andGroup have an AND relationship.
type SourceGoogleAnalyticsDataAPIUpdateAndGroup struct {
	Expressions []SourceGoogleAnalyticsDataAPIUpdateExpression `json:"expressions"`
	filterType  SourceGoogleAnalyticsDataAPIUpdateFilterType   `const:"andGroup" json:"filter_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateAndGroup) GetExpressions() []SourceGoogleAnalyticsDataAPIUpdateExpression {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateExpression{}
	}
	return o.Expressions
}

func (o *SourceGoogleAnalyticsDataAPIUpdateAndGroup) GetFilterType() SourceGoogleAnalyticsDataAPIUpdateFilterType {
	return SourceGoogleAnalyticsDataAPIUpdateFilterTypeAndGroup
}

type SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateAndGroup      SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterType = "source-google-analytics-data-api-update_andGroup"
	SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateOrGroup       SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterType = "source-google-analytics-data-api-update_orGroup"
	SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateNotExpression SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterType = "source-google-analytics-data-api-update_notExpression"
	SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateFilter        SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterType = "source-google-analytics-data-api-update_filter"
)

// SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter - Dimensions filter
type SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter struct {
	SourceGoogleAnalyticsDataAPIUpdateAndGroup      *SourceGoogleAnalyticsDataAPIUpdateAndGroup      `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateOrGroup       *SourceGoogleAnalyticsDataAPIUpdateOrGroup       `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateNotExpression *SourceGoogleAnalyticsDataAPIUpdateNotExpression `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateFilter        *SourceGoogleAnalyticsDataAPIUpdateFilter        `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateDimensionsFilterSourceGoogleAnalyticsDataAPIUpdateAndGroup(sourceGoogleAnalyticsDataAPIUpdateAndGroup SourceGoogleAnalyticsDataAPIUpdateAndGroup) SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateAndGroup

	return SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter{
		SourceGoogleAnalyticsDataAPIUpdateAndGroup: &sourceGoogleAnalyticsDataAPIUpdateAndGroup,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateDimensionsFilterSourceGoogleAnalyticsDataAPIUpdateOrGroup(sourceGoogleAnalyticsDataAPIUpdateOrGroup SourceGoogleAnalyticsDataAPIUpdateOrGroup) SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateOrGroup

	return SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter{
		SourceGoogleAnalyticsDataAPIUpdateOrGroup: &sourceGoogleAnalyticsDataAPIUpdateOrGroup,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateDimensionsFilterSourceGoogleAnalyticsDataAPIUpdateNotExpression(sourceGoogleAnalyticsDataAPIUpdateNotExpression SourceGoogleAnalyticsDataAPIUpdateNotExpression) SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateNotExpression

	return SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter{
		SourceGoogleAnalyticsDataAPIUpdateNotExpression: &sourceGoogleAnalyticsDataAPIUpdateNotExpression,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateDimensionsFilterSourceGoogleAnalyticsDataAPIUpdateFilter(sourceGoogleAnalyticsDataAPIUpdateFilter SourceGoogleAnalyticsDataAPIUpdateFilter) SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateFilter

	return SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter{
		SourceGoogleAnalyticsDataAPIUpdateFilter: &sourceGoogleAnalyticsDataAPIUpdateFilter,
		Type:                                     typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateAndGroup SourceGoogleAnalyticsDataAPIUpdateAndGroup = SourceGoogleAnalyticsDataAPIUpdateAndGroup{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateAndGroup, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateAndGroup = &sourceGoogleAnalyticsDataAPIUpdateAndGroup
		u.Type = SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateAndGroup
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateOrGroup SourceGoogleAnalyticsDataAPIUpdateOrGroup = SourceGoogleAnalyticsDataAPIUpdateOrGroup{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateOrGroup, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateOrGroup = &sourceGoogleAnalyticsDataAPIUpdateOrGroup
		u.Type = SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateOrGroup
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateNotExpression SourceGoogleAnalyticsDataAPIUpdateNotExpression = SourceGoogleAnalyticsDataAPIUpdateNotExpression{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateNotExpression, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateNotExpression = &sourceGoogleAnalyticsDataAPIUpdateNotExpression
		u.Type = SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateNotExpression
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateFilter SourceGoogleAnalyticsDataAPIUpdateFilter = SourceGoogleAnalyticsDataAPIUpdateFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateFilter = &sourceGoogleAnalyticsDataAPIUpdateFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateDimensionsFilterTypeSourceGoogleAnalyticsDataAPIUpdateFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateAndGroup != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateAndGroup, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateOrGroup != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateOrGroup, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateNotExpression != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateNotExpression, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue struct {
	Value     float64                                                                                              `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value struct {
	Value     string                                                                                         `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilter4ValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilter4ValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue struct {
	Value     float64                                                                                                     `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilter4ValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilter4ValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value struct {
	Value     string                                                                                                     `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_4_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_4_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4Int64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4DoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue                                                    `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateSchemasToValue                                                      `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasFromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateSchemasToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue struct {
	Value     float64                                                                                       `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value struct {
	Value     string                                                                           `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterName `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums             `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateSchemasValue                                                  `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateSchemasValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasValue{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter struct {
	CaseSensitive *bool                                                                                          `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                                                                       `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter struct {
	CaseSensitive *bool                                                                             `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterName `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums           `json:"matchType,omitempty"`
	Value         string                                                                            `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionType = "source-google-analytics-data-api-update_Schemas_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionType = "source-google-analytics-data-api-update_Schemas_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionType = "source-google-analytics-data-api-update_Schemas_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionType = "source-google-analytics-data-api-update_Schemas_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterSourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterSourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterSourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterSourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasStringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasInListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasNumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasBetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterTypeFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterType = "filter"
)

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

// SourceGoogleAnalyticsDataAPIUpdateSchemasFilter - A primitive filter. In the same FilterExpression, all of the filter's field names need to be either all metrics.
type SourceGoogleAnalyticsDataAPIUpdateSchemasFilter struct {
	FieldName  string                                                                                           `json:"field_name"`
	Filter     SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter                                `json:"filter"`
	filterType *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterType `const:"filter" json:"filter_type,omitempty"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasFilter) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasFilter) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayFilter{}
	}
	return o.Filter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasFilter) GetFilterType() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter4FilterTypeFilter.ToPointer()
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue struct {
	Value     float64                                                                                                              `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value struct {
	Value     string                                                                                                         `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_expression_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_expression_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ToValueValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ToValueValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ToValueValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue struct {
	Value     float64                                                                                                                      `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ToValueValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ToValueValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ToValueValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value struct {
	Value     string                                                                                                                `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilter4ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_expression_filter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_expression_filter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue                        `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue                          `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue struct {
	Value     float64                                                                                                  `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value struct {
	Value     string                                                                                         `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Int64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3DoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterName `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums     `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value                      `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterFilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Value{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter struct {
	CaseSensitive *bool                                                                                                     `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                                                                                  `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ExpressionFilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter struct {
	CaseSensitive *bool                                                                                             `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterName   `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums `json:"matchType,omitempty"`
	Value         string                                                                                            `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3ValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_3_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3StringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3InListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3NumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3BetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Expression struct {
	FieldName string                                                                                      `json:"field_name"`
	Filter    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter `json:"filter"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Expression) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Expression) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Filter{}
	}
	return o.Filter
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterTypeNotExpression SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterType = "notExpression"
)

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

// SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression - The FilterExpression is NOT of notExpression.
type SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression struct {
	Expression *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Expression `json:"expression,omitempty"`
	filterType *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterType `const:"notExpression" json:"filter_type,omitempty"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression) GetExpression() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3Expression {
	if o == nil {
		return nil
	}
	return o.Expression
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression) GetFilterType() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter3FilterTypeNotExpression.ToPointer()
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue struct {
	Value     float64                                                                                                               `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value struct {
	Value     string                                                                                                          `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_2_expressions_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_2_expressions_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ToValueValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ToValueValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ToValueValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue struct {
	Value     float64                                                                                                                       `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ToValueValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ToValueValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ToValueValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value struct {
	Value     string                                                                                                                 `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilter4ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_2_expressions_filter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_2_expressions_filter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue                          `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue                            `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue struct {
	Value     float64                                                                                                   `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value struct {
	Value     string                                                                                         `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_2_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_2_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2Int64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2DoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterName `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums     `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue                        `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterFilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValue{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter struct {
	CaseSensitive *bool                                                                                                      `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                                                                                   `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ExpressionsFilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2FilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2FilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2FilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter struct {
	CaseSensitive *bool                                                                                             `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2FilterName   `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums `json:"matchType,omitempty"`
	Value         string                                                                                            `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2FilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2FilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter2ValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterStringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterInListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterNumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterBetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterExpression struct {
	FieldName string                                                                                     `json:"field_name"`
	Filter    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter `json:"filter"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterExpression) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterExpression) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilter{}
	}
	return o.Filter
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterTypeOrGroup SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterType = "orGroup"
)

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

// SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup - The FilterExpressions in orGroup have an OR relationship.
type SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup struct {
	Expressions []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterExpression `json:"expressions"`
	filterType  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterType   `const:"orGroup" json:"filter_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup) GetExpressions() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterExpression {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterExpression{}
	}
	return o.Expressions
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup) GetFilterType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterFilterTypeOrGroup
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterNameBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterName = "betweenFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue struct {
	Value     float64                                                                                                   `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value struct {
	Value     string                                                                                         `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_1_expressions_filter_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_1_expressions_filter_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue struct {
	Value     float64                                                                                                               `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value struct {
	Value     string                                                                                                          `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_1_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_1_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValueTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1Int64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1DoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterName `const:"betweenFilter" json:"filter_name"`
	FromValue  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue                           `json:"fromValue"`
	ToValue    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue                             `json:"toValue"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterNameBetweenFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter) GetFromValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFromValue{}
	}
	return o.FromValue
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter) GetToValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterToValue{}
	}
	return o.ToValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1FilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1FilterNameNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1FilterName = "numericFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnumsOperationUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums = "OPERATION_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnumsEqual                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums = "EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnumsLessThan             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums = "LESS_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnumsLessThanOrEqual      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums = "LESS_THAN_OR_EQUAL"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnumsGreaterThan          SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums = "GREATER_THAN"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnumsGreaterThanOrEqual   SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums = "GREATER_THAN_OR_EQUAL"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueValueTypeDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueValueType = "doubleValue"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue struct {
	Value     float64                                                                                                                     `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueValueType `const:"doubleValue" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue) GetValue() float64 {
	if o == nil {
		return 0.0
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueValueTypeDoubleValue
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueTypeInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueType = "int64Value"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value struct {
	Value     string                                                                                                                 `json:"value"`
	valueType SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueType `const:"int64Value" json:"value_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value) GetValueType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilter3ValueTypeInt64Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_1_expressions_int64Value"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_Metrics filter_1_expressions_doubleValue"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValueUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsInt64Value, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsDoubleValue, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter struct {
	filterName SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1FilterName  `const:"numericFilter" json:"filter_name"`
	Operation  []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums `json:"operation"`
	Value      SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue                     `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1FilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1FilterNameNumericFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter) GetOperation() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilterValidEnums{}
	}
	return o.Operation
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter) GetValue() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterValue{}
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterFilterNameInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterFilterName = "inListFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter struct {
	CaseSensitive *bool                                                                                                                  `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterFilterName `const:"inListFilter" json:"filter_name"`
	Values        []string                                                                                                               `json:"values"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterFilterNameInListFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter) GetValues() []string {
	if o == nil {
		return []string{}
	}
	return o.Values
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterName string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterNameStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterName = "stringFilter"
)

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

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnumsMatchTypeUnspecified SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums = "MATCH_TYPE_UNSPECIFIED"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnumsExact                SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums = "EXACT"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnumsBeginsWith           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums = "BEGINS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnumsEndsWith             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums = "ENDS_WITH"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnumsContains             SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums = "CONTAINS"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnumsFullRegexp           SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums = "FULL_REGEXP"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnumsPartialRegexp        SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums = "PARTIAL_REGEXP"
)

func (e SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums) ToPointer() *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums {
	return &e
}
func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "MATCH_TYPE_UNSPECIFIED":
		fallthrough
	case "EXACT":
		fallthrough
	case "BEGINS_WITH":
		fallthrough
	case "ENDS_WITH":
		fallthrough
	case "CONTAINS":
		fallthrough
	case "FULL_REGEXP":
		fallthrough
	case "PARTIAL_REGEXP":
		*e = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums: %v", v)
	}
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter struct {
	CaseSensitive *bool                                                                                                            `json:"caseSensitive,omitempty"`
	filterName    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterName `const:"stringFilter" json:"filter_name"`
	MatchType     []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums                `json:"matchType,omitempty"`
	Value         string                                                                                                           `json:"value"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter) GetCaseSensitive() *bool {
	if o == nil {
		return nil
	}
	return o.CaseSensitive
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter) GetFilterName() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterName {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ExpressionsFilterFilterNameStringFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter) GetMatchType() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterMetricsFilter1ValidEnums {
	if o == nil {
		return nil
	}
	return o.MatchType
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter) GetValue() string {
	if o == nil {
		return ""
	}
	return o.Value
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_stringFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_inListFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_numericFilter"
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionType = "source-google-analytics-data-api-update_Schemas_custom_reports_array_metricFilter_betweenFilter"
)

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter  *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter  `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter) SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter

	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterUnionTypeSourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterStringFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterInListFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterNumericFilter, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterBetweenFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterExpression struct {
	FieldName string                                                                        `json:"field_name"`
	Filter    SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter `json:"filter"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterExpression) GetFieldName() string {
	if o == nil {
		return ""
	}
	return o.FieldName
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterExpression) GetFilter() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter {
	if o == nil {
		return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilter{}
	}
	return o.Filter
}

type SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterTypeAndGroup SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterType = "andGroup"
)

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

// SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup - The FilterExpressions in andGroup have an AND relationship.
type SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup struct {
	Expressions []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterExpression `json:"expressions"`
	filterType  SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterType   `const:"andGroup" json:"filter_type"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup) GetExpressions() []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterExpression {
	if o == nil {
		return []SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterExpression{}
	}
	return o.Expressions
}

func (o *SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup) GetFilterType() SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterType {
	return SourceGoogleAnalyticsDataAPIUpdateSchemasCustomReportsArrayMetricFilterFilterTypeAndGroup
}

type SourceGoogleAnalyticsDataAPIUpdateMetricsFilterType string

const (
	SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup      SourceGoogleAnalyticsDataAPIUpdateMetricsFilterType = "source-google-analytics-data-api-update_Schemas_andGroup"
	SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup       SourceGoogleAnalyticsDataAPIUpdateMetricsFilterType = "source-google-analytics-data-api-update_Schemas_orGroup"
	SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression SourceGoogleAnalyticsDataAPIUpdateMetricsFilterType = "source-google-analytics-data-api-update_Schemas_notExpression"
	SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasFilter        SourceGoogleAnalyticsDataAPIUpdateMetricsFilterType = "source-google-analytics-data-api-update_Schemas_filter"
)

// SourceGoogleAnalyticsDataAPIUpdateMetricsFilter - Metrics filter
type SourceGoogleAnalyticsDataAPIUpdateMetricsFilter struct {
	SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup      *SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup      `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup       *SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup       `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression *SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression `queryParam:"inline"`
	SourceGoogleAnalyticsDataAPIUpdateSchemasFilter        *SourceGoogleAnalyticsDataAPIUpdateSchemasFilter        `queryParam:"inline"`

	Type SourceGoogleAnalyticsDataAPIUpdateMetricsFilterType
}

func CreateSourceGoogleAnalyticsDataAPIUpdateMetricsFilterSourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup(sourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup) SourceGoogleAnalyticsDataAPIUpdateMetricsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup

	return SourceGoogleAnalyticsDataAPIUpdateMetricsFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup: &sourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateMetricsFilterSourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup(sourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup) SourceGoogleAnalyticsDataAPIUpdateMetricsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup

	return SourceGoogleAnalyticsDataAPIUpdateMetricsFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup: &sourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateMetricsFilterSourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression(sourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression) SourceGoogleAnalyticsDataAPIUpdateMetricsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression

	return SourceGoogleAnalyticsDataAPIUpdateMetricsFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression: &sourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression,
		Type: typ,
	}
}

func CreateSourceGoogleAnalyticsDataAPIUpdateMetricsFilterSourceGoogleAnalyticsDataAPIUpdateSchemasFilter(sourceGoogleAnalyticsDataAPIUpdateSchemasFilter SourceGoogleAnalyticsDataAPIUpdateSchemasFilter) SourceGoogleAnalyticsDataAPIUpdateMetricsFilter {
	typ := SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasFilter

	return SourceGoogleAnalyticsDataAPIUpdateMetricsFilter{
		SourceGoogleAnalyticsDataAPIUpdateSchemasFilter: &sourceGoogleAnalyticsDataAPIUpdateSchemasFilter,
		Type: typ,
	}
}

func (u *SourceGoogleAnalyticsDataAPIUpdateMetricsFilter) UnmarshalJSON(data []byte) error {

	var sourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup = SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup = &sourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup
		u.Type = SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup = SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup = &sourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup
		u.Type = SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression = SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression = &sourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression
		u.Type = SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression
		return nil
	}

	var sourceGoogleAnalyticsDataAPIUpdateSchemasFilter SourceGoogleAnalyticsDataAPIUpdateSchemasFilter = SourceGoogleAnalyticsDataAPIUpdateSchemasFilter{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateSchemasFilter, "", true, true); err == nil {
		u.SourceGoogleAnalyticsDataAPIUpdateSchemasFilter = &sourceGoogleAnalyticsDataAPIUpdateSchemasFilter
		u.Type = SourceGoogleAnalyticsDataAPIUpdateMetricsFilterTypeSourceGoogleAnalyticsDataAPIUpdateSchemasFilter
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsDataAPIUpdateMetricsFilter", string(data))
}

func (u SourceGoogleAnalyticsDataAPIUpdateMetricsFilter) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasAndGroup, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasOrGroup, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasNotExpression, "", true)
	}

	if u.SourceGoogleAnalyticsDataAPIUpdateSchemasFilter != nil {
		return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateSchemasFilter, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateMetricsFilter: all fields are null")
}

type SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig struct {
	// Cohort reports creates a time series of user retention for the cohort.
	CohortSpec *SourceGoogleAnalyticsDataAPIUpdateCohortReports `json:"cohortSpec,omitempty"`
	// Dimensions filter
	DimensionFilter *SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter `json:"dimensionFilter,omitempty"`
	// A list of dimensions.
	Dimensions []string `json:"dimensions"`
	// Metrics filter
	MetricFilter *SourceGoogleAnalyticsDataAPIUpdateMetricsFilter `json:"metricFilter,omitempty"`
	// A list of metrics.
	Metrics []string `json:"metrics"`
	// The name of the custom report, this name would be used as stream name.
	Name string `json:"name"`
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig) GetCohortSpec() *SourceGoogleAnalyticsDataAPIUpdateCohortReports {
	if o == nil {
		return nil
	}
	return o.CohortSpec
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig) GetDimensionFilter() *SourceGoogleAnalyticsDataAPIUpdateDimensionsFilter {
	if o == nil {
		return nil
	}
	return o.DimensionFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig) GetDimensions() []string {
	if o == nil {
		return []string{}
	}
	return o.Dimensions
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig) GetMetricFilter() *SourceGoogleAnalyticsDataAPIUpdateMetricsFilter {
	if o == nil {
		return nil
	}
	return o.MetricFilter
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig) GetMetrics() []string {
	if o == nil {
		return []string{}
	}
	return o.Metrics
}

func (o *SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig) GetName() string {
	if o == nil {
		return ""
	}
	return o.Name
}

type SourceGoogleAnalyticsDataAPIUpdate struct {
	// Enables conversion of `conversions:*` event metrics from integers to floats. This is beneficial for preventing data rounding when the API returns float values for any `conversions:*` fields.
	ConvertConversionsEvent *bool `default:"false" json:"convert_conversions_event"`
	// Credentials for the service
	Credentials *SourceGoogleAnalyticsDataAPIUpdateCredentials `json:"credentials,omitempty"`
	// You can add your Custom Analytics report by creating one.
	CustomReportsArray []SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig `json:"custom_reports_array,omitempty"`
	// The end date from which to replicate report data in the format YYYY-MM-DD. Data generated after this date will not be included in the report. Not applied to custom Cohort reports. When no date is provided or the date is in the future, the date from today is used.
	DateRangesEndDate *types.Date `json:"date_ranges_end_date,omitempty"`
	// The start date from which to replicate report data in the format YYYY-MM-DD. Data generated before this date will not be included in the report. Not applied to custom Cohort reports.
	DateRangesStartDate *types.Date `json:"date_ranges_start_date,omitempty"`
	// If false, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. More information is available in <a href="https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport#request-body">the documentation</a>.
	KeepEmptyRows *bool `default:"false" json:"keep_empty_rows"`
	// Since attribution changes after the event date, and Google Analytics has a data processing latency, we should specify how many days in the past we should refresh the data in every run. So if you set it at 5 days, in every sync it will fetch the last bookmark date minus 5 days.
	LookbackWindow *int64 `default:"2" json:"lookback_window"`
	// A list of your Property IDs. The Property ID is a unique number assigned to each property in Google Analytics, found in your GA4 property URL. This ID allows the connector to track the specific events associated with your property. Refer to the <a href='https://developers.google.com/analytics/devguides/reporting/data/v1/property-id#what_is_my_property_id'>Google Analytics documentation</a> to locate your property ID.
	PropertyIds []string `json:"property_ids"`
	// The interval in days for each data request made to the Google Analytics API. A larger value speeds up data sync, but increases the chance of data sampling, which may result in inaccuracies. We recommend a value of 1 to minimize sampling, unless speed is an absolute priority over accuracy. Acceptable values range from 1 to 364. Does not apply to custom Cohort reports. More information is available in <a href="https://docs.airbyte.com/integrations/sources/google-analytics-data-api">the documentation</a>.
	WindowInDays *int64 `default:"1" json:"window_in_days"`
}

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

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

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetConvertConversionsEvent() *bool {
	if o == nil {
		return nil
	}
	return o.ConvertConversionsEvent
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetCredentials() *SourceGoogleAnalyticsDataAPIUpdateCredentials {
	if o == nil {
		return nil
	}
	return o.Credentials
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetCustomReportsArray() []SourceGoogleAnalyticsDataAPIUpdateCustomReportConfig {
	if o == nil {
		return nil
	}
	return o.CustomReportsArray
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetDateRangesEndDate() *types.Date {
	if o == nil {
		return nil
	}
	return o.DateRangesEndDate
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetDateRangesStartDate() *types.Date {
	if o == nil {
		return nil
	}
	return o.DateRangesStartDate
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetKeepEmptyRows() *bool {
	if o == nil {
		return nil
	}
	return o.KeepEmptyRows
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetLookbackWindow() *int64 {
	if o == nil {
		return nil
	}
	return o.LookbackWindow
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetPropertyIds() []string {
	if o == nil {
		return []string{}
	}
	return o.PropertyIds
}

func (o *SourceGoogleAnalyticsDataAPIUpdate) GetWindowInDays() *int64 {
	if o == nil {
		return nil
	}
	return o.WindowInDays
}
