diff --git a/README.md b/README.md index bb85b8300..7ec73724a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ title: Platform API Client SDK - Go A Go package to interface with the Genesys Cloud Platform API. View the documentation on the [pkg.go.dev](https://pkg.go.dev/github.com/MyPureCloud/platform-client-sdk-go). Browse the source code on [Github](https://github.com/MyPureCloud/platform-client-sdk-go). -Latest version: 52.0.0 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)](https://github.com/MyPureCloud/platform-client-sdk-go) +Latest version: 52.0.1 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)](https://github.com/MyPureCloud/platform-client-sdk-go) [![Release Notes Badge](https://developer-content.genesys.cloud/images/sdk-release-notes.png)](https://github.com/MyPureCloud/platform-client-sdk-go/blob/master/releaseNotes.md) ## Golang Version Dependency diff --git a/docs/index.md b/docs/index.md index bb85b8300..7ec73724a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,7 +4,7 @@ title: Platform API Client SDK - Go A Go package to interface with the Genesys Cloud Platform API. View the documentation on the [pkg.go.dev](https://pkg.go.dev/github.com/MyPureCloud/platform-client-sdk-go). Browse the source code on [Github](https://github.com/MyPureCloud/platform-client-sdk-go). -Latest version: 52.0.0 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)](https://github.com/MyPureCloud/platform-client-sdk-go) +Latest version: 52.0.1 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)](https://github.com/MyPureCloud/platform-client-sdk-go) [![Release Notes Badge](https://developer-content.genesys.cloud/images/sdk-release-notes.png)](https://github.com/MyPureCloud/platform-client-sdk-go/blob/master/releaseNotes.md) ## Golang Version Dependency diff --git a/docs/releaseNotes.md b/docs/releaseNotes.md index 20d0e3314..0fe0a9e11 100644 --- a/docs/releaseNotes.md +++ b/docs/releaseNotes.md @@ -1,283 +1,12 @@ Platform API version: 4893 -# Major Changes (14 changes) +Fixing date and date time handling in the Go SDK -**/uploads/v1/publicassets/{subResources}** (1 change) +# Major Changes (0 changes) -* Path /uploads/v1/publicassets/{subResources} was removed -**/webdeployments/v1/{subResources}** (1 change) - -* Path /webdeployments/v1/{subResources} was removed - -**/api/v2/quality/conversations/{conversationId}/audits** (1 change) - -* Path /api/v2/quality/conversations/{conversationId}/audits was removed - -**GET /api/v2/outbound/messagingcampaigns/divisionviews** (1 change) - -* Parameter type was added - -**GET /api/v2/learning/assignments** (3 changes) - -* Parameter pass was added -* Parameter minPercentageScore was added -* Parameter maxPercentageScore was added - -**GET /api/v2/learning/assignments/me** (3 changes) - -* Parameter pass was added -* Parameter minPercentageScore was added -* Parameter maxPercentageScore was added - -**GET /api/v2/learning/modules** (1 change) - -* Parameter isPublished was added - -**QualityAudit** (1 change) - -* Model QualityAudit was removed - -**QualityAuditPage** (1 change) - -* Model QualityAuditPage was removed - -**Edge** (1 change) - -* Enum value BYOH was removed from property edgeDeploymentType - - -# Minor Changes (85 changes) - -**/api/v2/gamification/profiles/{performanceProfileId}/activate** (2 changes) - -* Path was added -* Operation POST was added - -**/api/v2/gamification/profiles/{performanceProfileId}/deactivate** (2 changes) - -* Path was added -* Operation POST was added - -**/api/v2/recording/jobs/{jobId}/failedrecordings** (2 changes) - -* Path was added -* Operation GET was added - -**/api/v2/webdeployments/configurations/{configurationId}** (2 changes) - -* Path was added -* Operation DELETE was added - -**/api/v2/webdeployments/configurations** (3 changes) - -* Path was added -* Operation GET was added -* Operation POST was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions** (2 changes) - -* Path was added -* Operation GET was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions/{versionId}** (2 changes) - -* Path was added -* Operation GET was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions/draft** (3 changes) - -* Path was added -* Operation GET was added -* Operation PUT was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions/draft/publish** (2 changes) - -* Path was added -* Operation POST was added - -**/api/v2/webdeployments/deployments/{deploymentId}** (4 changes) - -* Path was added -* Operation GET was added -* Operation PUT was added -* Operation DELETE was added - -**/api/v2/webdeployments/deployments** (3 changes) - -* Path was added -* Operation GET was added -* Operation POST was added - -**/api/v2/learning/assessments/scoring** (2 changes) - -* Path was added -* Operation POST was added - -**ViewFilter** (3 changes) - -* Optional property isRecorded was added -* Optional property hasEvaluation was added -* Optional property hasScoredEvaluation was added - -**AuditLogMessage** (1 change) - -* Enum value DynamicGroup was added to property entityType - -**AuditQueryEntity** (1 change) - -* Enum value DynamicGroup was added to property name - -**EventLog** (1 change) - -* Enum value MESSAGE_RESTRICTION was added to property category - -**EventMessage** (1 change) - -* Enum value INVALID_EMAIL_ADDRESS was added to property code - -**Recording** (1 change) - -* Optional property recordingErrorStatus was added - -**FailedRecordingsEntityListing** (1 change) - -* Model was added - -**RecordingJobFailedRecording** (1 change) - -* Model was added - -**RecordingJob** (1 change) - -* Optional property failedRecordings was added - -**Edge** (1 change) - -* Enum value CHS was added to property edgeDeploymentType - -**AuthenticationSettings** (1 change) - -* Model was added - -**FileUploadMode** (1 change) - -* Model was added - -**FileUploadSettings** (1 change) - -* Model was added - -**FormsTrackTrigger** (1 change) - -* Model was added - -**IdleEventTrigger** (1 change) - -* Model was added - -**JourneyEventsSettings** (1 change) - -* Model was added - -**LauncherButtonSettings** (1 change) - -* Model was added - -**MessengerSettings** (1 change) - -* Model was added - -**MessengerStyles** (1 change) - -* Model was added - -**ScrollPercentageEventTrigger** (1 change) - -* Model was added - -**SelectorEventTrigger** (1 change) - -* Model was added - -**WebDeploymentConfigurationVersion** (1 change) - -* Model was added - -**WebDeploymentConfigurationVersionEntityListing** (1 change) - -* Model was added - -**WebDeployment** (1 change) - -* Model was added - -**WebDeploymentConfigurationVersionEntityRef** (1 change) - -* Model was added - -**WebDeploymentEntityListing** (1 change) - -* Model was added - -**DevelopmentActivityAggregateQueryResponseMetric** (3 changes) - -* Enum value nPassedActivities was added to property metric -* Enum value nFailedActivities was added to property metric -* Enum value oActivityScore was added to property metric - -**DevelopmentActivityAggregateQueryResponseStatistics** (3 changes) - -* Optional property min was added -* Optional property max was added -* Optional property sum was added - -**DevelopmentActivityAggregateParam** (3 changes) - -* Enum value nPassedActivities was added to property metrics -* Enum value nFailedActivities was added to property metrics -* Enum value oActivityScore was added to property metrics - -**LearningAssessmentScoringRequest** (1 change) - -* Model was added - -**LearningAssignmentAggregateQueryResponseMetric** (3 changes) - -* Enum value nPassedActivities was added to property metric -* Enum value nFailedActivities was added to property metric -* Enum value oActivityScore was added to property metric - -**LearningAssignmentAggregateQueryResponseStats** (3 changes) - -* Optional property min was added -* Optional property max was added -* Optional property sum was added - -**LearningAssignmentAggregateParam** (3 changes) - -* Enum value nPassedActivities was added to property metrics -* Enum value nFailedActivities was added to property metrics -* Enum value oActivityScore was added to property metrics - -**LearningAssignment** (4 changes) - -* Optional property assessment was added -* Optional property percentageScore was added -* Optional property isPassed was added -* Optional property assessmentForm was added - -**LearningModule** (3 changes) - -* Optional property type was added -* Optional property assessmentForm was added -* Optional property summaryData was added - -**LearningModuleRequest** (2 changes) - -* Optional property type was added -* Optional property assessmentForm was added +# Minor Changes (0 changes) # Point Changes (0 changes) diff --git a/go.mod b/go.mod index 2def1b3f9..42dab25c8 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/fsnotify/fsnotify v1.4.9 github.com/google/uuid v1.2.0 github.com/hashicorp/go-retryablehttp v0.6.8 + github.com/leekchan/timeutil v0.0.0-20150802142658-28917288c48d github.com/spf13/viper v1.7.1 github.com/tidwall/pretty v1.1.0 ) diff --git a/go.sum b/go.sum index bc8c4d792..a5f9252f8 100644 --- a/go.sum +++ b/go.sum @@ -115,6 +115,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/leekchan/timeutil v0.0.0-20150802142658-28917288c48d h1:2puqoOQwi3Ai1oznMOsFIbifm6kIfJaLLyYzWD4IzTs= +github.com/leekchan/timeutil v0.0.0-20150802142658-28917288c48d/go.mod h1:hO90vCP2x3exaSH58BIAowSKvV+0OsY21TtzuFGHON4= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= diff --git a/platformclientv2/acknowledgescreenrecordingrequest.go b/platformclientv2/acknowledgescreenrecordingrequest.go index 957bb6db3..e2602ad03 100644 --- a/platformclientv2/acknowledgescreenrecordingrequest.go +++ b/platformclientv2/acknowledgescreenrecordingrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Acknowledgescreenrecordingrequest struct { } +func (u *Acknowledgescreenrecordingrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Acknowledgescreenrecordingrequest + + + + return json.Marshal(&struct { + ParticipantJid *string `json:"participantJid,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + *Alias + }{ + ParticipantJid: u.ParticipantJid, + + RoomId: u.RoomId, + + ConversationId: u.ConversationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Acknowledgescreenrecordingrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/action.go b/platformclientv2/action.go index 616c011c0..3ab06068d 100644 --- a/platformclientv2/action.go +++ b/platformclientv2/action.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Action struct { } +func (u *Action) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Action + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + IntegrationId *string `json:"integrationId,omitempty"` + + Category *string `json:"category,omitempty"` + + Contract *Actioncontract `json:"contract,omitempty"` + + Version *int `json:"version,omitempty"` + + Secure *bool `json:"secure,omitempty"` + + Config *Actionconfig `json:"config,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + IntegrationId: u.IntegrationId, + + Category: u.Category, + + Contract: u.Contract, + + Version: u.Version, + + Secure: u.Secure, + + Config: u.Config, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Action) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionconfig.go b/platformclientv2/actionconfig.go index 3ff7dbbae..e608b9931 100644 --- a/platformclientv2/actionconfig.go +++ b/platformclientv2/actionconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Actionconfig struct { } +func (u *Actionconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionconfig + + + + return json.Marshal(&struct { + Request *Requestconfig `json:"request,omitempty"` + + Response *Responseconfig `json:"response,omitempty"` + *Alias + }{ + Request: u.Request, + + Response: u.Response, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actioncontract.go b/platformclientv2/actioncontract.go index 2b62ad98c..469231370 100644 --- a/platformclientv2/actioncontract.go +++ b/platformclientv2/actioncontract.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Actioncontract struct { } +func (u *Actioncontract) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actioncontract + + + + return json.Marshal(&struct { + Output *Actionoutput `json:"output,omitempty"` + + Input *Actioninput `json:"input,omitempty"` + *Alias + }{ + Output: u.Output, + + Input: u.Input, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actioncontract) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actioncontractinput.go b/platformclientv2/actioncontractinput.go index 65c07e469..2523e3906 100644 --- a/platformclientv2/actioncontractinput.go +++ b/platformclientv2/actioncontractinput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Actioncontractinput struct { } +func (u *Actioncontractinput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actioncontractinput + + + + return json.Marshal(&struct { + Input *Postinputcontract `json:"input,omitempty"` + + Output *Postoutputcontract `json:"output,omitempty"` + *Alias + }{ + Input: u.Input, + + Output: u.Output, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actioncontractinput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionentitylisting.go b/platformclientv2/actionentitylisting.go index 44000a94a..523302158 100644 --- a/platformclientv2/actionentitylisting.go +++ b/platformclientv2/actionentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Actionentitylisting struct { } +func (u *Actionentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionentitylisting + + + + return json.Marshal(&struct { + Entities *[]Action `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actioninput.go b/platformclientv2/actioninput.go index f9b5cc307..1f6a14afc 100644 --- a/platformclientv2/actioninput.go +++ b/platformclientv2/actioninput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Actioninput struct { } +func (u *Actioninput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actioninput + + + + return json.Marshal(&struct { + InputSchema *Jsonschemadocument `json:"inputSchema,omitempty"` + + InputSchemaFlattened *Jsonschemadocument `json:"inputSchemaFlattened,omitempty"` + + InputSchemaUri *string `json:"inputSchemaUri,omitempty"` + *Alias + }{ + InputSchema: u.InputSchema, + + InputSchemaFlattened: u.InputSchemaFlattened, + + InputSchemaUri: u.InputSchemaUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actioninput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionmap.go b/platformclientv2/actionmap.go index d844797b6..9a6005bc9 100644 --- a/platformclientv2/actionmap.go +++ b/platformclientv2/actionmap.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,122 @@ type Actionmap struct { } +func (u *Actionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionmap + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + TriggerWithSegments *[]string `json:"triggerWithSegments,omitempty"` + + TriggerWithEventConditions *[]Eventcondition `json:"triggerWithEventConditions,omitempty"` + + TriggerWithOutcomeProbabilityConditions *[]Outcomeprobabilitycondition `json:"triggerWithOutcomeProbabilityConditions,omitempty"` + + PageUrlConditions *[]Urlcondition `json:"pageUrlConditions,omitempty"` + + Activation *Activation `json:"activation,omitempty"` + + Weight *int `json:"weight,omitempty"` + + Action *Actionmapaction `json:"action,omitempty"` + + ActionMapScheduleGroups *Actionmapschedulegroups `json:"actionMapScheduleGroups,omitempty"` + + IgnoreFrequencyCap *bool `json:"ignoreFrequencyCap,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + + IsActive: u.IsActive, + + DisplayName: u.DisplayName, + + TriggerWithSegments: u.TriggerWithSegments, + + TriggerWithEventConditions: u.TriggerWithEventConditions, + + TriggerWithOutcomeProbabilityConditions: u.TriggerWithOutcomeProbabilityConditions, + + PageUrlConditions: u.PageUrlConditions, + + Activation: u.Activation, + + Weight: u.Weight, + + Action: u.Action, + + ActionMapScheduleGroups: u.ActionMapScheduleGroups, + + IgnoreFrequencyCap: u.IgnoreFrequencyCap, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + + StartDate: StartDate, + + EndDate: EndDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionmapaction.go b/platformclientv2/actionmapaction.go index 0edb45222..8b8ca8a49 100644 --- a/platformclientv2/actionmapaction.go +++ b/platformclientv2/actionmapaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Actionmapaction struct { } +func (u *Actionmapaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionmapaction + + + + return json.Marshal(&struct { + ActionTemplate *Actionmapactiontemplate `json:"actionTemplate,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ArchitectFlowFields *Architectflowfields `json:"architectFlowFields,omitempty"` + + WebMessagingOfferFields *Webmessagingofferfields `json:"webMessagingOfferFields,omitempty"` + *Alias + }{ + ActionTemplate: u.ActionTemplate, + + MediaType: u.MediaType, + + ArchitectFlowFields: u.ArchitectFlowFields, + + WebMessagingOfferFields: u.WebMessagingOfferFields, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionmapaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionmapactiontemplate.go b/platformclientv2/actionmapactiontemplate.go index a5bd4295e..be730e483 100644 --- a/platformclientv2/actionmapactiontemplate.go +++ b/platformclientv2/actionmapactiontemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Actionmapactiontemplate struct { } +func (u *Actionmapactiontemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionmapactiontemplate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionmapactiontemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionmaplisting.go b/platformclientv2/actionmaplisting.go index 5973d905d..b9377ba9f 100644 --- a/platformclientv2/actionmaplisting.go +++ b/platformclientv2/actionmaplisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Actionmaplisting struct { } +func (u *Actionmaplisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionmaplisting + + + + return json.Marshal(&struct { + Entities *[]Actionmap `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionmaplisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionmapschedulegroup.go b/platformclientv2/actionmapschedulegroup.go index 7845ca7fe..3b797ac2c 100644 --- a/platformclientv2/actionmapschedulegroup.go +++ b/platformclientv2/actionmapschedulegroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Actionmapschedulegroup struct { } +func (u *Actionmapschedulegroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionmapschedulegroup + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionmapschedulegroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionmapschedulegroups.go b/platformclientv2/actionmapschedulegroups.go index cbe33b9e7..734fc362d 100644 --- a/platformclientv2/actionmapschedulegroups.go +++ b/platformclientv2/actionmapschedulegroups.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Actionmapschedulegroups struct { } +func (u *Actionmapschedulegroups) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionmapschedulegroups + + + + return json.Marshal(&struct { + ActionMapScheduleGroup *Actionmapschedulegroup `json:"actionMapScheduleGroup,omitempty"` + + EmergencyActionMapScheduleGroup *Actionmapschedulegroup `json:"emergencyActionMapScheduleGroup,omitempty"` + *Alias + }{ + ActionMapScheduleGroup: u.ActionMapScheduleGroup, + + EmergencyActionMapScheduleGroup: u.EmergencyActionMapScheduleGroup, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionmapschedulegroups) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionoutput.go b/platformclientv2/actionoutput.go index cc499ba29..faf5eea11 100644 --- a/platformclientv2/actionoutput.go +++ b/platformclientv2/actionoutput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Actionoutput struct { } +func (u *Actionoutput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionoutput + + + + return json.Marshal(&struct { + SuccessSchema *Jsonschemadocument `json:"successSchema,omitempty"` + + SuccessSchemaUri *string `json:"successSchemaUri,omitempty"` + + ErrorSchema *Jsonschemadocument `json:"errorSchema,omitempty"` + + ErrorSchemaUri *string `json:"errorSchemaUri,omitempty"` + + SuccessSchemaFlattened *Jsonschemadocument `json:"successSchemaFlattened,omitempty"` + + ErrorSchemaFlattened *interface{} `json:"errorSchemaFlattened,omitempty"` + *Alias + }{ + SuccessSchema: u.SuccessSchema, + + SuccessSchemaUri: u.SuccessSchemaUri, + + ErrorSchema: u.ErrorSchema, + + ErrorSchemaUri: u.ErrorSchemaUri, + + SuccessSchemaFlattened: u.SuccessSchemaFlattened, + + ErrorSchemaFlattened: u.ErrorSchemaFlattened, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionoutput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionproperties.go b/platformclientv2/actionproperties.go index 469d66679..c192e6470 100644 --- a/platformclientv2/actionproperties.go +++ b/platformclientv2/actionproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Actionproperties struct { } +func (u *Actionproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionproperties + + + + return json.Marshal(&struct { + WebchatPrompt *string `json:"webchatPrompt,omitempty"` + + WebchatTitleText *string `json:"webchatTitleText,omitempty"` + + WebchatAcceptText *string `json:"webchatAcceptText,omitempty"` + + WebchatDeclineText *string `json:"webchatDeclineText,omitempty"` + + WebchatSurvey *Actionsurvey `json:"webchatSurvey,omitempty"` + *Alias + }{ + WebchatPrompt: u.WebchatPrompt, + + WebchatTitleText: u.WebchatTitleText, + + WebchatAcceptText: u.WebchatAcceptText, + + WebchatDeclineText: u.WebchatDeclineText, + + WebchatSurvey: u.WebchatSurvey, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actions.go b/platformclientv2/actions.go index 17926321c..45b981e41 100644 --- a/platformclientv2/actions.go +++ b/platformclientv2/actions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Actions struct { } +func (u *Actions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actions + + + + return json.Marshal(&struct { + SkillsToRemove *[]Skillstoremove `json:"skillsToRemove,omitempty"` + *Alias + }{ + SkillsToRemove: u.SkillsToRemove, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actionsurvey.go b/platformclientv2/actionsurvey.go index 19d50b55c..9d728749f 100644 --- a/platformclientv2/actionsurvey.go +++ b/platformclientv2/actionsurvey.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Actionsurvey struct { } +func (u *Actionsurvey) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actionsurvey + + + + return json.Marshal(&struct { + Questions *[]Journeysurveyquestion `json:"questions,omitempty"` + *Alias + }{ + Questions: u.Questions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actionsurvey) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actiontarget.go b/platformclientv2/actiontarget.go index 30d28a5ee..067fbb8c4 100644 --- a/platformclientv2/actiontarget.go +++ b/platformclientv2/actiontarget.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Actiontarget struct { } +func (u *Actiontarget) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actiontarget + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + UserData *[]Keyvalue `json:"userData,omitempty"` + + SupportedMediaTypes *[]string `json:"supportedMediaTypes,omitempty"` + + State *string `json:"state,omitempty"` + + Description *string `json:"description,omitempty"` + + ServiceLevel *Servicelevel `json:"serviceLevel,omitempty"` + + ShortAbandonThreshold *int `json:"shortAbandonThreshold,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + UserData: u.UserData, + + SupportedMediaTypes: u.SupportedMediaTypes, + + State: u.State, + + Description: u.Description, + + ServiceLevel: u.ServiceLevel, + + ShortAbandonThreshold: u.ShortAbandonThreshold, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actiontarget) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actiontargetlisting.go b/platformclientv2/actiontargetlisting.go index 34834abb2..a2b457088 100644 --- a/platformclientv2/actiontargetlisting.go +++ b/platformclientv2/actiontargetlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Actiontargetlisting struct { } +func (u *Actiontargetlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actiontargetlisting + + + + return json.Marshal(&struct { + Entities *[]Actiontarget `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actiontargetlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actiontemplate.go b/platformclientv2/actiontemplate.go index 9317b0513..8c85867d0 100644 --- a/platformclientv2/actiontemplate.go +++ b/platformclientv2/actiontemplate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Actiontemplate struct { } +func (u *Actiontemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actiontemplate + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + State *string `json:"state,omitempty"` + + ContentOffer *Contentoffer `json:"contentOffer,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + MediaType: u.MediaType, + + State: u.State, + + ContentOffer: u.ContentOffer, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actiontemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/actiontemplatelisting.go b/platformclientv2/actiontemplatelisting.go index b1f481366..9c2fcb517 100644 --- a/platformclientv2/actiontemplatelisting.go +++ b/platformclientv2/actiontemplatelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Actiontemplatelisting struct { } +func (u *Actiontemplatelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Actiontemplatelisting + + + + return json.Marshal(&struct { + Entities *[]Actiontemplate `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Actiontemplatelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/activation.go b/platformclientv2/activation.go index e5dcefa2b..cb7ea85f0 100644 --- a/platformclientv2/activation.go +++ b/platformclientv2/activation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Activation struct { } +func (u *Activation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Activation + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + DelayInSeconds *int `json:"delayInSeconds,omitempty"` + *Alias + }{ + VarType: u.VarType, + + DelayInSeconds: u.DelayInSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Activation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/activealertcount.go b/platformclientv2/activealertcount.go index f19aed63a..2f3db1556 100644 --- a/platformclientv2/activealertcount.go +++ b/platformclientv2/activealertcount.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Activealertcount struct { } +func (u *Activealertcount) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Activealertcount + + + + return json.Marshal(&struct { + Count *int `json:"count,omitempty"` + *Alias + }{ + Count: u.Count, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Activealertcount) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/activitycode.go b/platformclientv2/activitycode.go index 3057e0f6c..6f5d54414 100644 --- a/platformclientv2/activitycode.go +++ b/platformclientv2/activitycode.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Activitycode struct { } +func (u *Activitycode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Activitycode + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + Name *string `json:"name,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + IsDefault *bool `json:"isDefault,omitempty"` + + Category *string `json:"category,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + CountsAsWorkTime *bool `json:"countsAsWorkTime,omitempty"` + + AgentTimeOffSelectable *bool `json:"agentTimeOffSelectable,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + + Name: u.Name, + + IsActive: u.IsActive, + + IsDefault: u.IsDefault, + + Category: u.Category, + + LengthInMinutes: u.LengthInMinutes, + + CountsAsPaidTime: u.CountsAsPaidTime, + + CountsAsWorkTime: u.CountsAsWorkTime, + + AgentTimeOffSelectable: u.AgentTimeOffSelectable, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Activitycode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/activitycodecontainer.go b/platformclientv2/activitycodecontainer.go index c4b4bf5c5..21432bf98 100644 --- a/platformclientv2/activitycodecontainer.go +++ b/platformclientv2/activitycodecontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Activitycodecontainer struct { } +func (u *Activitycodecontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Activitycodecontainer + + + + return json.Marshal(&struct { + ActivityCodes *map[string]Activitycode `json:"activityCodes,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + ActivityCodes: u.ActivityCodes, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Activitycodecontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/acwsettings.go b/platformclientv2/acwsettings.go index 312de9d0c..c458da551 100644 --- a/platformclientv2/acwsettings.go +++ b/platformclientv2/acwsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Acwsettings struct { } +func (u *Acwsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Acwsettings + + + + return json.Marshal(&struct { + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + TimeoutMs *int `json:"timeoutMs,omitempty"` + *Alias + }{ + WrapupPrompt: u.WrapupPrompt, + + TimeoutMs: u.TimeoutMs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Acwsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/addconversationrequest.go b/platformclientv2/addconversationrequest.go index b5d45f01a..190ee4348 100644 --- a/platformclientv2/addconversationrequest.go +++ b/platformclientv2/addconversationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Addconversationrequest struct { } +func (u *Addconversationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Addconversationrequest + + + + return json.Marshal(&struct { + ConversationId *string `json:"conversationId,omitempty"` + *Alias + }{ + ConversationId: u.ConversationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Addconversationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/addconversationresponse.go b/platformclientv2/addconversationresponse.go index 8a77360f6..6e7bdd15a 100644 --- a/platformclientv2/addconversationresponse.go +++ b/platformclientv2/addconversationresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Addconversationresponse struct { } +func (u *Addconversationresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Addconversationresponse + + + + return json.Marshal(&struct { + Conversation *Conversationreference `json:"conversation,omitempty"` + + Appointment *Coachingappointmentreference `json:"appointment,omitempty"` + *Alias + }{ + Conversation: u.Conversation, + + Appointment: u.Appointment, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Addconversationresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/additionalmessage.go b/platformclientv2/additionalmessage.go index e86eb45f1..df76b8610 100644 --- a/platformclientv2/additionalmessage.go +++ b/platformclientv2/additionalmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Additionalmessage struct { } +func (u *Additionalmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Additionalmessage + + + + return json.Marshal(&struct { + TextBody *string `json:"textBody,omitempty"` + + MediaIds *[]string `json:"mediaIds,omitempty"` + + StickerIds *[]string `json:"stickerIds,omitempty"` + + MessagingTemplate *Messagingtemplaterequest `json:"messagingTemplate,omitempty"` + *Alias + }{ + TextBody: u.TextBody, + + MediaIds: u.MediaIds, + + StickerIds: u.StickerIds, + + MessagingTemplate: u.MessagingTemplate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Additionalmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/address.go b/platformclientv2/address.go index b19deb641..ea58347d7 100644 --- a/platformclientv2/address.go +++ b/platformclientv2/address.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Address struct { } +func (u *Address) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Address + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + NameRaw *string `json:"nameRaw,omitempty"` + + AddressNormalized *string `json:"addressNormalized,omitempty"` + + AddressRaw *string `json:"addressRaw,omitempty"` + + AddressDisplayable *string `json:"addressDisplayable,omitempty"` + *Alias + }{ + Name: u.Name, + + NameRaw: u.NameRaw, + + AddressNormalized: u.AddressNormalized, + + AddressRaw: u.AddressRaw, + + AddressDisplayable: u.AddressDisplayable, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Address) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/addressableentityref.go b/platformclientv2/addressableentityref.go index f7bc06bc2..6fac40b98 100644 --- a/platformclientv2/addressableentityref.go +++ b/platformclientv2/addressableentityref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Addressableentityref struct { } +func (u *Addressableentityref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Addressableentityref + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Addressableentityref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/addressablelicensedefinition.go b/platformclientv2/addressablelicensedefinition.go index 1a759bae6..977b6fb1f 100644 --- a/platformclientv2/addressablelicensedefinition.go +++ b/platformclientv2/addressablelicensedefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Addressablelicensedefinition struct { } +func (u *Addressablelicensedefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Addressablelicensedefinition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Addressablelicensedefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/addshifttraderequest.go b/platformclientv2/addshifttraderequest.go index b028d8bec..bc0f42bbb 100644 --- a/platformclientv2/addshifttraderequest.go +++ b/platformclientv2/addshifttraderequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Addshifttraderequest struct { } +func (u *Addshifttraderequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Addshifttraderequest + + + Expiration := new(string) + if u.Expiration != nil { + + *Expiration = timeutil.Strftime(u.Expiration, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Expiration = nil + } + + + return json.Marshal(&struct { + ScheduleId *string `json:"scheduleId,omitempty"` + + InitiatingShiftId *string `json:"initiatingShiftId,omitempty"` + + ReceivingUserId *string `json:"receivingUserId,omitempty"` + + Expiration *string `json:"expiration,omitempty"` + + AcceptableIntervals *[]string `json:"acceptableIntervals,omitempty"` + *Alias + }{ + ScheduleId: u.ScheduleId, + + InitiatingShiftId: u.InitiatingShiftId, + + ReceivingUserId: u.ReceivingUserId, + + Expiration: Expiration, + + AcceptableIntervals: u.AcceptableIntervals, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Addshifttraderequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/addworkplanrotationagentrequest.go b/platformclientv2/addworkplanrotationagentrequest.go index 4f43a322a..a49d567c0 100644 --- a/platformclientv2/addworkplanrotationagentrequest.go +++ b/platformclientv2/addworkplanrotationagentrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Addworkplanrotationagentrequest struct { } +func (u *Addworkplanrotationagentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Addworkplanrotationagentrequest + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + DateRange *Daterangewithoptionalend `json:"dateRange,omitempty"` + + Position *int `json:"position,omitempty"` + *Alias + }{ + UserId: u.UserId, + + DateRange: u.DateRange, + + Position: u.Position, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Addworkplanrotationagentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/addworkplanrotationrequest.go b/platformclientv2/addworkplanrotationrequest.go index 967b60e5a..1a4e96f14 100644 --- a/platformclientv2/addworkplanrotationrequest.go +++ b/platformclientv2/addworkplanrotationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Addworkplanrotationrequest struct { } +func (u *Addworkplanrotationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Addworkplanrotationrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + DateRange *Daterangewithoptionalend `json:"dateRange,omitempty"` + + Agents *[]Addworkplanrotationagentrequest `json:"agents,omitempty"` + + Pattern *Workplanpatternrequest `json:"pattern,omitempty"` + *Alias + }{ + Name: u.Name, + + DateRange: u.DateRange, + + Agents: u.Agents, + + Pattern: u.Pattern, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Addworkplanrotationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adfs.go b/platformclientv2/adfs.go index 3df925fb1..15f56a552 100644 --- a/platformclientv2/adfs.go +++ b/platformclientv2/adfs.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Adfs struct { } +func (u *Adfs) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adfs + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + RelyingPartyIdentifier *string `json:"relyingPartyIdentifier,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + RelyingPartyIdentifier: u.RelyingPartyIdentifier, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adfs) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adherencesettings.go b/platformclientv2/adherencesettings.go index fd69f03c6..37287dfd1 100644 --- a/platformclientv2/adherencesettings.go +++ b/platformclientv2/adherencesettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Adherencesettings struct { } +func (u *Adherencesettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adherencesettings + + + + return json.Marshal(&struct { + SevereAlertThresholdMinutes *int `json:"severeAlertThresholdMinutes,omitempty"` + + AdherenceTargetPercent *int `json:"adherenceTargetPercent,omitempty"` + + AdherenceExceptionThresholdSeconds *int `json:"adherenceExceptionThresholdSeconds,omitempty"` + + NonOnQueueActivitiesEquivalent *bool `json:"nonOnQueueActivitiesEquivalent,omitempty"` + + TrackOnQueueActivity *bool `json:"trackOnQueueActivity,omitempty"` + + IgnoredActivityCategories *Ignoredactivitycategories `json:"ignoredActivityCategories,omitempty"` + *Alias + }{ + SevereAlertThresholdMinutes: u.SevereAlertThresholdMinutes, + + AdherenceTargetPercent: u.AdherenceTargetPercent, + + AdherenceExceptionThresholdSeconds: u.AdherenceExceptionThresholdSeconds, + + NonOnQueueActivitiesEquivalent: u.NonOnQueueActivitiesEquivalent, + + TrackOnQueueActivity: u.TrackOnQueueActivity, + + IgnoredActivityCategories: u.IgnoredActivityCategories, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adherencesettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adhocrecordingtopicconversationdata.go b/platformclientv2/adhocrecordingtopicconversationdata.go index f015b562b..43d93e188 100644 --- a/platformclientv2/adhocrecordingtopicconversationdata.go +++ b/platformclientv2/adhocrecordingtopicconversationdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Adhocrecordingtopicconversationdata struct { } +func (u *Adhocrecordingtopicconversationdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adhocrecordingtopicconversationdata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adhocrecordingtopicconversationdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adhocrecordingtopiclockdata.go b/platformclientv2/adhocrecordingtopiclockdata.go index f89abb5d5..317b9d33a 100644 --- a/platformclientv2/adhocrecordingtopiclockdata.go +++ b/platformclientv2/adhocrecordingtopiclockdata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Adhocrecordingtopiclockdata struct { } +func (u *Adhocrecordingtopiclockdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adhocrecordingtopiclockdata + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateExpires := new(string) + if u.DateExpires != nil { + + *DateExpires = timeutil.Strftime(u.DateExpires, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpires = nil + } + + + return json.Marshal(&struct { + LockedBy *Adhocrecordingtopicuserdata `json:"lockedBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateExpires *string `json:"dateExpires,omitempty"` + *Alias + }{ + LockedBy: u.LockedBy, + + DateCreated: DateCreated, + + DateExpires: DateExpires, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adhocrecordingtopiclockdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adhocrecordingtopicrecordingdatav2.go b/platformclientv2/adhocrecordingtopicrecordingdatav2.go index 81508c8ac..d7f2d9af1 100644 --- a/platformclientv2/adhocrecordingtopicrecordingdatav2.go +++ b/platformclientv2/adhocrecordingtopicrecordingdatav2.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Adhocrecordingtopicrecordingdatav2 struct { } +func (u *Adhocrecordingtopicrecordingdatav2) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adhocrecordingtopicrecordingdatav2 + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateUploaded := new(string) + if u.DateUploaded != nil { + + *DateUploaded = timeutil.Strftime(u.DateUploaded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateUploaded = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Workspace *Adhocrecordingtopicworkspacedata `json:"workspace,omitempty"` + + CreatedBy *Adhocrecordingtopicuserdata `json:"createdBy,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + Filename *string `json:"filename,omitempty"` + + ChangeNumber *int `json:"changeNumber,omitempty"` + + DateUploaded *string `json:"dateUploaded,omitempty"` + + UploadedBy *Adhocrecordingtopicuserdata `json:"uploadedBy,omitempty"` + + LockInfo *Adhocrecordingtopiclockdata `json:"lockInfo,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + DurationMillieconds *int `json:"durationMillieconds,omitempty"` + + Conversation *Adhocrecordingtopicconversationdata `json:"conversation,omitempty"` + + Read *bool `json:"read,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Workspace: u.Workspace, + + CreatedBy: u.CreatedBy, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + Filename: u.Filename, + + ChangeNumber: u.ChangeNumber, + + DateUploaded: DateUploaded, + + UploadedBy: u.UploadedBy, + + LockInfo: u.LockInfo, + + SelfUri: u.SelfUri, + + DurationMillieconds: u.DurationMillieconds, + + Conversation: u.Conversation, + + Read: u.Read, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adhocrecordingtopicrecordingdatav2) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adhocrecordingtopicuserdata.go b/platformclientv2/adhocrecordingtopicuserdata.go index b1dadf405..23b7e2206 100644 --- a/platformclientv2/adhocrecordingtopicuserdata.go +++ b/platformclientv2/adhocrecordingtopicuserdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Adhocrecordingtopicuserdata struct { } +func (u *Adhocrecordingtopicuserdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adhocrecordingtopicuserdata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adhocrecordingtopicuserdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adhocrecordingtopicworkspacedata.go b/platformclientv2/adhocrecordingtopicworkspacedata.go index 34a77932e..4510e4440 100644 --- a/platformclientv2/adhocrecordingtopicworkspacedata.go +++ b/platformclientv2/adhocrecordingtopicworkspacedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Adhocrecordingtopicworkspacedata struct { } +func (u *Adhocrecordingtopicworkspacedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adhocrecordingtopicworkspacedata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adhocrecordingtopicworkspacedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/adjacents.go b/platformclientv2/adjacents.go index dfaaa27f7..b978079fa 100644 --- a/platformclientv2/adjacents.go +++ b/platformclientv2/adjacents.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Adjacents struct { } +func (u *Adjacents) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Adjacents + + + + return json.Marshal(&struct { + Superiors *[]User `json:"superiors,omitempty"` + + Siblings *[]User `json:"siblings,omitempty"` + + DirectReports *[]User `json:"directReports,omitempty"` + *Alias + }{ + Superiors: u.Superiors, + + Siblings: u.Siblings, + + DirectReports: u.DirectReports, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Adjacents) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/admintimeoffrequestpatch.go b/platformclientv2/admintimeoffrequestpatch.go index 92af6f0c7..f25540fb7 100644 --- a/platformclientv2/admintimeoffrequestpatch.go +++ b/platformclientv2/admintimeoffrequestpatch.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,46 @@ type Admintimeoffrequestpatch struct { } +func (u *Admintimeoffrequestpatch) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Admintimeoffrequestpatch + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Notes *string `json:"notes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + + PartialDayStartDateTimes *[]time.Time `json:"partialDayStartDateTimes,omitempty"` + + DailyDurationMinutes *int `json:"dailyDurationMinutes,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Status: u.Status, + + ActivityCodeId: u.ActivityCodeId, + + Notes: u.Notes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + DailyDurationMinutes: u.DailyDurationMinutes, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Admintimeoffrequestpatch) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/aftercallwork.go b/platformclientv2/aftercallwork.go index 26084e0b3..2e33671b6 100644 --- a/platformclientv2/aftercallwork.go +++ b/platformclientv2/aftercallwork.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Aftercallwork struct { } +func (u *Aftercallwork) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Aftercallwork + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + State *string `json:"state,omitempty"` + *Alias + }{ + StartTime: StartTime, + + EndTime: EndTime, + + State: u.State, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Aftercallwork) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agent.go b/platformclientv2/agent.go index 79f6f82e7..29ee9a957 100644 --- a/platformclientv2/agent.go +++ b/platformclientv2/agent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Agent struct { } +func (u *Agent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agent + + + + return json.Marshal(&struct { + Stage *string `json:"stage,omitempty"` + *Alias + }{ + Stage: u.Stage, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentactivity.go b/platformclientv2/agentactivity.go index 6f0b181d6..0ec239e1b 100644 --- a/platformclientv2/agentactivity.go +++ b/platformclientv2/agentactivity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Agentactivity struct { } +func (u *Agentactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentactivity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Agent *User `json:"agent,omitempty"` + + NumEvaluations *int `json:"numEvaluations,omitempty"` + + AverageEvaluationScore *int `json:"averageEvaluationScore,omitempty"` + + NumCriticalEvaluations *int `json:"numCriticalEvaluations,omitempty"` + + AverageCriticalScore *float32 `json:"averageCriticalScore,omitempty"` + + HighestEvaluationScore *float32 `json:"highestEvaluationScore,omitempty"` + + LowestEvaluationScore *float32 `json:"lowestEvaluationScore,omitempty"` + + HighestCriticalScore *float32 `json:"highestCriticalScore,omitempty"` + + LowestCriticalScore *float32 `json:"lowestCriticalScore,omitempty"` + + AgentEvaluatorActivityList *[]Agentevaluatoractivity `json:"agentEvaluatorActivityList,omitempty"` + + NumEvaluationsWithoutViewPermission *int `json:"numEvaluationsWithoutViewPermission,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Agent: u.Agent, + + NumEvaluations: u.NumEvaluations, + + AverageEvaluationScore: u.AverageEvaluationScore, + + NumCriticalEvaluations: u.NumCriticalEvaluations, + + AverageCriticalScore: u.AverageCriticalScore, + + HighestEvaluationScore: u.HighestEvaluationScore, + + LowestEvaluationScore: u.LowestEvaluationScore, + + HighestCriticalScore: u.HighestCriticalScore, + + LowestCriticalScore: u.LowestCriticalScore, + + AgentEvaluatorActivityList: u.AgentEvaluatorActivityList, + + NumEvaluationsWithoutViewPermission: u.NumEvaluationsWithoutViewPermission, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentactivitychangedtopicagentactivity.go b/platformclientv2/agentactivitychangedtopicagentactivity.go index f15be92a7..8b98c778f 100644 --- a/platformclientv2/agentactivitychangedtopicagentactivity.go +++ b/platformclientv2/agentactivitychangedtopicagentactivity.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Agentactivitychangedtopicagentactivity struct { } +func (u *Agentactivitychangedtopicagentactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentactivitychangedtopicagentactivity + + + DateActiveQueuesChanged := new(string) + if u.DateActiveQueuesChanged != nil { + + *DateActiveQueuesChanged = timeutil.Strftime(u.DateActiveQueuesChanged, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateActiveQueuesChanged = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + RoutingStatus *Agentactivitychangedtopicroutingstatus `json:"routingStatus,omitempty"` + + Presence *Agentactivitychangedtopicpresence `json:"presence,omitempty"` + + OutOfOffice *Agentactivitychangedtopicoutofoffice `json:"outOfOffice,omitempty"` + + ActiveQueueIds *[]string `json:"activeQueueIds,omitempty"` + + DateActiveQueuesChanged *string `json:"dateActiveQueuesChanged,omitempty"` + *Alias + }{ + Id: u.Id, + + RoutingStatus: u.RoutingStatus, + + Presence: u.Presence, + + OutOfOffice: u.OutOfOffice, + + ActiveQueueIds: u.ActiveQueueIds, + + DateActiveQueuesChanged: DateActiveQueuesChanged, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentactivitychangedtopicagentactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentactivitychangedtopicorganizationpresence.go b/platformclientv2/agentactivitychangedtopicorganizationpresence.go index c7b2a1e57..0cecc8154 100644 --- a/platformclientv2/agentactivitychangedtopicorganizationpresence.go +++ b/platformclientv2/agentactivitychangedtopicorganizationpresence.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Agentactivitychangedtopicorganizationpresence struct { } +func (u *Agentactivitychangedtopicorganizationpresence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentactivitychangedtopicorganizationpresence + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + *Alias + }{ + Id: u.Id, + + SystemPresence: u.SystemPresence, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentactivitychangedtopicorganizationpresence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentactivitychangedtopicoutofoffice.go b/platformclientv2/agentactivitychangedtopicoutofoffice.go index decd3bf30..ef60ce828 100644 --- a/platformclientv2/agentactivitychangedtopicoutofoffice.go +++ b/platformclientv2/agentactivitychangedtopicoutofoffice.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Agentactivitychangedtopicoutofoffice struct { } +func (u *Agentactivitychangedtopicoutofoffice) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentactivitychangedtopicoutofoffice + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Active *bool `json:"active,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Active: u.Active, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentactivitychangedtopicoutofoffice) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentactivitychangedtopicpresence.go b/platformclientv2/agentactivitychangedtopicpresence.go index 7025442e6..76a988cc9 100644 --- a/platformclientv2/agentactivitychangedtopicpresence.go +++ b/platformclientv2/agentactivitychangedtopicpresence.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Agentactivitychangedtopicpresence struct { } +func (u *Agentactivitychangedtopicpresence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentactivitychangedtopicpresence + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + PresenceDefinition *Agentactivitychangedtopicorganizationpresence `json:"presenceDefinition,omitempty"` + + PresenceMessage *string `json:"presenceMessage,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + PresenceDefinition: u.PresenceDefinition, + + PresenceMessage: u.PresenceMessage, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentactivitychangedtopicpresence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentactivitychangedtopicroutingstatus.go b/platformclientv2/agentactivitychangedtopicroutingstatus.go index 9497b95cc..906d0a045 100644 --- a/platformclientv2/agentactivitychangedtopicroutingstatus.go +++ b/platformclientv2/agentactivitychangedtopicroutingstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Agentactivitychangedtopicroutingstatus struct { } +func (u *Agentactivitychangedtopicroutingstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentactivitychangedtopicroutingstatus + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + *Alias + }{ + Status: u.Status, + + StartTime: StartTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentactivitychangedtopicroutingstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentactivityentitylisting.go b/platformclientv2/agentactivityentitylisting.go index 798cb831d..5bc8cc184 100644 --- a/platformclientv2/agentactivityentitylisting.go +++ b/platformclientv2/agentactivityentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Agentactivityentitylisting struct { } +func (u *Agentactivityentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentactivityentitylisting + + + + return json.Marshal(&struct { + Entities *[]Agentactivity `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentactivityentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentevaluatoractivity.go b/platformclientv2/agentevaluatoractivity.go index b85732720..11e7e2a20 100644 --- a/platformclientv2/agentevaluatoractivity.go +++ b/platformclientv2/agentevaluatoractivity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Agentevaluatoractivity struct { } +func (u *Agentevaluatoractivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentevaluatoractivity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Agent *User `json:"agent,omitempty"` + + Evaluator *User `json:"evaluator,omitempty"` + + NumEvaluations *int `json:"numEvaluations,omitempty"` + + AverageEvaluationScore *int `json:"averageEvaluationScore,omitempty"` + + NumEvaluationsWithoutViewPermission *int `json:"numEvaluationsWithoutViewPermission,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Agent: u.Agent, + + Evaluator: u.Evaluator, + + NumEvaluations: u.NumEvaluations, + + AverageEvaluationScore: u.AverageEvaluationScore, + + NumEvaluationsWithoutViewPermission: u.NumEvaluationsWithoutViewPermission, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentevaluatoractivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentmanagementunitreference.go b/platformclientv2/agentmanagementunitreference.go index 48718436a..c08ac5e03 100644 --- a/platformclientv2/agentmanagementunitreference.go +++ b/platformclientv2/agentmanagementunitreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Agentmanagementunitreference struct { } +func (u *Agentmanagementunitreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentmanagementunitreference + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + ManagementUnit *Managementunitreference `json:"managementUnit,omitempty"` + + BusinessUnit *Businessunitreference `json:"businessUnit,omitempty"` + *Alias + }{ + User: u.User, + + ManagementUnit: u.ManagementUnit, + + BusinessUnit: u.BusinessUnit, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentmanagementunitreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentmaxutilization.go b/platformclientv2/agentmaxutilization.go index 81a7d5380..bbb1c56ab 100644 --- a/platformclientv2/agentmaxutilization.go +++ b/platformclientv2/agentmaxutilization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Agentmaxutilization struct { } +func (u *Agentmaxutilization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentmaxutilization + + + + return json.Marshal(&struct { + Utilization *map[string]Mediautilization `json:"utilization,omitempty"` + + Level *string `json:"level,omitempty"` + *Alias + }{ + Utilization: u.Utilization, + + Level: u.Level, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentmaxutilization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentownedmappingpreview.go b/platformclientv2/agentownedmappingpreview.go index 466332319..6ee6a5348 100644 --- a/platformclientv2/agentownedmappingpreview.go +++ b/platformclientv2/agentownedmappingpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Agentownedmappingpreview struct { } +func (u *Agentownedmappingpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentownedmappingpreview + + + + return json.Marshal(&struct { + AgentOwnedColumn *string `json:"agentOwnedColumn,omitempty"` + + Email *string `json:"email,omitempty"` + + UserId *string `json:"userId,omitempty"` + + Exists *bool `json:"exists,omitempty"` + + IsQueueMember *bool `json:"isQueueMember,omitempty"` + + RecordCount *int `json:"recordCount,omitempty"` + *Alias + }{ + AgentOwnedColumn: u.AgentOwnedColumn, + + Email: u.Email, + + UserId: u.UserId, + + Exists: u.Exists, + + IsQueueMember: u.IsQueueMember, + + RecordCount: u.RecordCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentownedmappingpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentownedmappingpreviewlisting.go b/platformclientv2/agentownedmappingpreviewlisting.go index fde669e6d..cf6afed4b 100644 --- a/platformclientv2/agentownedmappingpreviewlisting.go +++ b/platformclientv2/agentownedmappingpreviewlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Agentownedmappingpreviewlisting struct { } +func (u *Agentownedmappingpreviewlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentownedmappingpreviewlisting + + + + return json.Marshal(&struct { + Entities *[]Agentownedmappingpreview `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentownedmappingpreviewlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agentownedrouting.go b/platformclientv2/agentownedrouting.go index a1045887d..6fdfc93fb 100644 --- a/platformclientv2/agentownedrouting.go +++ b/platformclientv2/agentownedrouting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Agentownedrouting struct { } +func (u *Agentownedrouting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agentownedrouting + + + + return json.Marshal(&struct { + EnableAgentOwnedCallbacks *bool `json:"enableAgentOwnedCallbacks,omitempty"` + + MaxOwnedCallbackHours *int `json:"maxOwnedCallbackHours,omitempty"` + + MaxOwnedCallbackDelayHours *int `json:"maxOwnedCallbackDelayHours,omitempty"` + *Alias + }{ + EnableAgentOwnedCallbacks: u.EnableAgentOwnedCallbacks, + + MaxOwnedCallbackHours: u.MaxOwnedCallbackHours, + + MaxOwnedCallbackDelayHours: u.MaxOwnedCallbackDelayHours, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agentownedrouting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/agenttimeoffrequestpatch.go b/platformclientv2/agenttimeoffrequestpatch.go index 69b9df721..9ab606f85 100644 --- a/platformclientv2/agenttimeoffrequestpatch.go +++ b/platformclientv2/agenttimeoffrequestpatch.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Agenttimeoffrequestpatch struct { } +func (u *Agenttimeoffrequestpatch) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Agenttimeoffrequestpatch + + + + return json.Marshal(&struct { + MarkedAsRead *bool `json:"markedAsRead,omitempty"` + + Status *string `json:"status,omitempty"` + + Notes *string `json:"notes,omitempty"` + *Alias + }{ + MarkedAsRead: u.MarkedAsRead, + + Status: u.Status, + + Notes: u.Notes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Agenttimeoffrequestpatch) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/aggregatemetricdata.go b/platformclientv2/aggregatemetricdata.go index 691db58c1..3687ed3d7 100644 --- a/platformclientv2/aggregatemetricdata.go +++ b/platformclientv2/aggregatemetricdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Aggregatemetricdata struct { } +func (u *Aggregatemetricdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Aggregatemetricdata + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *Statisticalsummary `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Aggregatemetricdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/aggregateviewdata.go b/platformclientv2/aggregateviewdata.go index 72af58c0e..e59c74730 100644 --- a/platformclientv2/aggregateviewdata.go +++ b/platformclientv2/aggregateviewdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Aggregateviewdata struct { } +func (u *Aggregateviewdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Aggregateviewdata + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Stats *Statisticalsummary `json:"stats,omitempty"` + *Alias + }{ + Name: u.Name, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Aggregateviewdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/aggregationrange.go b/platformclientv2/aggregationrange.go index 8e2d825e4..df1f8f33f 100644 --- a/platformclientv2/aggregationrange.go +++ b/platformclientv2/aggregationrange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Aggregationrange struct { } +func (u *Aggregationrange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Aggregationrange + + + + return json.Marshal(&struct { + Gte *float32 `json:"gte,omitempty"` + + Lt *float32 `json:"lt,omitempty"` + *Alias + }{ + Gte: u.Gte, + + Lt: u.Lt, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Aggregationrange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/aggregationresult.go b/platformclientv2/aggregationresult.go index 84137d1ba..49641069a 100644 --- a/platformclientv2/aggregationresult.go +++ b/platformclientv2/aggregationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Aggregationresult struct { } +func (u *Aggregationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Aggregationresult + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Metric *string `json:"metric,omitempty"` + + Count *int `json:"count,omitempty"` + + Results *[]Aggregationresultentry `json:"results,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Metric: u.Metric, + + Count: u.Count, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Aggregationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/aggregationresultentry.go b/platformclientv2/aggregationresultentry.go index b75bf7a8c..2a512179f 100644 --- a/platformclientv2/aggregationresultentry.go +++ b/platformclientv2/aggregationresultentry.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Aggregationresultentry struct { } +func (u *Aggregationresultentry) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Aggregationresultentry + + + + return json.Marshal(&struct { + Count *int `json:"count,omitempty"` + + Value *string `json:"value,omitempty"` + + Gte *float32 `json:"gte,omitempty"` + + Lt *float32 `json:"lt,omitempty"` + *Alias + }{ + Count: u.Count, + + Value: u.Value, + + Gte: u.Gte, + + Lt: u.Lt, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Aggregationresultentry) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/alltimepoints.go b/platformclientv2/alltimepoints.go index 2b19d6641..08ca95130 100644 --- a/platformclientv2/alltimepoints.go +++ b/platformclientv2/alltimepoints.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,37 @@ type Alltimepoints struct { } +func (u *Alltimepoints) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Alltimepoints + + + DateEndWorkday := new(string) + if u.DateEndWorkday != nil { + *DateEndWorkday = timeutil.Strftime(u.DateEndWorkday, "%Y-%m-%d") + } else { + DateEndWorkday = nil + } + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + DateEndWorkday *string `json:"dateEndWorkday,omitempty"` + + AllTimePoints *int `json:"allTimePoints,omitempty"` + *Alias + }{ + User: u.User, + + DateEndWorkday: DateEndWorkday, + + AllTimePoints: u.AllTimePoints, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Alltimepoints) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/amazonlexrequest.go b/platformclientv2/amazonlexrequest.go index 9bc4e2eed..d7378807d 100644 --- a/platformclientv2/amazonlexrequest.go +++ b/platformclientv2/amazonlexrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Amazonlexrequest struct { } +func (u *Amazonlexrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Amazonlexrequest + + + + return json.Marshal(&struct { + RequestAttributes *map[string]string `json:"requestAttributes,omitempty"` + + SessionAttributes *map[string]string `json:"sessionAttributes,omitempty"` + *Alias + }{ + RequestAttributes: u.RequestAttributes, + + SessionAttributes: u.SessionAttributes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Amazonlexrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsconversation.go b/platformclientv2/analyticsconversation.go index 11d9d549c..3da6d5aeb 100644 --- a/platformclientv2/analyticsconversation.go +++ b/platformclientv2/analyticsconversation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Analyticsconversation struct { } +func (u *Analyticsconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsconversation + + + ConversationEnd := new(string) + if u.ConversationEnd != nil { + + *ConversationEnd = timeutil.Strftime(u.ConversationEnd, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConversationEnd = nil + } + + ConversationStart := new(string) + if u.ConversationStart != nil { + + *ConversationStart = timeutil.Strftime(u.ConversationStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConversationStart = nil + } + + + return json.Marshal(&struct { + ConversationEnd *string `json:"conversationEnd,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + ConversationStart *string `json:"conversationStart,omitempty"` + + DivisionIds *[]string `json:"divisionIds,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + + MediaStatsMinConversationMos *float64 `json:"mediaStatsMinConversationMos,omitempty"` + + MediaStatsMinConversationRFactor *float64 `json:"mediaStatsMinConversationRFactor,omitempty"` + + OriginatingDirection *string `json:"originatingDirection,omitempty"` + + Evaluations *[]Analyticsevaluation `json:"evaluations,omitempty"` + + Surveys *[]Analyticssurvey `json:"surveys,omitempty"` + + Resolutions *[]Analyticsresolution `json:"resolutions,omitempty"` + + Participants *[]Analyticsparticipant `json:"participants,omitempty"` + *Alias + }{ + ConversationEnd: ConversationEnd, + + ConversationId: u.ConversationId, + + ConversationStart: ConversationStart, + + DivisionIds: u.DivisionIds, + + ExternalTag: u.ExternalTag, + + MediaStatsMinConversationMos: u.MediaStatsMinConversationMos, + + MediaStatsMinConversationRFactor: u.MediaStatsMinConversationRFactor, + + OriginatingDirection: u.OriginatingDirection, + + Evaluations: u.Evaluations, + + Surveys: u.Surveys, + + Resolutions: u.Resolutions, + + Participants: u.Participants, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsconversationasyncqueryresponse.go b/platformclientv2/analyticsconversationasyncqueryresponse.go index dd6cdfe50..a2c267cda 100644 --- a/platformclientv2/analyticsconversationasyncqueryresponse.go +++ b/platformclientv2/analyticsconversationasyncqueryresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Analyticsconversationasyncqueryresponse struct { } +func (u *Analyticsconversationasyncqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsconversationasyncqueryresponse + + + DataAvailabilityDate := new(string) + if u.DataAvailabilityDate != nil { + + *DataAvailabilityDate = timeutil.Strftime(u.DataAvailabilityDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DataAvailabilityDate = nil + } + + + return json.Marshal(&struct { + Cursor *string `json:"cursor,omitempty"` + + DataAvailabilityDate *string `json:"dataAvailabilityDate,omitempty"` + + Conversations *[]Analyticsconversation `json:"conversations,omitempty"` + *Alias + }{ + Cursor: u.Cursor, + + DataAvailabilityDate: DataAvailabilityDate, + + Conversations: u.Conversations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsconversationasyncqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsconversationqueryresponse.go b/platformclientv2/analyticsconversationqueryresponse.go index 3ccc622f3..04a1a7d5a 100644 --- a/platformclientv2/analyticsconversationqueryresponse.go +++ b/platformclientv2/analyticsconversationqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Analyticsconversationqueryresponse struct { } +func (u *Analyticsconversationqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsconversationqueryresponse + + + + return json.Marshal(&struct { + Aggregations *[]Aggregationresult `json:"aggregations,omitempty"` + + Conversations *[]Analyticsconversationwithoutattributes `json:"conversations,omitempty"` + + TotalHits *int `json:"totalHits,omitempty"` + *Alias + }{ + Aggregations: u.Aggregations, + + Conversations: u.Conversations, + + TotalHits: u.TotalHits, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsconversationqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsconversationsegment.go b/platformclientv2/analyticsconversationsegment.go index b8a002a97..da9f08ce8 100644 --- a/platformclientv2/analyticsconversationsegment.go +++ b/platformclientv2/analyticsconversationsegment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -109,6 +110,134 @@ type Analyticsconversationsegment struct { } +func (u *Analyticsconversationsegment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsconversationsegment + + + SegmentEnd := new(string) + if u.SegmentEnd != nil { + + *SegmentEnd = timeutil.Strftime(u.SegmentEnd, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SegmentEnd = nil + } + + SegmentStart := new(string) + if u.SegmentStart != nil { + + *SegmentStart = timeutil.Strftime(u.SegmentStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SegmentStart = nil + } + + + return json.Marshal(&struct { + AudioMuted *bool `json:"audioMuted,omitempty"` + + Conference *bool `json:"conference,omitempty"` + + DestinationConversationId *string `json:"destinationConversationId,omitempty"` + + DestinationSessionId *string `json:"destinationSessionId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + + Q850ResponseCodes *[]int `json:"q850ResponseCodes,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + RequestedLanguageId *string `json:"requestedLanguageId,omitempty"` + + RequestedRoutingSkillIds *[]string `json:"requestedRoutingSkillIds,omitempty"` + + RequestedRoutingUserIds *[]string `json:"requestedRoutingUserIds,omitempty"` + + SegmentEnd *string `json:"segmentEnd,omitempty"` + + SegmentStart *string `json:"segmentStart,omitempty"` + + SegmentType *string `json:"segmentType,omitempty"` + + SipResponseCodes *[]int `json:"sipResponseCodes,omitempty"` + + SourceConversationId *string `json:"sourceConversationId,omitempty"` + + SourceSessionId *string `json:"sourceSessionId,omitempty"` + + Subject *string `json:"subject,omitempty"` + + VideoMuted *bool `json:"videoMuted,omitempty"` + + WrapUpCode *string `json:"wrapUpCode,omitempty"` + + WrapUpNote *string `json:"wrapUpNote,omitempty"` + + WrapUpTags *[]string `json:"wrapUpTags,omitempty"` + + ScoredAgents *[]Analyticsscoredagent `json:"scoredAgents,omitempty"` + + Properties *[]Analyticsproperty `json:"properties,omitempty"` + *Alias + }{ + AudioMuted: u.AudioMuted, + + Conference: u.Conference, + + DestinationConversationId: u.DestinationConversationId, + + DestinationSessionId: u.DestinationSessionId, + + DisconnectType: u.DisconnectType, + + ErrorCode: u.ErrorCode, + + GroupId: u.GroupId, + + Q850ResponseCodes: u.Q850ResponseCodes, + + QueueId: u.QueueId, + + RequestedLanguageId: u.RequestedLanguageId, + + RequestedRoutingSkillIds: u.RequestedRoutingSkillIds, + + RequestedRoutingUserIds: u.RequestedRoutingUserIds, + + SegmentEnd: SegmentEnd, + + SegmentStart: SegmentStart, + + SegmentType: u.SegmentType, + + SipResponseCodes: u.SipResponseCodes, + + SourceConversationId: u.SourceConversationId, + + SourceSessionId: u.SourceSessionId, + + Subject: u.Subject, + + VideoMuted: u.VideoMuted, + + WrapUpCode: u.WrapUpCode, + + WrapUpNote: u.WrapUpNote, + + WrapUpTags: u.WrapUpTags, + + ScoredAgents: u.ScoredAgents, + + Properties: u.Properties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsconversationsegment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsconversationwithoutattributes.go b/platformclientv2/analyticsconversationwithoutattributes.go index d6b2a615e..8a0667685 100644 --- a/platformclientv2/analyticsconversationwithoutattributes.go +++ b/platformclientv2/analyticsconversationwithoutattributes.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Analyticsconversationwithoutattributes struct { } +func (u *Analyticsconversationwithoutattributes) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsconversationwithoutattributes + + + ConversationEnd := new(string) + if u.ConversationEnd != nil { + + *ConversationEnd = timeutil.Strftime(u.ConversationEnd, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConversationEnd = nil + } + + ConversationStart := new(string) + if u.ConversationStart != nil { + + *ConversationStart = timeutil.Strftime(u.ConversationStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConversationStart = nil + } + + + return json.Marshal(&struct { + ConversationEnd *string `json:"conversationEnd,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + ConversationStart *string `json:"conversationStart,omitempty"` + + DivisionIds *[]string `json:"divisionIds,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + + MediaStatsMinConversationMos *float64 `json:"mediaStatsMinConversationMos,omitempty"` + + MediaStatsMinConversationRFactor *float64 `json:"mediaStatsMinConversationRFactor,omitempty"` + + OriginatingDirection *string `json:"originatingDirection,omitempty"` + + Evaluations *[]Analyticsevaluation `json:"evaluations,omitempty"` + + Surveys *[]Analyticssurvey `json:"surveys,omitempty"` + + Resolutions *[]Analyticsresolution `json:"resolutions,omitempty"` + + Participants *[]Analyticsparticipantwithoutattributes `json:"participants,omitempty"` + *Alias + }{ + ConversationEnd: ConversationEnd, + + ConversationId: u.ConversationId, + + ConversationStart: ConversationStart, + + DivisionIds: u.DivisionIds, + + ExternalTag: u.ExternalTag, + + MediaStatsMinConversationMos: u.MediaStatsMinConversationMos, + + MediaStatsMinConversationRFactor: u.MediaStatsMinConversationRFactor, + + OriginatingDirection: u.OriginatingDirection, + + Evaluations: u.Evaluations, + + Surveys: u.Surveys, + + Resolutions: u.Resolutions, + + Participants: u.Participants, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsconversationwithoutattributes) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsconversationwithoutattributesmultigetresponse.go b/platformclientv2/analyticsconversationwithoutattributesmultigetresponse.go index 0a35eb097..5099d537b 100644 --- a/platformclientv2/analyticsconversationwithoutattributesmultigetresponse.go +++ b/platformclientv2/analyticsconversationwithoutattributesmultigetresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Analyticsconversationwithoutattributesmultigetresponse struct { } +func (u *Analyticsconversationwithoutattributesmultigetresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsconversationwithoutattributesmultigetresponse + + + + return json.Marshal(&struct { + Conversations *[]Analyticsconversationwithoutattributes `json:"conversations,omitempty"` + *Alias + }{ + Conversations: u.Conversations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsconversationwithoutattributesmultigetresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsevaluation.go b/platformclientv2/analyticsevaluation.go index b26f14371..8a47bc43f 100644 --- a/platformclientv2/analyticsevaluation.go +++ b/platformclientv2/analyticsevaluation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Analyticsevaluation struct { } +func (u *Analyticsevaluation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsevaluation + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + + return json.Marshal(&struct { + CalibrationId *string `json:"calibrationId,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Deleted *bool `json:"deleted,omitempty"` + + EvaluationId *string `json:"evaluationId,omitempty"` + + EvaluatorId *string `json:"evaluatorId,omitempty"` + + EventTime *string `json:"eventTime,omitempty"` + + FormId *string `json:"formId,omitempty"` + + FormName *string `json:"formName,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + Rescored *bool `json:"rescored,omitempty"` + + UserId *string `json:"userId,omitempty"` + + OTotalCriticalScore *int `json:"oTotalCriticalScore,omitempty"` + + OTotalScore *int `json:"oTotalScore,omitempty"` + *Alias + }{ + CalibrationId: u.CalibrationId, + + ContextId: u.ContextId, + + Deleted: u.Deleted, + + EvaluationId: u.EvaluationId, + + EvaluatorId: u.EvaluatorId, + + EventTime: EventTime, + + FormId: u.FormId, + + FormName: u.FormName, + + QueueId: u.QueueId, + + Rescored: u.Rescored, + + UserId: u.UserId, + + OTotalCriticalScore: u.OTotalCriticalScore, + + OTotalScore: u.OTotalScore, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsevaluation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsflow.go b/platformclientv2/analyticsflow.go index 2ae8d1ac7..a9251edd4 100644 --- a/platformclientv2/analyticsflow.go +++ b/platformclientv2/analyticsflow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -68,6 +69,78 @@ type Analyticsflow struct { } +func (u *Analyticsflow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsflow + + + + return json.Marshal(&struct { + EndingLanguage *string `json:"endingLanguage,omitempty"` + + EntryReason *string `json:"entryReason,omitempty"` + + EntryType *string `json:"entryType,omitempty"` + + ExitReason *string `json:"exitReason,omitempty"` + + FlowId *string `json:"flowId,omitempty"` + + FlowName *string `json:"flowName,omitempty"` + + FlowType *string `json:"flowType,omitempty"` + + FlowVersion *string `json:"flowVersion,omitempty"` + + IssuedCallback *bool `json:"issuedCallback,omitempty"` + + RecognitionFailureReason *string `json:"recognitionFailureReason,omitempty"` + + StartingLanguage *string `json:"startingLanguage,omitempty"` + + TransferTargetAddress *string `json:"transferTargetAddress,omitempty"` + + TransferTargetName *string `json:"transferTargetName,omitempty"` + + TransferType *string `json:"transferType,omitempty"` + + Outcomes *[]Analyticsflowoutcome `json:"outcomes,omitempty"` + *Alias + }{ + EndingLanguage: u.EndingLanguage, + + EntryReason: u.EntryReason, + + EntryType: u.EntryType, + + ExitReason: u.ExitReason, + + FlowId: u.FlowId, + + FlowName: u.FlowName, + + FlowType: u.FlowType, + + FlowVersion: u.FlowVersion, + + IssuedCallback: u.IssuedCallback, + + RecognitionFailureReason: u.RecognitionFailureReason, + + StartingLanguage: u.StartingLanguage, + + TransferTargetAddress: u.TransferTargetAddress, + + TransferTargetName: u.TransferTargetName, + + TransferType: u.TransferType, + + Outcomes: u.Outcomes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsflow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsflowoutcome.go b/platformclientv2/analyticsflowoutcome.go index 5fb182d4e..c2a6a9f5b 100644 --- a/platformclientv2/analyticsflowoutcome.go +++ b/platformclientv2/analyticsflowoutcome.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Analyticsflowoutcome struct { } +func (u *Analyticsflowoutcome) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsflowoutcome + + + FlowOutcomeEndTimestamp := new(string) + if u.FlowOutcomeEndTimestamp != nil { + + *FlowOutcomeEndTimestamp = timeutil.Strftime(u.FlowOutcomeEndTimestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + FlowOutcomeEndTimestamp = nil + } + + FlowOutcomeStartTimestamp := new(string) + if u.FlowOutcomeStartTimestamp != nil { + + *FlowOutcomeStartTimestamp = timeutil.Strftime(u.FlowOutcomeStartTimestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + FlowOutcomeStartTimestamp = nil + } + + + return json.Marshal(&struct { + FlowOutcome *string `json:"flowOutcome,omitempty"` + + FlowOutcomeEndTimestamp *string `json:"flowOutcomeEndTimestamp,omitempty"` + + FlowOutcomeId *string `json:"flowOutcomeId,omitempty"` + + FlowOutcomeStartTimestamp *string `json:"flowOutcomeStartTimestamp,omitempty"` + + FlowOutcomeValue *string `json:"flowOutcomeValue,omitempty"` + *Alias + }{ + FlowOutcome: u.FlowOutcome, + + FlowOutcomeEndTimestamp: FlowOutcomeEndTimestamp, + + FlowOutcomeId: u.FlowOutcomeId, + + FlowOutcomeStartTimestamp: FlowOutcomeStartTimestamp, + + FlowOutcomeValue: u.FlowOutcomeValue, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsflowoutcome) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsmediaendpointstat.go b/platformclientv2/analyticsmediaendpointstat.go index 70a5860e3..0aecee3f1 100644 --- a/platformclientv2/analyticsmediaendpointstat.go +++ b/platformclientv2/analyticsmediaendpointstat.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Analyticsmediaendpointstat struct { } +func (u *Analyticsmediaendpointstat) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsmediaendpointstat + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + + return json.Marshal(&struct { + Codecs *[]string `json:"codecs,omitempty"` + + DiscardedPackets *int `json:"discardedPackets,omitempty"` + + DuplicatePackets *int `json:"duplicatePackets,omitempty"` + + EventTime *string `json:"eventTime,omitempty"` + + InvalidPackets *int `json:"invalidPackets,omitempty"` + + MaxLatencyMs *int `json:"maxLatencyMs,omitempty"` + + MinMos *float64 `json:"minMos,omitempty"` + + MinRFactor *float64 `json:"minRFactor,omitempty"` + + OverrunPackets *int `json:"overrunPackets,omitempty"` + + ReceivedPackets *int `json:"receivedPackets,omitempty"` + + UnderrunPackets *int `json:"underrunPackets,omitempty"` + *Alias + }{ + Codecs: u.Codecs, + + DiscardedPackets: u.DiscardedPackets, + + DuplicatePackets: u.DuplicatePackets, + + EventTime: EventTime, + + InvalidPackets: u.InvalidPackets, + + MaxLatencyMs: u.MaxLatencyMs, + + MinMos: u.MinMos, + + MinRFactor: u.MinRFactor, + + OverrunPackets: u.OverrunPackets, + + ReceivedPackets: u.ReceivedPackets, + + UnderrunPackets: u.UnderrunPackets, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsmediaendpointstat) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsparticipant.go b/platformclientv2/analyticsparticipant.go index bc461a94b..2965f7398 100644 --- a/platformclientv2/analyticsparticipant.go +++ b/platformclientv2/analyticsparticipant.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Analyticsparticipant struct { } +func (u *Analyticsparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsparticipant + + + + return json.Marshal(&struct { + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + ParticipantId *string `json:"participantId,omitempty"` + + ParticipantName *string `json:"participantName,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + UserId *string `json:"userId,omitempty"` + + Sessions *[]Analyticssession `json:"sessions,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + *Alias + }{ + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + FlaggedReason: u.FlaggedReason, + + ParticipantId: u.ParticipantId, + + ParticipantName: u.ParticipantName, + + Purpose: u.Purpose, + + TeamId: u.TeamId, + + UserId: u.UserId, + + Sessions: u.Sessions, + + Attributes: u.Attributes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsparticipantwithoutattributes.go b/platformclientv2/analyticsparticipantwithoutattributes.go index 7991948b4..e41b4e517 100644 --- a/platformclientv2/analyticsparticipantwithoutattributes.go +++ b/platformclientv2/analyticsparticipantwithoutattributes.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Analyticsparticipantwithoutattributes struct { } +func (u *Analyticsparticipantwithoutattributes) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsparticipantwithoutattributes + + + + return json.Marshal(&struct { + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + ParticipantId *string `json:"participantId,omitempty"` + + ParticipantName *string `json:"participantName,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + UserId *string `json:"userId,omitempty"` + + Sessions *[]Analyticssession `json:"sessions,omitempty"` + *Alias + }{ + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + FlaggedReason: u.FlaggedReason, + + ParticipantId: u.ParticipantId, + + ParticipantName: u.ParticipantName, + + Purpose: u.Purpose, + + TeamId: u.TeamId, + + UserId: u.UserId, + + Sessions: u.Sessions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsparticipantwithoutattributes) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsproperty.go b/platformclientv2/analyticsproperty.go index 9d1d81db6..19739f0fb 100644 --- a/platformclientv2/analyticsproperty.go +++ b/platformclientv2/analyticsproperty.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Analyticsproperty struct { } +func (u *Analyticsproperty) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsproperty + + + + return json.Marshal(&struct { + Property *string `json:"property,omitempty"` + + PropertyType *string `json:"propertyType,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Property: u.Property, + + PropertyType: u.PropertyType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsproperty) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsproposedagent.go b/platformclientv2/analyticsproposedagent.go index 169a2cc2d..23dae5e65 100644 --- a/platformclientv2/analyticsproposedagent.go +++ b/platformclientv2/analyticsproposedagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Analyticsproposedagent struct { } +func (u *Analyticsproposedagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsproposedagent + + + + return json.Marshal(&struct { + AgentRank *int `json:"agentRank,omitempty"` + + ProposedAgentId *string `json:"proposedAgentId,omitempty"` + *Alias + }{ + AgentRank: u.AgentRank, + + ProposedAgentId: u.ProposedAgentId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsproposedagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsqueryaggregation.go b/platformclientv2/analyticsqueryaggregation.go index ba0c71ad7..6b7e248b3 100644 --- a/platformclientv2/analyticsqueryaggregation.go +++ b/platformclientv2/analyticsqueryaggregation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Analyticsqueryaggregation struct { } +func (u *Analyticsqueryaggregation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsqueryaggregation + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Metric *string `json:"metric,omitempty"` + + Size *int `json:"size,omitempty"` + + Ranges *[]Aggregationrange `json:"ranges,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Metric: u.Metric, + + Size: u.Size, + + Ranges: u.Ranges, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsqueryaggregation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsresolution.go b/platformclientv2/analyticsresolution.go index def0e2385..7290cdba7 100644 --- a/platformclientv2/analyticsresolution.go +++ b/platformclientv2/analyticsresolution.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Analyticsresolution struct { } +func (u *Analyticsresolution) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsresolution + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + + return json.Marshal(&struct { + EventTime *string `json:"eventTime,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + UserId *string `json:"userId,omitempty"` + + NNextContactAvoided *int `json:"nNextContactAvoided,omitempty"` + *Alias + }{ + EventTime: EventTime, + + QueueId: u.QueueId, + + UserId: u.UserId, + + NNextContactAvoided: u.NNextContactAvoided, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsresolution) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsroutingstatusrecord.go b/platformclientv2/analyticsroutingstatusrecord.go index bf3a858ed..7e3eb0d5c 100644 --- a/platformclientv2/analyticsroutingstatusrecord.go +++ b/platformclientv2/analyticsroutingstatusrecord.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Analyticsroutingstatusrecord struct { } +func (u *Analyticsroutingstatusrecord) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsroutingstatusrecord + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + RoutingStatus *string `json:"routingStatus,omitempty"` + *Alias + }{ + StartTime: StartTime, + + EndTime: EndTime, + + RoutingStatus: u.RoutingStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsroutingstatusrecord) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsscoredagent.go b/platformclientv2/analyticsscoredagent.go index 8c732bcfe..b3c9e7877 100644 --- a/platformclientv2/analyticsscoredagent.go +++ b/platformclientv2/analyticsscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Analyticsscoredagent struct { } +func (u *Analyticsscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsscoredagent + + + + return json.Marshal(&struct { + AgentScore *int `json:"agentScore,omitempty"` + + ScoredAgentId *string `json:"scoredAgentId,omitempty"` + *Alias + }{ + AgentScore: u.AgentScore, + + ScoredAgentId: u.ScoredAgentId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticssession.go b/platformclientv2/analyticssession.go index efb2a3085..b06995c29 100644 --- a/platformclientv2/analyticssession.go +++ b/platformclientv2/analyticssession.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -293,6 +294,318 @@ type Analyticssession struct { } +func (u *Analyticssession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticssession + + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + DeliveryStatusChangeDate := new(string) + if u.DeliveryStatusChangeDate != nil { + + *DeliveryStatusChangeDate = timeutil.Strftime(u.DeliveryStatusChangeDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DeliveryStatusChangeDate = nil + } + + + return json.Marshal(&struct { + ActiveSkillIds *[]string `json:"activeSkillIds,omitempty"` + + AcwSkipped *bool `json:"acwSkipped,omitempty"` + + AddressFrom *string `json:"addressFrom,omitempty"` + + AddressOther *string `json:"addressOther,omitempty"` + + AddressSelf *string `json:"addressSelf,omitempty"` + + AddressTo *string `json:"addressTo,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + + AgentBullseyeRing *int `json:"agentBullseyeRing,omitempty"` + + AgentOwned *bool `json:"agentOwned,omitempty"` + + Ani *string `json:"ani,omitempty"` + + AssignerId *string `json:"assignerId,omitempty"` + + Authenticated *bool `json:"authenticated,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + CobrowseRoomId *string `json:"cobrowseRoomId,omitempty"` + + DeliveryStatus *string `json:"deliveryStatus,omitempty"` + + DeliveryStatusChangeDate *string `json:"deliveryStatusChangeDate,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DispositionAnalyzer *string `json:"dispositionAnalyzer,omitempty"` + + DispositionName *string `json:"dispositionName,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + EdgeId *string `json:"edgeId,omitempty"` + + EligibleAgentCounts *[]int `json:"eligibleAgentCounts,omitempty"` + + FlowInType *string `json:"flowInType,omitempty"` + + FlowOutType *string `json:"flowOutType,omitempty"` + + JourneyActionId *string `json:"journeyActionId,omitempty"` + + JourneyActionMapId *string `json:"journeyActionMapId,omitempty"` + + JourneyActionMapVersion *int `json:"journeyActionMapVersion,omitempty"` + + JourneyCustomerId *string `json:"journeyCustomerId,omitempty"` + + JourneyCustomerIdType *string `json:"journeyCustomerIdType,omitempty"` + + JourneyCustomerSessionId *string `json:"journeyCustomerSessionId,omitempty"` + + JourneyCustomerSessionIdType *string `json:"journeyCustomerSessionIdType,omitempty"` + + MediaBridgeId *string `json:"mediaBridgeId,omitempty"` + + MediaCount *int `json:"mediaCount,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + MessageType *string `json:"messageType,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + OutboundCampaignId *string `json:"outboundCampaignId,omitempty"` + + OutboundContactId *string `json:"outboundContactId,omitempty"` + + OutboundContactListId *string `json:"outboundContactListId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ProtocolCallId *string `json:"protocolCallId,omitempty"` + + Provider *string `json:"provider,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + Remote *string `json:"remote,omitempty"` + + RemoteNameDisplayable *string `json:"remoteNameDisplayable,omitempty"` + + RemovedSkillIds *[]string `json:"removedSkillIds,omitempty"` + + RequestedRoutings *[]string `json:"requestedRoutings,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + RoutingRing *int `json:"routingRing,omitempty"` + + ScreenShareAddressSelf *string `json:"screenShareAddressSelf,omitempty"` + + ScreenShareRoomId *string `json:"screenShareRoomId,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + SelectedAgentId *string `json:"selectedAgentId,omitempty"` + + SelectedAgentRank *int `json:"selectedAgentRank,omitempty"` + + SessionDnis *string `json:"sessionDnis,omitempty"` + + SessionId *string `json:"sessionId,omitempty"` + + SharingScreen *bool `json:"sharingScreen,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + UsedRouting *string `json:"usedRouting,omitempty"` + + VideoAddressSelf *string `json:"videoAddressSelf,omitempty"` + + VideoRoomId *string `json:"videoRoomId,omitempty"` + + WaitingInteractionCounts *[]int `json:"waitingInteractionCounts,omitempty"` + + ProposedAgents *[]Analyticsproposedagent `json:"proposedAgents,omitempty"` + + MediaEndpointStats *[]Analyticsmediaendpointstat `json:"mediaEndpointStats,omitempty"` + + Flow *Analyticsflow `json:"flow,omitempty"` + + Metrics *[]Analyticssessionmetric `json:"metrics,omitempty"` + + Segments *[]Analyticsconversationsegment `json:"segments,omitempty"` + *Alias + }{ + ActiveSkillIds: u.ActiveSkillIds, + + AcwSkipped: u.AcwSkipped, + + AddressFrom: u.AddressFrom, + + AddressOther: u.AddressOther, + + AddressSelf: u.AddressSelf, + + AddressTo: u.AddressTo, + + AgentAssistantId: u.AgentAssistantId, + + AgentBullseyeRing: u.AgentBullseyeRing, + + AgentOwned: u.AgentOwned, + + Ani: u.Ani, + + AssignerId: u.AssignerId, + + Authenticated: u.Authenticated, + + CallbackNumbers: u.CallbackNumbers, + + CallbackScheduledTime: CallbackScheduledTime, + + CallbackUserName: u.CallbackUserName, + + CobrowseRole: u.CobrowseRole, + + CobrowseRoomId: u.CobrowseRoomId, + + DeliveryStatus: u.DeliveryStatus, + + DeliveryStatusChangeDate: DeliveryStatusChangeDate, + + Direction: u.Direction, + + DispositionAnalyzer: u.DispositionAnalyzer, + + DispositionName: u.DispositionName, + + Dnis: u.Dnis, + + EdgeId: u.EdgeId, + + EligibleAgentCounts: u.EligibleAgentCounts, + + FlowInType: u.FlowInType, + + FlowOutType: u.FlowOutType, + + JourneyActionId: u.JourneyActionId, + + JourneyActionMapId: u.JourneyActionMapId, + + JourneyActionMapVersion: u.JourneyActionMapVersion, + + JourneyCustomerId: u.JourneyCustomerId, + + JourneyCustomerIdType: u.JourneyCustomerIdType, + + JourneyCustomerSessionId: u.JourneyCustomerSessionId, + + JourneyCustomerSessionIdType: u.JourneyCustomerSessionIdType, + + MediaBridgeId: u.MediaBridgeId, + + MediaCount: u.MediaCount, + + MediaType: u.MediaType, + + MessageType: u.MessageType, + + MonitoredParticipantId: u.MonitoredParticipantId, + + OutboundCampaignId: u.OutboundCampaignId, + + OutboundContactId: u.OutboundContactId, + + OutboundContactListId: u.OutboundContactListId, + + PeerId: u.PeerId, + + ProtocolCallId: u.ProtocolCallId, + + Provider: u.Provider, + + Recording: u.Recording, + + Remote: u.Remote, + + RemoteNameDisplayable: u.RemoteNameDisplayable, + + RemovedSkillIds: u.RemovedSkillIds, + + RequestedRoutings: u.RequestedRoutings, + + RoomId: u.RoomId, + + RoutingRing: u.RoutingRing, + + ScreenShareAddressSelf: u.ScreenShareAddressSelf, + + ScreenShareRoomId: u.ScreenShareRoomId, + + ScriptId: u.ScriptId, + + SelectedAgentId: u.SelectedAgentId, + + SelectedAgentRank: u.SelectedAgentRank, + + SessionDnis: u.SessionDnis, + + SessionId: u.SessionId, + + SharingScreen: u.SharingScreen, + + SkipEnabled: u.SkipEnabled, + + TimeoutSeconds: u.TimeoutSeconds, + + UsedRouting: u.UsedRouting, + + VideoAddressSelf: u.VideoAddressSelf, + + VideoRoomId: u.VideoRoomId, + + WaitingInteractionCounts: u.WaitingInteractionCounts, + + ProposedAgents: u.ProposedAgents, + + MediaEndpointStats: u.MediaEndpointStats, + + Flow: u.Flow, + + Metrics: u.Metrics, + + Segments: u.Segments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticssession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticssessionmetric.go b/platformclientv2/analyticssessionmetric.go index a72e44ee7..33a8da444 100644 --- a/platformclientv2/analyticssessionmetric.go +++ b/platformclientv2/analyticssessionmetric.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Analyticssessionmetric struct { } +func (u *Analyticssessionmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticssessionmetric + + + EmitDate := new(string) + if u.EmitDate != nil { + + *EmitDate = timeutil.Strftime(u.EmitDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EmitDate = nil + } + + + return json.Marshal(&struct { + EmitDate *string `json:"emitDate,omitempty"` + + Name *string `json:"name,omitempty"` + + Value *int `json:"value,omitempty"` + *Alias + }{ + EmitDate: EmitDate, + + Name: u.Name, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticssessionmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticssurvey.go b/platformclientv2/analyticssurvey.go index c004a1e64..0e2727998 100644 --- a/platformclientv2/analyticssurvey.go +++ b/platformclientv2/analyticssurvey.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Analyticssurvey struct { } +func (u *Analyticssurvey) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticssurvey + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + SurveyCompletedDate := new(string) + if u.SurveyCompletedDate != nil { + + *SurveyCompletedDate = timeutil.Strftime(u.SurveyCompletedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SurveyCompletedDate = nil + } + + + return json.Marshal(&struct { + EventTime *string `json:"eventTime,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + SurveyCompletedDate *string `json:"surveyCompletedDate,omitempty"` + + SurveyFormContextId *string `json:"surveyFormContextId,omitempty"` + + SurveyFormId *string `json:"surveyFormId,omitempty"` + + SurveyFormName *string `json:"surveyFormName,omitempty"` + + SurveyId *string `json:"surveyId,omitempty"` + + SurveyPromoterScore *int `json:"surveyPromoterScore,omitempty"` + + SurveyStatus *string `json:"surveyStatus,omitempty"` + + UserId *string `json:"userId,omitempty"` + + OSurveyTotalScore *int `json:"oSurveyTotalScore,omitempty"` + *Alias + }{ + EventTime: EventTime, + + QueueId: u.QueueId, + + SurveyCompletedDate: SurveyCompletedDate, + + SurveyFormContextId: u.SurveyFormContextId, + + SurveyFormId: u.SurveyFormId, + + SurveyFormName: u.SurveyFormName, + + SurveyId: u.SurveyId, + + SurveyPromoterScore: u.SurveyPromoterScore, + + SurveyStatus: u.SurveyStatus, + + UserId: u.UserId, + + OSurveyTotalScore: u.OSurveyTotalScore, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticssurvey) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsuserdetail.go b/platformclientv2/analyticsuserdetail.go index d3887370f..04efcea29 100644 --- a/platformclientv2/analyticsuserdetail.go +++ b/platformclientv2/analyticsuserdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Analyticsuserdetail struct { } +func (u *Analyticsuserdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsuserdetail + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + PrimaryPresence *[]Analyticsuserpresencerecord `json:"primaryPresence,omitempty"` + + RoutingStatus *[]Analyticsroutingstatusrecord `json:"routingStatus,omitempty"` + *Alias + }{ + UserId: u.UserId, + + PrimaryPresence: u.PrimaryPresence, + + RoutingStatus: u.RoutingStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsuserdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsuserdetailsasyncqueryresponse.go b/platformclientv2/analyticsuserdetailsasyncqueryresponse.go index 77eb74657..24f8c32e1 100644 --- a/platformclientv2/analyticsuserdetailsasyncqueryresponse.go +++ b/platformclientv2/analyticsuserdetailsasyncqueryresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Analyticsuserdetailsasyncqueryresponse struct { } +func (u *Analyticsuserdetailsasyncqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsuserdetailsasyncqueryresponse + + + DataAvailabilityDate := new(string) + if u.DataAvailabilityDate != nil { + + *DataAvailabilityDate = timeutil.Strftime(u.DataAvailabilityDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DataAvailabilityDate = nil + } + + + return json.Marshal(&struct { + UserDetails *[]Analyticsuserdetail `json:"userDetails,omitempty"` + + Cursor *string `json:"cursor,omitempty"` + + DataAvailabilityDate *string `json:"dataAvailabilityDate,omitempty"` + *Alias + }{ + UserDetails: u.UserDetails, + + Cursor: u.Cursor, + + DataAvailabilityDate: DataAvailabilityDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsuserdetailsasyncqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsuserdetailsqueryresponse.go b/platformclientv2/analyticsuserdetailsqueryresponse.go index 0e54eb552..1b15bf9a1 100644 --- a/platformclientv2/analyticsuserdetailsqueryresponse.go +++ b/platformclientv2/analyticsuserdetailsqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Analyticsuserdetailsqueryresponse struct { } +func (u *Analyticsuserdetailsqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsuserdetailsqueryresponse + + + + return json.Marshal(&struct { + UserDetails *[]Analyticsuserdetail `json:"userDetails,omitempty"` + + Aggregations *[]Aggregationresult `json:"aggregations,omitempty"` + + TotalHits *int `json:"totalHits,omitempty"` + *Alias + }{ + UserDetails: u.UserDetails, + + Aggregations: u.Aggregations, + + TotalHits: u.TotalHits, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsuserdetailsqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/analyticsuserpresencerecord.go b/platformclientv2/analyticsuserpresencerecord.go index e09ed8bc9..da6f7c1d4 100644 --- a/platformclientv2/analyticsuserpresencerecord.go +++ b/platformclientv2/analyticsuserpresencerecord.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,50 @@ type Analyticsuserpresencerecord struct { } +func (u *Analyticsuserpresencerecord) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Analyticsuserpresencerecord + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + OrganizationPresenceId *string `json:"organizationPresenceId,omitempty"` + *Alias + }{ + StartTime: StartTime, + + EndTime: EndTime, + + SystemPresence: u.SystemPresence, + + OrganizationPresenceId: u.OrganizationPresenceId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Analyticsuserpresencerecord) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/annotation.go b/platformclientv2/annotation.go index 7c4c961d1..ea76d3753 100644 --- a/platformclientv2/annotation.go +++ b/platformclientv2/annotation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Annotation struct { } +func (u *Annotation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Annotation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Location *int `json:"location,omitempty"` + + DurationMs *int `json:"durationMs,omitempty"` + + AbsoluteLocation *int `json:"absoluteLocation,omitempty"` + + AbsoluteDurationMs *int `json:"absoluteDurationMs,omitempty"` + + RecordingLocation *int `json:"recordingLocation,omitempty"` + + RecordingDurationMs *int `json:"recordingDurationMs,omitempty"` + + User *User `json:"user,omitempty"` + + Description *string `json:"description,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + Location: u.Location, + + DurationMs: u.DurationMs, + + AbsoluteLocation: u.AbsoluteLocation, + + AbsoluteDurationMs: u.AbsoluteDurationMs, + + RecordingLocation: u.RecordingLocation, + + RecordingDurationMs: u.RecordingDurationMs, + + User: u.User, + + Description: u.Description, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Annotation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/answeroption.go b/platformclientv2/answeroption.go index 9386ea625..8e489577d 100644 --- a/platformclientv2/answeroption.go +++ b/platformclientv2/answeroption.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Answeroption struct { } +func (u *Answeroption) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Answeroption + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Text *string `json:"text,omitempty"` + + Value *int `json:"value,omitempty"` + *Alias + }{ + Id: u.Id, + + Text: u.Text, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Answeroption) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/apiusagequery.go b/platformclientv2/apiusagequery.go index 39faf87d2..913767248 100644 --- a/platformclientv2/apiusagequery.go +++ b/platformclientv2/apiusagequery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Apiusagequery struct { } +func (u *Apiusagequery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Apiusagequery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + GroupBy: u.GroupBy, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Apiusagequery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/apiusagequeryresult.go b/platformclientv2/apiusagequeryresult.go index 8eed2bdac..92b9891c7 100644 --- a/platformclientv2/apiusagequeryresult.go +++ b/platformclientv2/apiusagequeryresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Apiusagequeryresult struct { } +func (u *Apiusagequeryresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Apiusagequeryresult + + + + return json.Marshal(&struct { + Results *[]Apiusagerow `json:"results,omitempty"` + + QueryStatus *string `json:"queryStatus,omitempty"` + *Alias + }{ + Results: u.Results, + + QueryStatus: u.QueryStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Apiusagequeryresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/apiusagerow.go b/platformclientv2/apiusagerow.go index 8053260e9..e51a00721 100644 --- a/platformclientv2/apiusagerow.go +++ b/platformclientv2/apiusagerow.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Apiusagerow struct { } +func (u *Apiusagerow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Apiusagerow + + + Date := new(string) + if u.Date != nil { + + *Date = timeutil.Strftime(u.Date, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Date = nil + } + + + return json.Marshal(&struct { + ClientId *string `json:"clientId,omitempty"` + + ClientName *string `json:"clientName,omitempty"` + + OrganizationId *string `json:"organizationId,omitempty"` + + UserId *string `json:"userId,omitempty"` + + TemplateUri *string `json:"templateUri,omitempty"` + + HttpMethod *string `json:"httpMethod,omitempty"` + + Status200 *int `json:"status200,omitempty"` + + Status300 *int `json:"status300,omitempty"` + + Status400 *int `json:"status400,omitempty"` + + Status500 *int `json:"status500,omitempty"` + + Status429 *int `json:"status429,omitempty"` + + Requests *int `json:"requests,omitempty"` + + Date *string `json:"date,omitempty"` + *Alias + }{ + ClientId: u.ClientId, + + ClientName: u.ClientName, + + OrganizationId: u.OrganizationId, + + UserId: u.UserId, + + TemplateUri: u.TemplateUri, + + HttpMethod: u.HttpMethod, + + Status200: u.Status200, + + Status300: u.Status300, + + Status400: u.Status400, + + Status500: u.Status500, + + Status429: u.Status429, + + Requests: u.Requests, + + Date: Date, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Apiusagerow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectdependencytrackingbuildnotificationclient.go b/platformclientv2/architectdependencytrackingbuildnotificationclient.go index 1c73f51db..5e8a19f17 100644 --- a/platformclientv2/architectdependencytrackingbuildnotificationclient.go +++ b/platformclientv2/architectdependencytrackingbuildnotificationclient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Architectdependencytrackingbuildnotificationclient struct { } +func (u *Architectdependencytrackingbuildnotificationclient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectdependencytrackingbuildnotificationclient + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectdependencytrackingbuildnotificationclient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectdependencytrackingbuildnotificationdependencytrackingbuildnotification.go b/platformclientv2/architectdependencytrackingbuildnotificationdependencytrackingbuildnotification.go index 5a7d31dcb..1c16da1bd 100644 --- a/platformclientv2/architectdependencytrackingbuildnotificationdependencytrackingbuildnotification.go +++ b/platformclientv2/architectdependencytrackingbuildnotificationdependencytrackingbuildnotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Architectdependencytrackingbuildnotificationdependencytrackingbuildnotifica } +func (u *Architectdependencytrackingbuildnotificationdependencytrackingbuildnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectdependencytrackingbuildnotificationdependencytrackingbuildnotification + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + User *Architectdependencytrackingbuildnotificationuser `json:"user,omitempty"` + + Client *Architectdependencytrackingbuildnotificationclient `json:"client,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + *Alias + }{ + Status: u.Status, + + User: u.User, + + Client: u.Client, + + StartTime: StartTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectdependencytrackingbuildnotificationdependencytrackingbuildnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectdependencytrackingbuildnotificationhomeorganization.go b/platformclientv2/architectdependencytrackingbuildnotificationhomeorganization.go index ac9a7c37c..99f49b012 100644 --- a/platformclientv2/architectdependencytrackingbuildnotificationhomeorganization.go +++ b/platformclientv2/architectdependencytrackingbuildnotificationhomeorganization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectdependencytrackingbuildnotificationhomeorganization struct { } +func (u *Architectdependencytrackingbuildnotificationhomeorganization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectdependencytrackingbuildnotificationhomeorganization + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ThirdPartyOrgName *string `json:"thirdPartyOrgName,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ThirdPartyOrgName: u.ThirdPartyOrgName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectdependencytrackingbuildnotificationhomeorganization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectdependencytrackingbuildnotificationuser.go b/platformclientv2/architectdependencytrackingbuildnotificationuser.go index c29f573be..d2f819d58 100644 --- a/platformclientv2/architectdependencytrackingbuildnotificationuser.go +++ b/platformclientv2/architectdependencytrackingbuildnotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectdependencytrackingbuildnotificationuser struct { } +func (u *Architectdependencytrackingbuildnotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectdependencytrackingbuildnotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + HomeOrg *Architectdependencytrackingbuildnotificationhomeorganization `json:"homeOrg,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + HomeOrg: u.HomeOrg, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectdependencytrackingbuildnotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowfields.go b/platformclientv2/architectflowfields.go index 4829a2b2b..87048253b 100644 --- a/platformclientv2/architectflowfields.go +++ b/platformclientv2/architectflowfields.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Architectflowfields struct { } +func (u *Architectflowfields) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowfields + + + + return json.Marshal(&struct { + ArchitectFlow *Addressableentityref `json:"architectFlow,omitempty"` + + FlowRequestMappings *[]Requestmapping `json:"flowRequestMappings,omitempty"` + *Alias + }{ + ArchitectFlow: u.ArchitectFlow, + + FlowRequestMappings: u.FlowRequestMappings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowfields) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationarchitectoperation.go b/platformclientv2/architectflownotificationarchitectoperation.go index e09522e20..613459ccc 100644 --- a/platformclientv2/architectflownotificationarchitectoperation.go +++ b/platformclientv2/architectflownotificationarchitectoperation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Architectflownotificationarchitectoperation struct { } +func (u *Architectflownotificationarchitectoperation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationarchitectoperation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Complete *bool `json:"complete,omitempty"` + + User *Architectflownotificationuser `json:"user,omitempty"` + + Client *Architectflownotificationclient `json:"client,omitempty"` + + ActionName *string `json:"actionName,omitempty"` + + ActionStatus *string `json:"actionStatus,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + + ErrorMessageParams *Architectflownotificationerrormessageparams `json:"errorMessageParams,omitempty"` + + ErrorDetails *[]Architectflownotificationerrordetail `json:"errorDetails,omitempty"` + *Alias + }{ + Id: u.Id, + + Complete: u.Complete, + + User: u.User, + + Client: u.Client, + + ActionName: u.ActionName, + + ActionStatus: u.ActionStatus, + + ErrorMessage: u.ErrorMessage, + + ErrorCode: u.ErrorCode, + + ErrorMessageParams: u.ErrorMessageParams, + + ErrorDetails: u.ErrorDetails, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationarchitectoperation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationclient.go b/platformclientv2/architectflownotificationclient.go index 5d5ffaaa7..a3d4a25e2 100644 --- a/platformclientv2/architectflownotificationclient.go +++ b/platformclientv2/architectflownotificationclient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Architectflownotificationclient struct { } +func (u *Architectflownotificationclient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationclient + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationclient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationerrordetail.go b/platformclientv2/architectflownotificationerrordetail.go index bd19b6b71..c77f08b8e 100644 --- a/platformclientv2/architectflownotificationerrordetail.go +++ b/platformclientv2/architectflownotificationerrordetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Architectflownotificationerrordetail struct { } +func (u *Architectflownotificationerrordetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationerrordetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + FieldName: u.FieldName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationerrordetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationerrormessageparams.go b/platformclientv2/architectflownotificationerrormessageparams.go index 261cd75e3..c2f326101 100644 --- a/platformclientv2/architectflownotificationerrormessageparams.go +++ b/platformclientv2/architectflownotificationerrormessageparams.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Architectflownotificationerrormessageparams struct { } +func (u *Architectflownotificationerrormessageparams) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationerrormessageparams + + + + return json.Marshal(&struct { + AdditionalProperties *map[string]string `json:"additionalProperties,omitempty"` + *Alias + }{ + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationerrormessageparams) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationflownotification.go b/platformclientv2/architectflownotificationflownotification.go index d8cb38b1e..9825aa4d0 100644 --- a/platformclientv2/architectflownotificationflownotification.go +++ b/platformclientv2/architectflownotificationflownotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Architectflownotificationflownotification struct { } +func (u *Architectflownotificationflownotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationflownotification + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Deleted *bool `json:"deleted,omitempty"` + + CheckedInVersion *Architectflownotificationflowversion `json:"checkedInVersion,omitempty"` + + SavedVersion *Architectflownotificationflowversion `json:"savedVersion,omitempty"` + + PublishedVersion *Architectflownotificationflowversion `json:"publishedVersion,omitempty"` + + CurrentOperation *Architectflownotificationarchitectoperation `json:"currentOperation,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Deleted: u.Deleted, + + CheckedInVersion: u.CheckedInVersion, + + SavedVersion: u.SavedVersion, + + PublishedVersion: u.PublishedVersion, + + CurrentOperation: u.CurrentOperation, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationflownotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationflowversion.go b/platformclientv2/architectflownotificationflowversion.go index 752d277a2..0b8d0f943 100644 --- a/platformclientv2/architectflownotificationflowversion.go +++ b/platformclientv2/architectflownotificationflowversion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Architectflownotificationflowversion struct { } +func (u *Architectflownotificationflowversion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationflowversion + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationflowversion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationhomeorganization.go b/platformclientv2/architectflownotificationhomeorganization.go index 3cfbefd05..20ca34fe3 100644 --- a/platformclientv2/architectflownotificationhomeorganization.go +++ b/platformclientv2/architectflownotificationhomeorganization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectflownotificationhomeorganization struct { } +func (u *Architectflownotificationhomeorganization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationhomeorganization + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ThirdPartyOrgName *string `json:"thirdPartyOrgName,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ThirdPartyOrgName: u.ThirdPartyOrgName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationhomeorganization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflownotificationuser.go b/platformclientv2/architectflownotificationuser.go index 5797245b9..53d6e1668 100644 --- a/platformclientv2/architectflownotificationuser.go +++ b/platformclientv2/architectflownotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectflownotificationuser struct { } +func (u *Architectflownotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflownotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + HomeOrg *Architectflownotificationhomeorganization `json:"homeOrg,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + HomeOrg: u.HomeOrg, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflownotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowoutcomenotificationarchitectoperation.go b/platformclientv2/architectflowoutcomenotificationarchitectoperation.go index 2255b973a..08711cdf7 100644 --- a/platformclientv2/architectflowoutcomenotificationarchitectoperation.go +++ b/platformclientv2/architectflowoutcomenotificationarchitectoperation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Architectflowoutcomenotificationarchitectoperation struct { } +func (u *Architectflowoutcomenotificationarchitectoperation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowoutcomenotificationarchitectoperation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Complete *bool `json:"complete,omitempty"` + + User *Architectflowoutcomenotificationuser `json:"user,omitempty"` + + Client *Architectflowoutcomenotificationclient `json:"client,omitempty"` + + ActionName *string `json:"actionName,omitempty"` + + ActionStatus *string `json:"actionStatus,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + + ErrorMessageParams *Architectflowoutcomenotificationerrormessageparams `json:"errorMessageParams,omitempty"` + + ErrorDetails *[]Architectflowoutcomenotificationerrordetail `json:"errorDetails,omitempty"` + *Alias + }{ + Id: u.Id, + + Complete: u.Complete, + + User: u.User, + + Client: u.Client, + + ActionName: u.ActionName, + + ActionStatus: u.ActionStatus, + + ErrorMessage: u.ErrorMessage, + + ErrorCode: u.ErrorCode, + + ErrorMessageParams: u.ErrorMessageParams, + + ErrorDetails: u.ErrorDetails, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowoutcomenotificationarchitectoperation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowoutcomenotificationclient.go b/platformclientv2/architectflowoutcomenotificationclient.go index f32be27f3..5dfb01cfc 100644 --- a/platformclientv2/architectflowoutcomenotificationclient.go +++ b/platformclientv2/architectflowoutcomenotificationclient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Architectflowoutcomenotificationclient struct { } +func (u *Architectflowoutcomenotificationclient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowoutcomenotificationclient + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowoutcomenotificationclient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowoutcomenotificationerrordetail.go b/platformclientv2/architectflowoutcomenotificationerrordetail.go index 6359d766d..c49f5a42b 100644 --- a/platformclientv2/architectflowoutcomenotificationerrordetail.go +++ b/platformclientv2/architectflowoutcomenotificationerrordetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Architectflowoutcomenotificationerrordetail struct { } +func (u *Architectflowoutcomenotificationerrordetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowoutcomenotificationerrordetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + FieldName: u.FieldName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowoutcomenotificationerrordetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowoutcomenotificationerrormessageparams.go b/platformclientv2/architectflowoutcomenotificationerrormessageparams.go index 2e1cac342..0bf7be25a 100644 --- a/platformclientv2/architectflowoutcomenotificationerrormessageparams.go +++ b/platformclientv2/architectflowoutcomenotificationerrormessageparams.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Architectflowoutcomenotificationerrormessageparams struct { } +func (u *Architectflowoutcomenotificationerrormessageparams) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowoutcomenotificationerrormessageparams + + + + return json.Marshal(&struct { + AdditionalProperties *map[string]string `json:"additionalProperties,omitempty"` + *Alias + }{ + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowoutcomenotificationerrormessageparams) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowoutcomenotificationflowoutcomenotification.go b/platformclientv2/architectflowoutcomenotificationflowoutcomenotification.go index b8d3c3f3e..c9be3ef92 100644 --- a/platformclientv2/architectflowoutcomenotificationflowoutcomenotification.go +++ b/platformclientv2/architectflowoutcomenotificationflowoutcomenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Architectflowoutcomenotificationflowoutcomenotification struct { } +func (u *Architectflowoutcomenotificationflowoutcomenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowoutcomenotificationflowoutcomenotification + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + CurrentOperation *Architectflowoutcomenotificationarchitectoperation `json:"currentOperation,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + CurrentOperation: u.CurrentOperation, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowoutcomenotificationflowoutcomenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowoutcomenotificationhomeorganization.go b/platformclientv2/architectflowoutcomenotificationhomeorganization.go index 52df3aebb..da6abe6ec 100644 --- a/platformclientv2/architectflowoutcomenotificationhomeorganization.go +++ b/platformclientv2/architectflowoutcomenotificationhomeorganization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectflowoutcomenotificationhomeorganization struct { } +func (u *Architectflowoutcomenotificationhomeorganization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowoutcomenotificationhomeorganization + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ThirdPartyOrgName *string `json:"thirdPartyOrgName,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ThirdPartyOrgName: u.ThirdPartyOrgName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowoutcomenotificationhomeorganization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectflowoutcomenotificationuser.go b/platformclientv2/architectflowoutcomenotificationuser.go index 66b23253b..77a9634a5 100644 --- a/platformclientv2/architectflowoutcomenotificationuser.go +++ b/platformclientv2/architectflowoutcomenotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectflowoutcomenotificationuser struct { } +func (u *Architectflowoutcomenotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectflowoutcomenotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + HomeOrg *Architectflowoutcomenotificationhomeorganization `json:"homeOrg,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + HomeOrg: u.HomeOrg, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectflowoutcomenotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptnotificationarchitectoperation.go b/platformclientv2/architectpromptnotificationarchitectoperation.go index d4eae750e..8d91406e1 100644 --- a/platformclientv2/architectpromptnotificationarchitectoperation.go +++ b/platformclientv2/architectpromptnotificationarchitectoperation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Architectpromptnotificationarchitectoperation struct { } +func (u *Architectpromptnotificationarchitectoperation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptnotificationarchitectoperation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Complete *bool `json:"complete,omitempty"` + + User *Architectpromptnotificationuser `json:"user,omitempty"` + + Client *Architectpromptnotificationclient `json:"client,omitempty"` + + ActionName *string `json:"actionName,omitempty"` + + ActionStatus *string `json:"actionStatus,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + + ErrorMessageParams *Architectpromptnotificationerrormessageparams `json:"errorMessageParams,omitempty"` + + ErrorDetails *[]Architectpromptnotificationerrordetail `json:"errorDetails,omitempty"` + *Alias + }{ + Id: u.Id, + + Complete: u.Complete, + + User: u.User, + + Client: u.Client, + + ActionName: u.ActionName, + + ActionStatus: u.ActionStatus, + + ErrorMessage: u.ErrorMessage, + + ErrorCode: u.ErrorCode, + + ErrorMessageParams: u.ErrorMessageParams, + + ErrorDetails: u.ErrorDetails, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptnotificationarchitectoperation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptnotificationclient.go b/platformclientv2/architectpromptnotificationclient.go index e0ed6b944..6d0c1eec3 100644 --- a/platformclientv2/architectpromptnotificationclient.go +++ b/platformclientv2/architectpromptnotificationclient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Architectpromptnotificationclient struct { } +func (u *Architectpromptnotificationclient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptnotificationclient + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptnotificationclient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptnotificationerrordetail.go b/platformclientv2/architectpromptnotificationerrordetail.go index 38d5d25bf..018e1c197 100644 --- a/platformclientv2/architectpromptnotificationerrordetail.go +++ b/platformclientv2/architectpromptnotificationerrordetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Architectpromptnotificationerrordetail struct { } +func (u *Architectpromptnotificationerrordetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptnotificationerrordetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + FieldName: u.FieldName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptnotificationerrordetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptnotificationerrormessageparams.go b/platformclientv2/architectpromptnotificationerrormessageparams.go index 3abe21728..3729fadbf 100644 --- a/platformclientv2/architectpromptnotificationerrormessageparams.go +++ b/platformclientv2/architectpromptnotificationerrormessageparams.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Architectpromptnotificationerrormessageparams struct { } +func (u *Architectpromptnotificationerrormessageparams) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptnotificationerrormessageparams + + + + return json.Marshal(&struct { + AdditionalProperties *map[string]string `json:"additionalProperties,omitempty"` + *Alias + }{ + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptnotificationerrormessageparams) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptnotificationhomeorganization.go b/platformclientv2/architectpromptnotificationhomeorganization.go index 47e6fb112..f51363d30 100644 --- a/platformclientv2/architectpromptnotificationhomeorganization.go +++ b/platformclientv2/architectpromptnotificationhomeorganization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectpromptnotificationhomeorganization struct { } +func (u *Architectpromptnotificationhomeorganization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptnotificationhomeorganization + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ThirdPartyOrgName *string `json:"thirdPartyOrgName,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ThirdPartyOrgName: u.ThirdPartyOrgName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptnotificationhomeorganization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptnotificationpromptnotification.go b/platformclientv2/architectpromptnotificationpromptnotification.go index 117d7ecf1..8b1adf06b 100644 --- a/platformclientv2/architectpromptnotificationpromptnotification.go +++ b/platformclientv2/architectpromptnotificationpromptnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Architectpromptnotificationpromptnotification struct { } +func (u *Architectpromptnotificationpromptnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptnotificationpromptnotification + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + CurrentOperation *Architectpromptnotificationarchitectoperation `json:"currentOperation,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + CurrentOperation: u.CurrentOperation, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptnotificationpromptnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptnotificationuser.go b/platformclientv2/architectpromptnotificationuser.go index 22ff006c3..d1ec63e40 100644 --- a/platformclientv2/architectpromptnotificationuser.go +++ b/platformclientv2/architectpromptnotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Architectpromptnotificationuser struct { } +func (u *Architectpromptnotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptnotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + HomeOrg *Architectpromptnotificationhomeorganization `json:"homeOrg,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + HomeOrg: u.HomeOrg, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptnotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectpromptresourcenotificationpromptresourcenotification.go b/platformclientv2/architectpromptresourcenotificationpromptresourcenotification.go index d1494ed5a..e07e93238 100644 --- a/platformclientv2/architectpromptresourcenotificationpromptresourcenotification.go +++ b/platformclientv2/architectpromptresourcenotificationpromptresourcenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Architectpromptresourcenotificationpromptresourcenotification struct { } +func (u *Architectpromptresourcenotificationpromptresourcenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectpromptresourcenotificationpromptresourcenotification + + + + return json.Marshal(&struct { + PromptId *string `json:"promptId,omitempty"` + + Id *string `json:"id,omitempty"` + + Language *string `json:"language,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + + DurationSeconds *float32 `json:"durationSeconds,omitempty"` + *Alias + }{ + PromptId: u.PromptId, + + Id: u.Id, + + Language: u.Language, + + MediaUri: u.MediaUri, + + UploadStatus: u.UploadStatus, + + DurationSeconds: u.DurationSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectpromptresourcenotificationpromptresourcenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/architectsystempromptresourcenotificationsystempromptresourcenotification.go b/platformclientv2/architectsystempromptresourcenotificationsystempromptresourcenotification.go index 8927e3da4..338553591 100644 --- a/platformclientv2/architectsystempromptresourcenotificationsystempromptresourcenotification.go +++ b/platformclientv2/architectsystempromptresourcenotificationsystempromptresourcenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Architectsystempromptresourcenotificationsystempromptresourcenotification s } +func (u *Architectsystempromptresourcenotificationsystempromptresourcenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Architectsystempromptresourcenotificationsystempromptresourcenotification + + + + return json.Marshal(&struct { + PromptId *string `json:"promptId,omitempty"` + + Id *string `json:"id,omitempty"` + + Language *string `json:"language,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + + DurationSeconds *float32 `json:"durationSeconds,omitempty"` + *Alias + }{ + PromptId: u.PromptId, + + Id: u.Id, + + Language: u.Language, + + MediaUri: u.MediaUri, + + UploadStatus: u.UploadStatus, + + DurationSeconds: u.DurationSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Architectsystempromptresourcenotificationsystempromptresourcenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/archiveretention.go b/platformclientv2/archiveretention.go index 80b26b43b..181e46d68 100644 --- a/platformclientv2/archiveretention.go +++ b/platformclientv2/archiveretention.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Archiveretention struct { } +func (u *Archiveretention) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Archiveretention + + + + return json.Marshal(&struct { + Days *int `json:"days,omitempty"` + + StorageMedium *string `json:"storageMedium,omitempty"` + *Alias + }{ + Days: u.Days, + + StorageMedium: u.StorageMedium, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Archiveretention) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/arraynode.go b/platformclientv2/arraynode.go index 83418cd97..4c392fd7c 100644 --- a/platformclientv2/arraynode.go +++ b/platformclientv2/arraynode.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Arraynode type Arraynode struct { } +func (u *Arraynode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Arraynode + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Arraynode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/articlecontent.go b/platformclientv2/articlecontent.go index 70b0832f4..754af11ba 100644 --- a/platformclientv2/articlecontent.go +++ b/platformclientv2/articlecontent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Articlecontent struct { } +func (u *Articlecontent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Articlecontent + + + + return json.Marshal(&struct { + Body *Articlecontentbody `json:"body,omitempty"` + *Alias + }{ + Body: u.Body, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Articlecontent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/articlecontentbody.go b/platformclientv2/articlecontentbody.go index 7a5d1975d..41ffb9654 100644 --- a/platformclientv2/articlecontentbody.go +++ b/platformclientv2/articlecontentbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Articlecontentbody struct { } +func (u *Articlecontentbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Articlecontentbody + + + + return json.Marshal(&struct { + LocationUrl *string `json:"locationUrl,omitempty"` + *Alias + }{ + LocationUrl: u.LocationUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Articlecontentbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentform.go b/platformclientv2/assessmentform.go index fa3351fb1..61267d428 100644 --- a/platformclientv2/assessmentform.go +++ b/platformclientv2/assessmentform.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Assessmentform struct { } +func (u *Assessmentform) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentform + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + Published *bool `json:"published,omitempty"` + + PassPercent *int `json:"passPercent,omitempty"` + + QuestionGroups *[]Assessmentformquestiongroup `json:"questionGroups,omitempty"` + *Alias + }{ + Id: u.Id, + + DateModified: DateModified, + + ContextId: u.ContextId, + + SelfUri: u.SelfUri, + + Published: u.Published, + + PassPercent: u.PassPercent, + + QuestionGroups: u.QuestionGroups, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentform) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentformquestion.go b/platformclientv2/assessmentformquestion.go index 7f2ffa9e4..fd0b1517a 100644 --- a/platformclientv2/assessmentformquestion.go +++ b/platformclientv2/assessmentformquestion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Assessmentformquestion struct { } +func (u *Assessmentformquestion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentformquestion + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + HelpText *string `json:"helpText,omitempty"` + + NaEnabled *bool `json:"naEnabled,omitempty"` + + CommentsRequired *bool `json:"commentsRequired,omitempty"` + + VisibilityCondition *Visibilitycondition `json:"visibilityCondition,omitempty"` + + AnswerOptions *[]Answeroption `json:"answerOptions,omitempty"` + + MaxResponseCharacters *int `json:"maxResponseCharacters,omitempty"` + + IsKill *bool `json:"isKill,omitempty"` + + IsCritical *bool `json:"isCritical,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + + Text: u.Text, + + HelpText: u.HelpText, + + NaEnabled: u.NaEnabled, + + CommentsRequired: u.CommentsRequired, + + VisibilityCondition: u.VisibilityCondition, + + AnswerOptions: u.AnswerOptions, + + MaxResponseCharacters: u.MaxResponseCharacters, + + IsKill: u.IsKill, + + IsCritical: u.IsCritical, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentformquestion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentformquestiongroup.go b/platformclientv2/assessmentformquestiongroup.go index eeb451b74..56ea97860 100644 --- a/platformclientv2/assessmentformquestiongroup.go +++ b/platformclientv2/assessmentformquestiongroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Assessmentformquestiongroup struct { } +func (u *Assessmentformquestiongroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentformquestiongroup + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + DefaultAnswersToHighest *bool `json:"defaultAnswersToHighest,omitempty"` + + DefaultAnswersToNA *bool `json:"defaultAnswersToNA,omitempty"` + + NaEnabled *bool `json:"naEnabled,omitempty"` + + Weight *float32 `json:"weight,omitempty"` + + ManualWeight *bool `json:"manualWeight,omitempty"` + + Questions *[]Assessmentformquestion `json:"questions,omitempty"` + + VisibilityCondition *Visibilitycondition `json:"visibilityCondition,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + DefaultAnswersToHighest: u.DefaultAnswersToHighest, + + DefaultAnswersToNA: u.DefaultAnswersToNA, + + NaEnabled: u.NaEnabled, + + Weight: u.Weight, + + ManualWeight: u.ManualWeight, + + Questions: u.Questions, + + VisibilityCondition: u.VisibilityCondition, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentformquestiongroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentjoblisting.go b/platformclientv2/assessmentjoblisting.go index 0e50a684f..6a92a44fe 100644 --- a/platformclientv2/assessmentjoblisting.go +++ b/platformclientv2/assessmentjoblisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Assessmentjoblisting struct { } +func (u *Assessmentjoblisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentjoblisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Benefitassessmentjob `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentjoblisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentlisting.go b/platformclientv2/assessmentlisting.go index 1294fa03c..9a3592735 100644 --- a/platformclientv2/assessmentlisting.go +++ b/platformclientv2/assessmentlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Assessmentlisting struct { } +func (u *Assessmentlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentlisting + + + + return json.Marshal(&struct { + Entities *[]Benefitassessment `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentquestiongroupscore.go b/platformclientv2/assessmentquestiongroupscore.go index 3975b40f4..248de045a 100644 --- a/platformclientv2/assessmentquestiongroupscore.go +++ b/platformclientv2/assessmentquestiongroupscore.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -68,6 +69,78 @@ type Assessmentquestiongroupscore struct { } +func (u *Assessmentquestiongroupscore) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentquestiongroupscore + + + + return json.Marshal(&struct { + QuestionGroupId *string `json:"questionGroupId,omitempty"` + + TotalScore *float32 `json:"totalScore,omitempty"` + + MaxTotalScore *float32 `json:"maxTotalScore,omitempty"` + + MarkedNA *bool `json:"markedNA,omitempty"` + + TotalCriticalScore *float32 `json:"totalCriticalScore,omitempty"` + + MaxTotalCriticalScore *float32 `json:"maxTotalCriticalScore,omitempty"` + + TotalNonCriticalScore *float32 `json:"totalNonCriticalScore,omitempty"` + + MaxTotalNonCriticalScore *float32 `json:"maxTotalNonCriticalScore,omitempty"` + + TotalScoreUnweighted *float32 `json:"totalScoreUnweighted,omitempty"` + + MaxTotalScoreUnweighted *float32 `json:"maxTotalScoreUnweighted,omitempty"` + + TotalCriticalScoreUnweighted *float32 `json:"totalCriticalScoreUnweighted,omitempty"` + + MaxTotalCriticalScoreUnweighted *float32 `json:"maxTotalCriticalScoreUnweighted,omitempty"` + + TotalNonCriticalScoreUnweighted *float32 `json:"totalNonCriticalScoreUnweighted,omitempty"` + + MaxTotalNonCriticalScoreUnweighted *float32 `json:"maxTotalNonCriticalScoreUnweighted,omitempty"` + + QuestionScores *[]Assessmentquestionscore `json:"questionScores,omitempty"` + *Alias + }{ + QuestionGroupId: u.QuestionGroupId, + + TotalScore: u.TotalScore, + + MaxTotalScore: u.MaxTotalScore, + + MarkedNA: u.MarkedNA, + + TotalCriticalScore: u.TotalCriticalScore, + + MaxTotalCriticalScore: u.MaxTotalCriticalScore, + + TotalNonCriticalScore: u.TotalNonCriticalScore, + + MaxTotalNonCriticalScore: u.MaxTotalNonCriticalScore, + + TotalScoreUnweighted: u.TotalScoreUnweighted, + + MaxTotalScoreUnweighted: u.MaxTotalScoreUnweighted, + + TotalCriticalScoreUnweighted: u.TotalCriticalScoreUnweighted, + + MaxTotalCriticalScoreUnweighted: u.MaxTotalCriticalScoreUnweighted, + + TotalNonCriticalScoreUnweighted: u.TotalNonCriticalScoreUnweighted, + + MaxTotalNonCriticalScoreUnweighted: u.MaxTotalNonCriticalScoreUnweighted, + + QuestionScores: u.QuestionScores, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentquestiongroupscore) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentquestionscore.go b/platformclientv2/assessmentquestionscore.go index 5ef610a07..c9a53a89d 100644 --- a/platformclientv2/assessmentquestionscore.go +++ b/platformclientv2/assessmentquestionscore.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Assessmentquestionscore struct { } +func (u *Assessmentquestionscore) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentquestionscore + + + + return json.Marshal(&struct { + FailedKillQuestion *bool `json:"failedKillQuestion,omitempty"` + + Comments *string `json:"comments,omitempty"` + + QuestionId *string `json:"questionId,omitempty"` + + AnswerId *string `json:"answerId,omitempty"` + + Score *int `json:"score,omitempty"` + + MarkedNA *bool `json:"markedNA,omitempty"` + + FreeTextAnswer *string `json:"freeTextAnswer,omitempty"` + *Alias + }{ + FailedKillQuestion: u.FailedKillQuestion, + + Comments: u.Comments, + + QuestionId: u.QuestionId, + + AnswerId: u.AnswerId, + + Score: u.Score, + + MarkedNA: u.MarkedNA, + + FreeTextAnswer: u.FreeTextAnswer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentquestionscore) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assessmentscoringset.go b/platformclientv2/assessmentscoringset.go index 94822f71e..efad619a0 100644 --- a/platformclientv2/assessmentscoringset.go +++ b/platformclientv2/assessmentscoringset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Assessmentscoringset struct { } +func (u *Assessmentscoringset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assessmentscoringset + + + + return json.Marshal(&struct { + TotalScore *float32 `json:"totalScore,omitempty"` + + TotalCriticalScore *float32 `json:"totalCriticalScore,omitempty"` + + TotalNonCriticalScore *float32 `json:"totalNonCriticalScore,omitempty"` + + QuestionGroupScores *[]Assessmentquestiongroupscore `json:"questionGroupScores,omitempty"` + + FailureReasons *[]string `json:"failureReasons,omitempty"` + + Comments *string `json:"comments,omitempty"` + + AgentComments *string `json:"agentComments,omitempty"` + + IsPassed *bool `json:"isPassed,omitempty"` + *Alias + }{ + TotalScore: u.TotalScore, + + TotalCriticalScore: u.TotalCriticalScore, + + TotalNonCriticalScore: u.TotalNonCriticalScore, + + QuestionGroupScores: u.QuestionGroupScores, + + FailureReasons: u.FailureReasons, + + Comments: u.Comments, + + AgentComments: u.AgentComments, + + IsPassed: u.IsPassed, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assessmentscoringset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assignedwrapupcode.go b/platformclientv2/assignedwrapupcode.go index fe10b64c8..c80aa06c0 100644 --- a/platformclientv2/assignedwrapupcode.go +++ b/platformclientv2/assignedwrapupcode.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Assignedwrapupcode struct { } +func (u *Assignedwrapupcode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assignedwrapupcode + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assignedwrapupcode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/assignmentgroup.go b/platformclientv2/assignmentgroup.go index 50205d1b9..4ac56918b 100644 --- a/platformclientv2/assignmentgroup.go +++ b/platformclientv2/assignmentgroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Assignmentgroup struct { } +func (u *Assignmentgroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Assignmentgroup + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Assignmentgroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/asyncconversationquery.go b/platformclientv2/asyncconversationquery.go index c145884d4..e01005c1b 100644 --- a/platformclientv2/asyncconversationquery.go +++ b/platformclientv2/asyncconversationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Asyncconversationquery struct { } +func (u *Asyncconversationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Asyncconversationquery + + + + return json.Marshal(&struct { + ConversationFilters *[]Conversationdetailqueryfilter `json:"conversationFilters,omitempty"` + + SegmentFilters *[]Segmentdetailqueryfilter `json:"segmentFilters,omitempty"` + + EvaluationFilters *[]Evaluationdetailqueryfilter `json:"evaluationFilters,omitempty"` + + SurveyFilters *[]Surveydetailqueryfilter `json:"surveyFilters,omitempty"` + + ResolutionFilters *[]Resolutiondetailqueryfilter `json:"resolutionFilters,omitempty"` + + Order *string `json:"order,omitempty"` + + OrderBy *string `json:"orderBy,omitempty"` + + Interval *string `json:"interval,omitempty"` + + Limit *int `json:"limit,omitempty"` + + StartOfDayIntervalMatching *bool `json:"startOfDayIntervalMatching,omitempty"` + *Alias + }{ + ConversationFilters: u.ConversationFilters, + + SegmentFilters: u.SegmentFilters, + + EvaluationFilters: u.EvaluationFilters, + + SurveyFilters: u.SurveyFilters, + + ResolutionFilters: u.ResolutionFilters, + + Order: u.Order, + + OrderBy: u.OrderBy, + + Interval: u.Interval, + + Limit: u.Limit, + + StartOfDayIntervalMatching: u.StartOfDayIntervalMatching, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Asyncconversationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/asyncforecastoperationresult.go b/platformclientv2/asyncforecastoperationresult.go index 043e57bb7..a1ef6252e 100644 --- a/platformclientv2/asyncforecastoperationresult.go +++ b/platformclientv2/asyncforecastoperationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Asyncforecastoperationresult struct { } +func (u *Asyncforecastoperationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Asyncforecastoperationresult + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Bushorttermforecast `json:"result,omitempty"` + + Progress *int `json:"progress,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + + Progress: u.Progress, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Asyncforecastoperationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/asyncintradayresponse.go b/platformclientv2/asyncintradayresponse.go index 48755df2e..dfdbce3d5 100644 --- a/platformclientv2/asyncintradayresponse.go +++ b/platformclientv2/asyncintradayresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Asyncintradayresponse struct { } +func (u *Asyncintradayresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Asyncintradayresponse + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Buintradayresponse `json:"result,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Asyncintradayresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/asyncqueryresponse.go b/platformclientv2/asyncqueryresponse.go index 53e38cc05..ca15e3d5c 100644 --- a/platformclientv2/asyncqueryresponse.go +++ b/platformclientv2/asyncqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Asyncqueryresponse struct { } +func (u *Asyncqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Asyncqueryresponse + + + + return json.Marshal(&struct { + JobId *string `json:"jobId,omitempty"` + *Alias + }{ + JobId: u.JobId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Asyncqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/asyncquerystatus.go b/platformclientv2/asyncquerystatus.go index 661f2d245..867f7309b 100644 --- a/platformclientv2/asyncquerystatus.go +++ b/platformclientv2/asyncquerystatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,62 @@ type Asyncquerystatus struct { } +func (u *Asyncquerystatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Asyncquerystatus + + + ExpirationDate := new(string) + if u.ExpirationDate != nil { + + *ExpirationDate = timeutil.Strftime(u.ExpirationDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExpirationDate = nil + } + + SubmissionDate := new(string) + if u.SubmissionDate != nil { + + *SubmissionDate = timeutil.Strftime(u.SubmissionDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SubmissionDate = nil + } + + CompletionDate := new(string) + if u.CompletionDate != nil { + + *CompletionDate = timeutil.Strftime(u.CompletionDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CompletionDate = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + ExpirationDate *string `json:"expirationDate,omitempty"` + + SubmissionDate *string `json:"submissionDate,omitempty"` + + CompletionDate *string `json:"completionDate,omitempty"` + *Alias + }{ + State: u.State, + + ErrorMessage: u.ErrorMessage, + + ExpirationDate: ExpirationDate, + + SubmissionDate: SubmissionDate, + + CompletionDate: CompletionDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Asyncquerystatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/asyncuserdetailsquery.go b/platformclientv2/asyncuserdetailsquery.go index 59790ade7..70da286b3 100644 --- a/platformclientv2/asyncuserdetailsquery.go +++ b/platformclientv2/asyncuserdetailsquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Asyncuserdetailsquery struct { } +func (u *Asyncuserdetailsquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Asyncuserdetailsquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + UserFilters *[]Userdetailqueryfilter `json:"userFilters,omitempty"` + + PresenceFilters *[]Presencedetailqueryfilter `json:"presenceFilters,omitempty"` + + RoutingStatusFilters *[]Routingstatusdetailqueryfilter `json:"routingStatusFilters,omitempty"` + + Order *string `json:"order,omitempty"` + + Limit *int `json:"limit,omitempty"` + *Alias + }{ + Interval: u.Interval, + + UserFilters: u.UserFilters, + + PresenceFilters: u.PresenceFilters, + + RoutingStatusFilters: u.RoutingStatusFilters, + + Order: u.Order, + + Limit: u.Limit, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Asyncuserdetailsquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/attachment.go b/platformclientv2/attachment.go index 5f902fc62..bcdd120bb 100644 --- a/platformclientv2/attachment.go +++ b/platformclientv2/attachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Attachment struct { } +func (u *Attachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Attachment + + + + return json.Marshal(&struct { + AttachmentId *string `json:"attachmentId,omitempty"` + + Name *string `json:"name,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + InlineImage *bool `json:"inlineImage,omitempty"` + *Alias + }{ + AttachmentId: u.AttachmentId, + + Name: u.Name, + + ContentUri: u.ContentUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + InlineImage: u.InlineImage, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Attachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/attemptlimits.go b/platformclientv2/attemptlimits.go index a464997ec..68b3c2bf2 100644 --- a/platformclientv2/attemptlimits.go +++ b/platformclientv2/attemptlimits.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Attemptlimits struct { } +func (u *Attemptlimits) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Attemptlimits + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + MaxAttemptsPerContact *int `json:"maxAttemptsPerContact,omitempty"` + + MaxAttemptsPerNumber *int `json:"maxAttemptsPerNumber,omitempty"` + + TimeZoneId *string `json:"timeZoneId,omitempty"` + + ResetPeriod *string `json:"resetPeriod,omitempty"` + + RecallEntries *map[string]Recallentry `json:"recallEntries,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + MaxAttemptsPerContact: u.MaxAttemptsPerContact, + + MaxAttemptsPerNumber: u.MaxAttemptsPerNumber, + + TimeZoneId: u.TimeZoneId, + + ResetPeriod: u.ResetPeriod, + + RecallEntries: u.RecallEntries, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Attemptlimits) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/attemptlimitsentitylisting.go b/platformclientv2/attemptlimitsentitylisting.go index d0692446c..5897bc46e 100644 --- a/platformclientv2/attemptlimitsentitylisting.go +++ b/platformclientv2/attemptlimitsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Attemptlimitsentitylisting struct { } +func (u *Attemptlimitsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Attemptlimitsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Attemptlimits `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Attemptlimitsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/attendancestatus.go b/platformclientv2/attendancestatus.go index 9e5096fa3..e55969c8f 100644 --- a/platformclientv2/attendancestatus.go +++ b/platformclientv2/attendancestatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,33 @@ type Attendancestatus struct { } +func (u *Attendancestatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Attendancestatus + + + DateWorkday := new(string) + if u.DateWorkday != nil { + *DateWorkday = timeutil.Strftime(u.DateWorkday, "%Y-%m-%d") + } else { + DateWorkday = nil + } + + + return json.Marshal(&struct { + DateWorkday *string `json:"dateWorkday,omitempty"` + + AttendanceStatusType *string `json:"attendanceStatusType,omitempty"` + *Alias + }{ + DateWorkday: DateWorkday, + + AttendanceStatusType: u.AttendanceStatusType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Attendancestatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/attendancestatuslisting.go b/platformclientv2/attendancestatuslisting.go index f72d251d8..fe2d574da 100644 --- a/platformclientv2/attendancestatuslisting.go +++ b/platformclientv2/attendancestatuslisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Attendancestatuslisting struct { } +func (u *Attendancestatuslisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Attendancestatuslisting + + + + return json.Marshal(&struct { + Entities *[]Attendancestatus `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Attendancestatuslisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/attribute.go b/platformclientv2/attribute.go index 53fdcda53..c95ec58a5 100644 --- a/platformclientv2/attribute.go +++ b/platformclientv2/attribute.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Attribute struct { } +func (u *Attribute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Attribute + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + Description *string `json:"description,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + Description: u.Description, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Attribute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/attributefilteritem.go b/platformclientv2/attributefilteritem.go index 80db0b74f..0d7823543 100644 --- a/platformclientv2/attributefilteritem.go +++ b/platformclientv2/attributefilteritem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Attributefilteritem struct { } +func (u *Attributefilteritem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Attributefilteritem + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Id: u.Id, + + Operator: u.Operator, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Attributefilteritem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/atzmtimeslot.go b/platformclientv2/atzmtimeslot.go index de0e2d966..717294f22 100644 --- a/platformclientv2/atzmtimeslot.go +++ b/platformclientv2/atzmtimeslot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Atzmtimeslot struct { } +func (u *Atzmtimeslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Atzmtimeslot + + + + return json.Marshal(&struct { + EarliestCallableTime *string `json:"earliestCallableTime,omitempty"` + + LatestCallableTime *string `json:"latestCallableTime,omitempty"` + *Alias + }{ + EarliestCallableTime: u.EarliestCallableTime, + + LatestCallableTime: u.LatestCallableTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Atzmtimeslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/atzmtimeslotwithtimezone.go b/platformclientv2/atzmtimeslotwithtimezone.go index a8c34dea9..d3242b8e1 100644 --- a/platformclientv2/atzmtimeslotwithtimezone.go +++ b/platformclientv2/atzmtimeslotwithtimezone.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Atzmtimeslotwithtimezone struct { } +func (u *Atzmtimeslotwithtimezone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Atzmtimeslotwithtimezone + + + + return json.Marshal(&struct { + EarliestCallableTime *string `json:"earliestCallableTime,omitempty"` + + LatestCallableTime *string `json:"latestCallableTime,omitempty"` + + TimeZoneId *string `json:"timeZoneId,omitempty"` + *Alias + }{ + EarliestCallableTime: u.EarliestCallableTime, + + LatestCallableTime: u.LatestCallableTime, + + TimeZoneId: u.TimeZoneId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Atzmtimeslotwithtimezone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditchange.go b/platformclientv2/auditchange.go index 1b94edf73..4ca3f3c4c 100644 --- a/platformclientv2/auditchange.go +++ b/platformclientv2/auditchange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Auditchange struct { } +func (u *Auditchange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditchange + + + + return json.Marshal(&struct { + Property *string `json:"property,omitempty"` + + Entity *Auditentityreference `json:"entity,omitempty"` + + OldValues *[]string `json:"oldValues,omitempty"` + + NewValues *[]string `json:"newValues,omitempty"` + *Alias + }{ + Property: u.Property, + + Entity: u.Entity, + + OldValues: u.OldValues, + + NewValues: u.NewValues, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditchange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditentity.go b/platformclientv2/auditentity.go index ec5dce632..22c6e01ff 100644 --- a/platformclientv2/auditentity.go +++ b/platformclientv2/auditentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Auditentity struct { } +func (u *Auditentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditentity + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditentityreference.go b/platformclientv2/auditentityreference.go index 0ea9afc73..df75a239c 100644 --- a/platformclientv2/auditentityreference.go +++ b/platformclientv2/auditentityreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Auditentityreference struct { } +func (u *Auditentityreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditentityreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + VarType *string `json:"type,omitempty"` + + Action *string `json:"action,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + + VarType: u.VarType, + + Action: u.Action, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditentityreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditfacet.go b/platformclientv2/auditfacet.go index 3ef3cb538..cd8544742 100644 --- a/platformclientv2/auditfacet.go +++ b/platformclientv2/auditfacet.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Auditfacet struct { } +func (u *Auditfacet) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditfacet + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditfacet) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditfilter.go b/platformclientv2/auditfilter.go index f609694f4..673a1e555 100644 --- a/platformclientv2/auditfilter.go +++ b/platformclientv2/auditfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Auditfilter struct { } +func (u *Auditfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditfilter + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + + Operator: u.Operator, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditlogmessage.go b/platformclientv2/auditlogmessage.go index f9c179873..7b986bb5f 100644 --- a/platformclientv2/auditlogmessage.go +++ b/platformclientv2/auditlogmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Auditlogmessage struct { } +func (u *Auditlogmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditlogmessage + + + EventDate := new(string) + if u.EventDate != nil { + + *EventDate = timeutil.Strftime(u.EventDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UserHomeOrgId *string `json:"userHomeOrgId,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Client *Addressableentityref `json:"client,omitempty"` + + RemoteIp *[]string `json:"remoteIp,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + EventDate *string `json:"eventDate,omitempty"` + + Message *Messageinfo `json:"message,omitempty"` + + Action *string `json:"action,omitempty"` + + Entity *Domainentityref `json:"entity,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + + PropertyChanges *[]Propertychange `json:"propertyChanges,omitempty"` + + Context *map[string]string `json:"context,omitempty"` + *Alias + }{ + Id: u.Id, + + UserHomeOrgId: u.UserHomeOrgId, + + User: u.User, + + Client: u.Client, + + RemoteIp: u.RemoteIp, + + ServiceName: u.ServiceName, + + EventDate: EventDate, + + Message: u.Message, + + Action: u.Action, + + Entity: u.Entity, + + EntityType: u.EntityType, + + PropertyChanges: u.PropertyChanges, + + Context: u.Context, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditlogmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditmessage.go b/platformclientv2/auditmessage.go index d8054be8c..2d75110e1 100644 --- a/platformclientv2/auditmessage.go +++ b/platformclientv2/auditmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -72,6 +73,82 @@ type Auditmessage struct { } +func (u *Auditmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditmessage + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *Audituser `json:"user,omitempty"` + + CorrelationId *string `json:"correlationId,omitempty"` + + TransactionId *string `json:"transactionId,omitempty"` + + TransactionInitiator *bool `json:"transactionInitiator,omitempty"` + + Application *string `json:"application,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + Level *string `json:"level,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + ReceivedTimestamp *string `json:"receivedTimestamp,omitempty"` + + Status *string `json:"status,omitempty"` + + ActionContext *string `json:"actionContext,omitempty"` + + Action *string `json:"action,omitempty"` + + Changes *[]Change `json:"changes,omitempty"` + + Entity *Auditentity `json:"entity,omitempty"` + + ServiceContext *Servicecontext `json:"serviceContext,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + CorrelationId: u.CorrelationId, + + TransactionId: u.TransactionId, + + TransactionInitiator: u.TransactionInitiator, + + Application: u.Application, + + ServiceName: u.ServiceName, + + Level: u.Level, + + Timestamp: u.Timestamp, + + ReceivedTimestamp: u.ReceivedTimestamp, + + Status: u.Status, + + ActionContext: u.ActionContext, + + Action: u.Action, + + Changes: u.Changes, + + Entity: u.Entity, + + ServiceContext: u.ServiceContext, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryentity.go b/platformclientv2/auditqueryentity.go index b387ee684..c01d4ead0 100644 --- a/platformclientv2/auditqueryentity.go +++ b/platformclientv2/auditqueryentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Auditqueryentity struct { } +func (u *Auditqueryentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryentity + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Actions *[]string `json:"actions,omitempty"` + *Alias + }{ + Name: u.Name, + + Actions: u.Actions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryexecutionresultsresponse.go b/platformclientv2/auditqueryexecutionresultsresponse.go index 5add2e1d7..ae0cda1ce 100644 --- a/platformclientv2/auditqueryexecutionresultsresponse.go +++ b/platformclientv2/auditqueryexecutionresultsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Auditqueryexecutionresultsresponse struct { } +func (u *Auditqueryexecutionresultsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryexecutionresultsresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + Cursor *string `json:"cursor,omitempty"` + + Entities *[]Auditlogmessage `json:"entities,omitempty"` + *Alias + }{ + Id: u.Id, + + PageSize: u.PageSize, + + Cursor: u.Cursor, + + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryexecutionresultsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryexecutionstatusresponse.go b/platformclientv2/auditqueryexecutionstatusresponse.go index 5537d22b3..623baa858 100644 --- a/platformclientv2/auditqueryexecutionstatusresponse.go +++ b/platformclientv2/auditqueryexecutionstatusresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Auditqueryexecutionstatusresponse struct { } +func (u *Auditqueryexecutionstatusresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryexecutionstatusresponse + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + Interval *string `json:"interval,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + Filters *[]Auditqueryfilter `json:"filters,omitempty"` + + Sort *[]Auditquerysort `json:"sort,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + StartDate: StartDate, + + Interval: u.Interval, + + ServiceName: u.ServiceName, + + Filters: u.Filters, + + Sort: u.Sort, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryexecutionstatusresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryfilter.go b/platformclientv2/auditqueryfilter.go index 6e9c82307..d0e5a8e8c 100644 --- a/platformclientv2/auditqueryfilter.go +++ b/platformclientv2/auditqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Auditqueryfilter struct { } +func (u *Auditqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryfilter + + + + return json.Marshal(&struct { + Property *string `json:"property,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Property: u.Property, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryrequest.go b/platformclientv2/auditqueryrequest.go index 0fe2a8ce3..bf7a2cbfa 100644 --- a/platformclientv2/auditqueryrequest.go +++ b/platformclientv2/auditqueryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Auditqueryrequest struct { } +func (u *Auditqueryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryrequest + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + Filters *[]Auditqueryfilter `json:"filters,omitempty"` + + Sort *[]Auditquerysort `json:"sort,omitempty"` + *Alias + }{ + Interval: u.Interval, + + ServiceName: u.ServiceName, + + Filters: u.Filters, + + Sort: u.Sort, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryresponse.go b/platformclientv2/auditqueryresponse.go index 5daa50c32..aaecd7ea0 100644 --- a/platformclientv2/auditqueryresponse.go +++ b/platformclientv2/auditqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Auditqueryresponse type Auditqueryresponse struct { } +func (u *Auditqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryresponse + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryservice.go b/platformclientv2/auditqueryservice.go index 91d7c1dab..e9088ae09 100644 --- a/platformclientv2/auditqueryservice.go +++ b/platformclientv2/auditqueryservice.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Auditqueryservice struct { } +func (u *Auditqueryservice) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryservice + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Entities *[]Auditqueryentity `json:"entities,omitempty"` + *Alias + }{ + Name: u.Name, + + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryservice) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditqueryservicemapping.go b/platformclientv2/auditqueryservicemapping.go index 25c3e75b6..8b72c7bc3 100644 --- a/platformclientv2/auditqueryservicemapping.go +++ b/platformclientv2/auditqueryservicemapping.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Auditqueryservicemapping struct { } +func (u *Auditqueryservicemapping) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditqueryservicemapping + + + + return json.Marshal(&struct { + Services *[]Auditqueryservice `json:"services,omitempty"` + *Alias + }{ + Services: u.Services, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditqueryservicemapping) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditquerysort.go b/platformclientv2/auditquerysort.go index ce98ee13e..9d43e2afa 100644 --- a/platformclientv2/auditquerysort.go +++ b/platformclientv2/auditquerysort.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Auditquerysort struct { } +func (u *Auditquerysort) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditquerysort + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + SortOrder *string `json:"sortOrder,omitempty"` + *Alias + }{ + Name: u.Name, + + SortOrder: u.SortOrder, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditquerysort) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditrealtimequeryrequest.go b/platformclientv2/auditrealtimequeryrequest.go index 5b6d22250..eb4e75207 100644 --- a/platformclientv2/auditrealtimequeryrequest.go +++ b/platformclientv2/auditrealtimequeryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Auditrealtimequeryrequest struct { } +func (u *Auditrealtimequeryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditrealtimequeryrequest + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + Filters *[]Auditqueryfilter `json:"filters,omitempty"` + + Sort *[]Auditquerysort `json:"sort,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + *Alias + }{ + Interval: u.Interval, + + ServiceName: u.ServiceName, + + Filters: u.Filters, + + Sort: u.Sort, + + PageNumber: u.PageNumber, + + PageSize: u.PageSize, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditrealtimequeryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditrealtimequeryresultsresponse.go b/platformclientv2/auditrealtimequeryresultsresponse.go index 64786ba45..211302b55 100644 --- a/platformclientv2/auditrealtimequeryresultsresponse.go +++ b/platformclientv2/auditrealtimequeryresultsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Auditrealtimequeryresultsresponse struct { } +func (u *Auditrealtimequeryresultsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditrealtimequeryresultsresponse + + + + return json.Marshal(&struct { + Entities *[]Auditlogmessage `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditrealtimequeryresultsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/auditsearchresult.go b/platformclientv2/auditsearchresult.go index 1be72d2a2..73ee3e4c6 100644 --- a/platformclientv2/auditsearchresult.go +++ b/platformclientv2/auditsearchresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Auditsearchresult struct { } +func (u *Auditsearchresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Auditsearchresult + + + + return json.Marshal(&struct { + PageNumber *int `json:"pageNumber,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + FacetInfo *[]Facetinfo `json:"facetInfo,omitempty"` + + AuditMessages *[]Auditmessage `json:"auditMessages,omitempty"` + *Alias + }{ + PageNumber: u.PageNumber, + + PageSize: u.PageSize, + + Total: u.Total, + + PageCount: u.PageCount, + + FacetInfo: u.FacetInfo, + + AuditMessages: u.AuditMessages, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Auditsearchresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/audittopicaddressableentityref.go b/platformclientv2/audittopicaddressableentityref.go index 9e2ec6af0..dc38161e3 100644 --- a/platformclientv2/audittopicaddressableentityref.go +++ b/platformclientv2/audittopicaddressableentityref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Audittopicaddressableentityref struct { } +func (u *Audittopicaddressableentityref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Audittopicaddressableentityref + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Audittopicaddressableentityref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/audittopicauditlogmessage.go b/platformclientv2/audittopicauditlogmessage.go index 10fe8ee98..3af8eb312 100644 --- a/platformclientv2/audittopicauditlogmessage.go +++ b/platformclientv2/audittopicauditlogmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,86 @@ type Audittopicauditlogmessage struct { } +func (u *Audittopicauditlogmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Audittopicauditlogmessage + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UserId *string `json:"userId,omitempty"` + + UserHomeOrgId *string `json:"userHomeOrgId,omitempty"` + + Username *Audittopicdomainentityref `json:"username,omitempty"` + + UserDisplay *string `json:"userDisplay,omitempty"` + + ClientId *Audittopicaddressableentityref `json:"clientId,omitempty"` + + RemoteIp *[]string `json:"remoteIp,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + EventTime *string `json:"eventTime,omitempty"` + + Message *Audittopicmessageinfo `json:"message,omitempty"` + + Action *string `json:"action,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + + Entity *Audittopicdomainentityref `json:"entity,omitempty"` + + PropertyChanges *[]Audittopicpropertychange `json:"propertyChanges,omitempty"` + + Context *map[string]string `json:"context,omitempty"` + *Alias + }{ + Id: u.Id, + + UserId: u.UserId, + + UserHomeOrgId: u.UserHomeOrgId, + + Username: u.Username, + + UserDisplay: u.UserDisplay, + + ClientId: u.ClientId, + + RemoteIp: u.RemoteIp, + + ServiceName: u.ServiceName, + + EventTime: EventTime, + + Message: u.Message, + + Action: u.Action, + + EntityType: u.EntityType, + + Entity: u.Entity, + + PropertyChanges: u.PropertyChanges, + + Context: u.Context, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Audittopicauditlogmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/audittopicdomainentityref.go b/platformclientv2/audittopicdomainentityref.go index 8c01016de..5362b3bc6 100644 --- a/platformclientv2/audittopicdomainentityref.go +++ b/platformclientv2/audittopicdomainentityref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Audittopicdomainentityref struct { } +func (u *Audittopicdomainentityref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Audittopicdomainentityref + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Audittopicdomainentityref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/audittopicmessageinfo.go b/platformclientv2/audittopicmessageinfo.go index 81c80bbe0..6847b03aa 100644 --- a/platformclientv2/audittopicmessageinfo.go +++ b/platformclientv2/audittopicmessageinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Audittopicmessageinfo struct { } +func (u *Audittopicmessageinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Audittopicmessageinfo + + + + return json.Marshal(&struct { + LocalizableMessageCode *string `json:"localizableMessageCode,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + *Alias + }{ + LocalizableMessageCode: u.LocalizableMessageCode, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Audittopicmessageinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/audittopicpropertychange.go b/platformclientv2/audittopicpropertychange.go index 5178801ae..3df67950f 100644 --- a/platformclientv2/audittopicpropertychange.go +++ b/platformclientv2/audittopicpropertychange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Audittopicpropertychange struct { } +func (u *Audittopicpropertychange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Audittopicpropertychange + + + + return json.Marshal(&struct { + Property *string `json:"property,omitempty"` + + OldValues *[]string `json:"oldValues,omitempty"` + + NewValues *[]string `json:"newValues,omitempty"` + *Alias + }{ + Property: u.Property, + + OldValues: u.OldValues, + + NewValues: u.NewValues, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Audittopicpropertychange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/audituser.go b/platformclientv2/audituser.go index aa5e32be9..2b49c5c35 100644 --- a/platformclientv2/audituser.go +++ b/platformclientv2/audituser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Audituser struct { } +func (u *Audituser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Audituser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Display *string `json:"display,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Display: u.Display, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Audituser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authenticationsettings.go b/platformclientv2/authenticationsettings.go index 62c019ec9..ab8891562 100644 --- a/platformclientv2/authenticationsettings.go +++ b/platformclientv2/authenticationsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Authenticationsettings struct { } +func (u *Authenticationsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authenticationsettings + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + IntegrationId *string `json:"integrationId,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + IntegrationId: u.IntegrationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authenticationsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authzdivision.go b/platformclientv2/authzdivision.go index 5d9ff161b..345ca18a2 100644 --- a/platformclientv2/authzdivision.go +++ b/platformclientv2/authzdivision.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Authzdivision struct { } +func (u *Authzdivision) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authzdivision + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + HomeDivision *bool `json:"homeDivision,omitempty"` + + ObjectCounts *map[string]int `json:"objectCounts,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + HomeDivision: u.HomeDivision, + + ObjectCounts: u.ObjectCounts, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authzdivision) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authzdivisionentitylisting.go b/platformclientv2/authzdivisionentitylisting.go index 42d579d37..b153adca5 100644 --- a/platformclientv2/authzdivisionentitylisting.go +++ b/platformclientv2/authzdivisionentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Authzdivisionentitylisting struct { } +func (u *Authzdivisionentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authzdivisionentitylisting + + + + return json.Marshal(&struct { + Entities *[]Authzdivision `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authzdivisionentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authzdivisiongrantentitylisting.go b/platformclientv2/authzdivisiongrantentitylisting.go index 728379554..e6c71cb96 100644 --- a/platformclientv2/authzdivisiongrantentitylisting.go +++ b/platformclientv2/authzdivisiongrantentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Authzdivisiongrantentitylisting struct { } +func (u *Authzdivisiongrantentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authzdivisiongrantentitylisting + + + + return json.Marshal(&struct { + Entities *[]Authzgrant `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authzdivisiongrantentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authzgrant.go b/platformclientv2/authzgrant.go index 068865ae4..1b88e1b82 100644 --- a/platformclientv2/authzgrant.go +++ b/platformclientv2/authzgrant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Authzgrant struct { } +func (u *Authzgrant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authzgrant + + + GrantMadeAt := new(string) + if u.GrantMadeAt != nil { + + *GrantMadeAt = timeutil.Strftime(u.GrantMadeAt, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + GrantMadeAt = nil + } + + + return json.Marshal(&struct { + SubjectId *string `json:"subjectId,omitempty"` + + Division *Authzdivision `json:"division,omitempty"` + + Role *Authzgrantrole `json:"role,omitempty"` + + GrantMadeAt *string `json:"grantMadeAt,omitempty"` + *Alias + }{ + SubjectId: u.SubjectId, + + Division: u.Division, + + Role: u.Role, + + GrantMadeAt: GrantMadeAt, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authzgrant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authzgrantpolicy.go b/platformclientv2/authzgrantpolicy.go index b9595ab11..288eb828b 100644 --- a/platformclientv2/authzgrantpolicy.go +++ b/platformclientv2/authzgrantpolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Authzgrantpolicy struct { } +func (u *Authzgrantpolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authzgrantpolicy + + + + return json.Marshal(&struct { + Actions *[]string `json:"actions,omitempty"` + + Condition *string `json:"condition,omitempty"` + + Domain *string `json:"domain,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Condition: u.Condition, + + Domain: u.Domain, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authzgrantpolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authzgrantrole.go b/platformclientv2/authzgrantrole.go index 48b90a01b..f8d54ac50 100644 --- a/platformclientv2/authzgrantrole.go +++ b/platformclientv2/authzgrantrole.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Authzgrantrole struct { } +func (u *Authzgrantrole) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authzgrantrole + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Policies *[]Authzgrantpolicy `json:"policies,omitempty"` + + VarDefault *bool `json:"default,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Policies: u.Policies, + + VarDefault: u.VarDefault, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authzgrantrole) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/authzsubject.go b/platformclientv2/authzsubject.go index 0a6c3f8ef..36b7dad3b 100644 --- a/platformclientv2/authzsubject.go +++ b/platformclientv2/authzsubject.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Authzsubject struct { } +func (u *Authzsubject) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Authzsubject + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Grants *[]Authzgrant `json:"grants,omitempty"` + + Version *int `json:"version,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Grants: u.Grants, + + Version: u.Version, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Authzsubject) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/automatictimezonemappingsettings.go b/platformclientv2/automatictimezonemappingsettings.go index 811799f2c..4a58bb80c 100644 --- a/platformclientv2/automatictimezonemappingsettings.go +++ b/platformclientv2/automatictimezonemappingsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Automatictimezonemappingsettings struct { } +func (u *Automatictimezonemappingsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Automatictimezonemappingsettings + + + + return json.Marshal(&struct { + CallableWindows *[]Callablewindow `json:"callableWindows,omitempty"` + *Alias + }{ + CallableWindows: u.CallableWindows, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Automatictimezonemappingsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/availablelanguagelist.go b/platformclientv2/availablelanguagelist.go index bbcead9f8..018e3fdea 100644 --- a/platformclientv2/availablelanguagelist.go +++ b/platformclientv2/availablelanguagelist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Availablelanguagelist struct { } +func (u *Availablelanguagelist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Availablelanguagelist + + + + return json.Marshal(&struct { + Languages *[]string `json:"languages,omitempty"` + *Alias + }{ + Languages: u.Languages, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Availablelanguagelist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/availabletime.go b/platformclientv2/availabletime.go index e4f5e2fbb..4d1b4e227 100644 --- a/platformclientv2/availabletime.go +++ b/platformclientv2/availabletime.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Availabletime struct { } +func (u *Availabletime) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Availabletime + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + DateStart *string `json:"dateStart,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + IsPaid *bool `json:"isPaid,omitempty"` + + ActivityCategory *string `json:"activityCategory,omitempty"` + + WfmSchedule *Wfmschedulereference `json:"wfmSchedule,omitempty"` + *Alias + }{ + DateStart: DateStart, + + LengthInMinutes: u.LengthInMinutes, + + IsPaid: u.IsPaid, + + ActivityCategory: u.ActivityCategory, + + WfmSchedule: u.WfmSchedule, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Availabletime) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/availabletopic.go b/platformclientv2/availabletopic.go index 5a246ef03..68164e207 100644 --- a/platformclientv2/availabletopic.go +++ b/platformclientv2/availabletopic.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -60,6 +61,70 @@ type Availabletopic struct { } +func (u *Availabletopic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Availabletopic + + + + return json.Marshal(&struct { + Description *string `json:"description,omitempty"` + + Id *string `json:"id,omitempty"` + + PermissionDetails *[]Permissiondetails `json:"permissionDetails,omitempty"` + + RequiresPermissions *[]string `json:"requiresPermissions,omitempty"` + + RequiresDivisionPermissions *bool `json:"requiresDivisionPermissions,omitempty"` + + RequiresAnyValidator *bool `json:"requiresAnyValidator,omitempty"` + + Enforced *bool `json:"enforced,omitempty"` + + Visibility *string `json:"visibility,omitempty"` + + Schema *map[string]interface{} `json:"schema,omitempty"` + + RequiresCurrentUser *bool `json:"requiresCurrentUser,omitempty"` + + RequiresCurrentUserOrPermission *bool `json:"requiresCurrentUserOrPermission,omitempty"` + + Transports *[]string `json:"transports,omitempty"` + + PublicApiTemplateUriPaths *[]string `json:"publicApiTemplateUriPaths,omitempty"` + *Alias + }{ + Description: u.Description, + + Id: u.Id, + + PermissionDetails: u.PermissionDetails, + + RequiresPermissions: u.RequiresPermissions, + + RequiresDivisionPermissions: u.RequiresDivisionPermissions, + + RequiresAnyValidator: u.RequiresAnyValidator, + + Enforced: u.Enforced, + + Visibility: u.Visibility, + + Schema: u.Schema, + + RequiresCurrentUser: u.RequiresCurrentUser, + + RequiresCurrentUserOrPermission: u.RequiresCurrentUserOrPermission, + + Transports: u.Transports, + + PublicApiTemplateUriPaths: u.PublicApiTemplateUriPaths, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Availabletopic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/availabletopicentitylisting.go b/platformclientv2/availabletopicentitylisting.go index 06eb24b50..7cd193a77 100644 --- a/platformclientv2/availabletopicentitylisting.go +++ b/platformclientv2/availabletopicentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Availabletopicentitylisting struct { } +func (u *Availabletopicentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Availabletopicentitylisting + + + + return json.Marshal(&struct { + Entities *[]Availabletopic `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Availabletopicentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/availabletranslations.go b/platformclientv2/availabletranslations.go index 0c6945706..2171e899e 100644 --- a/platformclientv2/availabletranslations.go +++ b/platformclientv2/availabletranslations.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Availabletranslations struct { } +func (u *Availabletranslations) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Availabletranslations + + + + return json.Marshal(&struct { + OrgSpecific *[]string `json:"orgSpecific,omitempty"` + + Builtin *[]string `json:"builtin,omitempty"` + *Alias + }{ + OrgSpecific: u.OrgSpecific, + + Builtin: u.Builtin, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Availabletranslations) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/baseprogramentity.go b/platformclientv2/baseprogramentity.go index 71250540e..b22074699 100644 --- a/platformclientv2/baseprogramentity.go +++ b/platformclientv2/baseprogramentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Baseprogramentity struct { } +func (u *Baseprogramentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Baseprogramentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Baseprogramentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/basetopicentitiy.go b/platformclientv2/basetopicentitiy.go index 234e3c601..1d3fde3f1 100644 --- a/platformclientv2/basetopicentitiy.go +++ b/platformclientv2/basetopicentitiy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Basetopicentitiy struct { } +func (u *Basetopicentitiy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Basetopicentitiy + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Basetopicentitiy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/batchdownloadjobresult.go b/platformclientv2/batchdownloadjobresult.go index 97698affe..a7b305b08 100644 --- a/platformclientv2/batchdownloadjobresult.go +++ b/platformclientv2/batchdownloadjobresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Batchdownloadjobresult struct { } +func (u *Batchdownloadjobresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Batchdownloadjobresult + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + ResultUrl *string `json:"resultUrl,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ErrorMsg *string `json:"errorMsg,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ConversationId: u.ConversationId, + + RecordingId: u.RecordingId, + + ResultUrl: u.ResultUrl, + + ContentType: u.ContentType, + + ErrorMsg: u.ErrorMsg, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Batchdownloadjobresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/batchdownloadjobstatusresult.go b/platformclientv2/batchdownloadjobstatusresult.go index dc3bbd09c..94e95c4e8 100644 --- a/platformclientv2/batchdownloadjobstatusresult.go +++ b/platformclientv2/batchdownloadjobstatusresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Batchdownloadjobstatusresult struct { } +func (u *Batchdownloadjobstatusresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Batchdownloadjobstatusresult + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + JobId *string `json:"jobId,omitempty"` + + ExpectedResultCount *int `json:"expectedResultCount,omitempty"` + + ResultCount *int `json:"resultCount,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + Results *[]Batchdownloadjobresult `json:"results,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + JobId: u.JobId, + + ExpectedResultCount: u.ExpectedResultCount, + + ResultCount: u.ResultCount, + + ErrorCount: u.ErrorCount, + + Results: u.Results, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Batchdownloadjobstatusresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/batchdownloadjobsubmission.go b/platformclientv2/batchdownloadjobsubmission.go index ba1140692..672bb241c 100644 --- a/platformclientv2/batchdownloadjobsubmission.go +++ b/platformclientv2/batchdownloadjobsubmission.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Batchdownloadjobsubmission struct { } +func (u *Batchdownloadjobsubmission) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Batchdownloadjobsubmission + + + + return json.Marshal(&struct { + BatchDownloadRequestList *[]Batchdownloadrequest `json:"batchDownloadRequestList,omitempty"` + *Alias + }{ + BatchDownloadRequestList: u.BatchDownloadRequestList, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Batchdownloadjobsubmission) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/batchdownloadjobsubmissionresult.go b/platformclientv2/batchdownloadjobsubmissionresult.go index 390ebd5c1..b9a68cf45 100644 --- a/platformclientv2/batchdownloadjobsubmissionresult.go +++ b/platformclientv2/batchdownloadjobsubmissionresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Batchdownloadjobsubmissionresult struct { } +func (u *Batchdownloadjobsubmissionresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Batchdownloadjobsubmissionresult + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Batchdownloadjobsubmissionresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/batchdownloadrequest.go b/platformclientv2/batchdownloadrequest.go index 49426246a..da5dd3700 100644 --- a/platformclientv2/batchdownloadrequest.go +++ b/platformclientv2/batchdownloadrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Batchdownloadrequest struct { } +func (u *Batchdownloadrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Batchdownloadrequest + + + + return json.Marshal(&struct { + ConversationId *string `json:"conversationId,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + *Alias + }{ + ConversationId: u.ConversationId, + + RecordingId: u.RecordingId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Batchdownloadrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/benefitassessment.go b/platformclientv2/benefitassessment.go index bca880a3d..346a5ebdb 100644 --- a/platformclientv2/benefitassessment.go +++ b/platformclientv2/benefitassessment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Benefitassessment struct { } +func (u *Benefitassessment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Benefitassessment + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Queues *[]Addressableentityref `json:"queues,omitempty"` + + KpiAssessments *[]Keyperformanceindicatorassessment `json:"kpiAssessments,omitempty"` + + State *string `json:"state,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Queues: u.Queues, + + KpiAssessments: u.KpiAssessments, + + State: u.State, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Benefitassessment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/benefitassessmentjob.go b/platformclientv2/benefitassessmentjob.go index 7e12c82c6..c26c82954 100644 --- a/platformclientv2/benefitassessmentjob.go +++ b/platformclientv2/benefitassessmentjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Benefitassessmentjob struct { } +func (u *Benefitassessmentjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Benefitassessmentjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Benefitassessmentjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/billingusage.go b/platformclientv2/billingusage.go index 03a9ab733..904575942 100644 --- a/platformclientv2/billingusage.go +++ b/platformclientv2/billingusage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Billingusage struct { } +func (u *Billingusage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Billingusage + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + TotalUsage *string `json:"totalUsage,omitempty"` + + Resources *[]Billingusageresource `json:"resources,omitempty"` + *Alias + }{ + Name: u.Name, + + TotalUsage: u.TotalUsage, + + Resources: u.Resources, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Billingusage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/billingusagereport.go b/platformclientv2/billingusagereport.go index e5d67d613..9a6e6b46e 100644 --- a/platformclientv2/billingusagereport.go +++ b/platformclientv2/billingusagereport.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Billingusagereport struct { } +func (u *Billingusagereport) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Billingusagereport + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + Status *string `json:"status,omitempty"` + + Usages *[]Billingusage `json:"usages,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + StartDate: StartDate, + + EndDate: EndDate, + + Status: u.Status, + + Usages: u.Usages, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Billingusagereport) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/billingusageresource.go b/platformclientv2/billingusageresource.go index 3f3bdf923..398018e15 100644 --- a/platformclientv2/billingusageresource.go +++ b/platformclientv2/billingusageresource.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Billingusageresource struct { } +func (u *Billingusageresource) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Billingusageresource + + + Date := new(string) + if u.Date != nil { + + *Date = timeutil.Strftime(u.Date, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Date = nil + } + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Date *string `json:"date,omitempty"` + *Alias + }{ + Name: u.Name, + + Date: Date, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Billingusageresource) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/biography.go b/platformclientv2/biography.go index dc68bebe6..e6e840abc 100644 --- a/platformclientv2/biography.go +++ b/platformclientv2/biography.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Biography struct { } +func (u *Biography) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Biography + + + + return json.Marshal(&struct { + Biography *string `json:"biography,omitempty"` + + Interests *[]string `json:"interests,omitempty"` + + Hobbies *[]string `json:"hobbies,omitempty"` + + Spouse *string `json:"spouse,omitempty"` + + Education *[]Education `json:"education,omitempty"` + *Alias + }{ + Biography: u.Biography, + + Interests: u.Interests, + + Hobbies: u.Hobbies, + + Spouse: u.Spouse, + + Education: u.Education, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Biography) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botaggregatedatacontainer.go b/platformclientv2/botaggregatedatacontainer.go index a5b2d2e65..d66cf1483 100644 --- a/platformclientv2/botaggregatedatacontainer.go +++ b/platformclientv2/botaggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Botaggregatedatacontainer struct { } +func (u *Botaggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botaggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botaggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botaggregatequeryclause.go b/platformclientv2/botaggregatequeryclause.go index fcbee544c..a17b3e987 100644 --- a/platformclientv2/botaggregatequeryclause.go +++ b/platformclientv2/botaggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Botaggregatequeryclause struct { } +func (u *Botaggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botaggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Botaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botaggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botaggregatequeryfilter.go b/platformclientv2/botaggregatequeryfilter.go index 6fad73031..21e3791fc 100644 --- a/platformclientv2/botaggregatequeryfilter.go +++ b/platformclientv2/botaggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Botaggregatequeryfilter struct { } +func (u *Botaggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botaggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Botaggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Botaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botaggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botaggregatequerypredicate.go b/platformclientv2/botaggregatequerypredicate.go index 38a903d31..943ef6b23 100644 --- a/platformclientv2/botaggregatequerypredicate.go +++ b/platformclientv2/botaggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Botaggregatequerypredicate struct { } +func (u *Botaggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botaggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botaggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botaggregatequeryresponse.go b/platformclientv2/botaggregatequeryresponse.go index 6504323fa..922af1c66 100644 --- a/platformclientv2/botaggregatequeryresponse.go +++ b/platformclientv2/botaggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Botaggregatequeryresponse struct { } +func (u *Botaggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botaggregatequeryresponse + + + + return json.Marshal(&struct { + Results *[]Botaggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botaggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botaggregationquery.go b/platformclientv2/botaggregationquery.go index 94697c1f3..e8e348482 100644 --- a/platformclientv2/botaggregationquery.go +++ b/platformclientv2/botaggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Botaggregationquery struct { } +func (u *Botaggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botaggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Botaggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Botaggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botaggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botaggregationview.go b/platformclientv2/botaggregationview.go index 92408eec7..0e345d063 100644 --- a/platformclientv2/botaggregationview.go +++ b/platformclientv2/botaggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Botaggregationview struct { } +func (u *Botaggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botaggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botaggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botconnectorbot.go b/platformclientv2/botconnectorbot.go index 6f61d2bc2..ba3ec8d5a 100644 --- a/platformclientv2/botconnectorbot.go +++ b/platformclientv2/botconnectorbot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Botconnectorbot struct { } +func (u *Botconnectorbot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botconnectorbot + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Versions *[]Botconnectorbotversion `json:"versions,omitempty"` + + BotCompositeTag *string `json:"botCompositeTag,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Versions: u.Versions, + + BotCompositeTag: u.BotCompositeTag, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botconnectorbot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botconnectorbotsummaryentitylisting.go b/platformclientv2/botconnectorbotsummaryentitylisting.go index aae14da06..b0d0d5d2a 100644 --- a/platformclientv2/botconnectorbotsummaryentitylisting.go +++ b/platformclientv2/botconnectorbotsummaryentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Botconnectorbotsummaryentitylisting struct { } +func (u *Botconnectorbotsummaryentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botconnectorbotsummaryentitylisting + + + + return json.Marshal(&struct { + Entities *[]Botsummary `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botconnectorbotsummaryentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botconnectorbotversion.go b/platformclientv2/botconnectorbotversion.go index 94cdc572e..59ad7b410 100644 --- a/platformclientv2/botconnectorbotversion.go +++ b/platformclientv2/botconnectorbotversion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Botconnectorbotversion struct { } +func (u *Botconnectorbotversion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botconnectorbotversion + + + + return json.Marshal(&struct { + Version *string `json:"version,omitempty"` + + SupportedLanguages *[]string `json:"supportedLanguages,omitempty"` + + Intents *[]Botintent `json:"intents,omitempty"` + *Alias + }{ + Version: u.Version, + + SupportedLanguages: u.SupportedLanguages, + + Intents: u.Intents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botconnectorbotversion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botconnectorbotversionsummaryentitylisting.go b/platformclientv2/botconnectorbotversionsummaryentitylisting.go index b98cd0e15..dbc5bfbc5 100644 --- a/platformclientv2/botconnectorbotversionsummaryentitylisting.go +++ b/platformclientv2/botconnectorbotversionsummaryentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Botconnectorbotversionsummaryentitylisting struct { } +func (u *Botconnectorbotversionsummaryentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botconnectorbotversionsummaryentitylisting + + + + return json.Marshal(&struct { + Entities *[]Botversionsummary `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botconnectorbotversionsummaryentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botintent.go b/platformclientv2/botintent.go index 3d0027d80..6352a3f31 100644 --- a/platformclientv2/botintent.go +++ b/platformclientv2/botintent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Botintent struct { } +func (u *Botintent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botintent + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Slots *map[string]Botslot `json:"slots,omitempty"` + *Alias + }{ + Name: u.Name, + + Slots: u.Slots, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botintent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botlist.go b/platformclientv2/botlist.go index d7422925c..a4f28cf6f 100644 --- a/platformclientv2/botlist.go +++ b/platformclientv2/botlist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Botlist struct { } +func (u *Botlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botlist + + + + return json.Marshal(&struct { + ChatBots *[]Botconnectorbot `json:"chatBots,omitempty"` + *Alias + }{ + ChatBots: u.ChatBots, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botslot.go b/platformclientv2/botslot.go index 39934e15c..c2b7f7f5c 100644 --- a/platformclientv2/botslot.go +++ b/platformclientv2/botslot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Botslot struct { } +func (u *Botslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botslot + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botsummary.go b/platformclientv2/botsummary.go index d7281566c..c35cc3b41 100644 --- a/platformclientv2/botsummary.go +++ b/platformclientv2/botsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Botsummary struct { } +func (u *Botsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botsummary + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + + Description *string `json:"description,omitempty"` + + BotCompositeTag *string `json:"botCompositeTag,omitempty"` + *Alias + }{ + Name: u.Name, + + Id: u.Id, + + Description: u.Description, + + BotCompositeTag: u.BotCompositeTag, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/botversionsummary.go b/platformclientv2/botversionsummary.go index a9ee91aab..545697f29 100644 --- a/platformclientv2/botversionsummary.go +++ b/platformclientv2/botversionsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Botversionsummary struct { } +func (u *Botversionsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Botversionsummary + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + + Description *string `json:"description,omitempty"` + + BotCompositeTag *string `json:"botCompositeTag,omitempty"` + + Version *string `json:"version,omitempty"` + *Alias + }{ + Name: u.Name, + + Id: u.Id, + + Description: u.Description, + + BotCompositeTag: u.BotCompositeTag, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Botversionsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buabandonrate.go b/platformclientv2/buabandonrate.go index c8a8392b8..f744e8143 100644 --- a/platformclientv2/buabandonrate.go +++ b/platformclientv2/buabandonrate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buabandonrate struct { } +func (u *Buabandonrate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buabandonrate + + + + return json.Marshal(&struct { + Include *bool `json:"include,omitempty"` + + Percent *int `json:"percent,omitempty"` + *Alias + }{ + Include: u.Include, + + Percent: u.Percent, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buabandonrate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentscheduleactivity.go b/platformclientv2/buagentscheduleactivity.go index 289a48c9d..10188698d 100644 --- a/platformclientv2/buagentscheduleactivity.go +++ b/platformclientv2/buagentscheduleactivity.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Buagentscheduleactivity struct { } +func (u *Buagentscheduleactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentscheduleactivity + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + LengthMinutes *int `json:"lengthMinutes,omitempty"` + + Description *string `json:"description,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Paid *bool `json:"paid,omitempty"` + + TimeOffRequestId *string `json:"timeOffRequestId,omitempty"` + + ExternalActivityId *string `json:"externalActivityId,omitempty"` + + ExternalActivityType *string `json:"externalActivityType,omitempty"` + *Alias + }{ + StartDate: StartDate, + + LengthMinutes: u.LengthMinutes, + + Description: u.Description, + + ActivityCodeId: u.ActivityCodeId, + + Paid: u.Paid, + + TimeOffRequestId: u.TimeOffRequestId, + + ExternalActivityId: u.ExternalActivityId, + + ExternalActivityType: u.ExternalActivityType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentscheduleactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulehistorychange.go b/platformclientv2/buagentschedulehistorychange.go index b19540e21..0d4d2cae5 100644 --- a/platformclientv2/buagentschedulehistorychange.go +++ b/platformclientv2/buagentschedulehistorychange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Buagentschedulehistorychange struct { } +func (u *Buagentschedulehistorychange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulehistorychange + + + + return json.Marshal(&struct { + Metadata *Buagentschedulehistorychangemetadata `json:"metadata,omitempty"` + + Shifts *[]Buagentscheduleshift `json:"shifts,omitempty"` + + FullDayTimeOffMarkers *[]Bufulldaytimeoffmarker `json:"fullDayTimeOffMarkers,omitempty"` + + Deletes *Buagentschedulehistorydeletedchange `json:"deletes,omitempty"` + *Alias + }{ + Metadata: u.Metadata, + + Shifts: u.Shifts, + + FullDayTimeOffMarkers: u.FullDayTimeOffMarkers, + + Deletes: u.Deletes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulehistorychange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulehistorychangemetadata.go b/platformclientv2/buagentschedulehistorychangemetadata.go index 76e6b66e4..8be0dfbab 100644 --- a/platformclientv2/buagentschedulehistorychangemetadata.go +++ b/platformclientv2/buagentschedulehistorychangemetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Buagentschedulehistorychangemetadata struct { } +func (u *Buagentschedulehistorychangemetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulehistorychangemetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + *Alias + }{ + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulehistorychangemetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulehistorydeletedchange.go b/platformclientv2/buagentschedulehistorydeletedchange.go index c2571f54e..6531f6213 100644 --- a/platformclientv2/buagentschedulehistorydeletedchange.go +++ b/platformclientv2/buagentschedulehistorydeletedchange.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,30 @@ type Buagentschedulehistorydeletedchange struct { } +func (u *Buagentschedulehistorydeletedchange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulehistorydeletedchange + + + + return json.Marshal(&struct { + ShiftIds *[]string `json:"shiftIds,omitempty"` + + FullDayTimeOffMarkerDates *[]time.Time `json:"fullDayTimeOffMarkerDates,omitempty"` + + AgentSchedule *bool `json:"agentSchedule,omitempty"` + *Alias + }{ + ShiftIds: u.ShiftIds, + + FullDayTimeOffMarkerDates: u.FullDayTimeOffMarkerDates, + + AgentSchedule: u.AgentSchedule, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulehistorydeletedchange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulehistorydroppedchange.go b/platformclientv2/buagentschedulehistorydroppedchange.go index 516a752ff..167825fd0 100644 --- a/platformclientv2/buagentschedulehistorydroppedchange.go +++ b/platformclientv2/buagentschedulehistorydroppedchange.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,34 @@ type Buagentschedulehistorydroppedchange struct { } +func (u *Buagentschedulehistorydroppedchange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulehistorydroppedchange + + + + return json.Marshal(&struct { + Metadata *Buagentschedulehistorychangemetadata `json:"metadata,omitempty"` + + ShiftIds *[]string `json:"shiftIds,omitempty"` + + FullDayTimeOffMarkerDates *[]time.Time `json:"fullDayTimeOffMarkerDates,omitempty"` + + Deletes *Buagentschedulehistorydeletedchange `json:"deletes,omitempty"` + *Alias + }{ + Metadata: u.Metadata, + + ShiftIds: u.ShiftIds, + + FullDayTimeOffMarkerDates: u.FullDayTimeOffMarkerDates, + + Deletes: u.Deletes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulehistorydroppedchange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulehistoryresponse.go b/platformclientv2/buagentschedulehistoryresponse.go index cd5c4b482..31af12717 100644 --- a/platformclientv2/buagentschedulehistoryresponse.go +++ b/platformclientv2/buagentschedulehistoryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Buagentschedulehistoryresponse struct { } +func (u *Buagentschedulehistoryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulehistoryresponse + + + + return json.Marshal(&struct { + PriorPublishedSchedules *[]Buschedulereference `json:"priorPublishedSchedules,omitempty"` + + BasePublishedSchedule *Buagentschedulehistorychange `json:"basePublishedSchedule,omitempty"` + + DroppedChanges *[]Buagentschedulehistorydroppedchange `json:"droppedChanges,omitempty"` + + Changes *[]Buagentschedulehistorychange `json:"changes,omitempty"` + *Alias + }{ + PriorPublishedSchedules: u.PriorPublishedSchedules, + + BasePublishedSchedule: u.BasePublishedSchedule, + + DroppedChanges: u.DroppedChanges, + + Changes: u.Changes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulehistoryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulepublishedschedulereference.go b/platformclientv2/buagentschedulepublishedschedulereference.go index 23c519865..435b9604f 100644 --- a/platformclientv2/buagentschedulepublishedschedulereference.go +++ b/platformclientv2/buagentschedulepublishedschedulereference.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,41 @@ type Buagentschedulepublishedschedulereference struct { } +func (u *Buagentschedulepublishedschedulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulepublishedschedulereference + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + WeekCount: u.WeekCount, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulepublishedschedulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulequeryresponse.go b/platformclientv2/buagentschedulequeryresponse.go index ad60a5753..bc788f8d5 100644 --- a/platformclientv2/buagentschedulequeryresponse.go +++ b/platformclientv2/buagentschedulequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Buagentschedulequeryresponse struct { } +func (u *Buagentschedulequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulequeryresponse + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + Shifts *[]Buagentscheduleshift `json:"shifts,omitempty"` + + FullDayTimeOffMarkers *[]Bufulldaytimeoffmarker `json:"fullDayTimeOffMarkers,omitempty"` + + WorkPlan *Workplanreference `json:"workPlan,omitempty"` + + WorkPlansPerWeek *[]Workplanreference `json:"workPlansPerWeek,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + User: u.User, + + Shifts: u.Shifts, + + FullDayTimeOffMarkers: u.FullDayTimeOffMarkers, + + WorkPlan: u.WorkPlan, + + WorkPlansPerWeek: u.WorkPlansPerWeek, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulerescheduleresponse.go b/platformclientv2/buagentschedulerescheduleresponse.go index 65e21453c..16067e7a1 100644 --- a/platformclientv2/buagentschedulerescheduleresponse.go +++ b/platformclientv2/buagentschedulerescheduleresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Buagentschedulerescheduleresponse struct { } +func (u *Buagentschedulerescheduleresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulerescheduleresponse + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + Shifts *[]Buagentscheduleshift `json:"shifts,omitempty"` + + FullDayTimeOffMarkers *[]Bufulldaytimeoffmarker `json:"fullDayTimeOffMarkers,omitempty"` + + WorkPlan *Workplanreference `json:"workPlan,omitempty"` + + WorkPlansPerWeek *[]Workplanreference `json:"workPlansPerWeek,omitempty"` + *Alias + }{ + User: u.User, + + Shifts: u.Shifts, + + FullDayTimeOffMarkers: u.FullDayTimeOffMarkers, + + WorkPlan: u.WorkPlan, + + WorkPlansPerWeek: u.WorkPlansPerWeek, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulerescheduleresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulesearchresponse.go b/platformclientv2/buagentschedulesearchresponse.go index 39968c325..92a7ea3e5 100644 --- a/platformclientv2/buagentschedulesearchresponse.go +++ b/platformclientv2/buagentschedulesearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buagentschedulesearchresponse struct { } +func (u *Buagentschedulesearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulesearchresponse + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + Shifts *[]Buagentscheduleshift `json:"shifts,omitempty"` + + FullDayTimeOffMarkers *[]Bufulldaytimeoffmarker `json:"fullDayTimeOffMarkers,omitempty"` + *Alias + }{ + User: u.User, + + Shifts: u.Shifts, + + FullDayTimeOffMarkers: u.FullDayTimeOffMarkers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulesearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentscheduleshift.go b/platformclientv2/buagentscheduleshift.go index 454549858..e6b3060c2 100644 --- a/platformclientv2/buagentscheduleshift.go +++ b/platformclientv2/buagentscheduleshift.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Buagentscheduleshift struct { } +func (u *Buagentscheduleshift) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentscheduleshift + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + LengthMinutes *int `json:"lengthMinutes,omitempty"` + + Activities *[]Buagentscheduleactivity `json:"activities,omitempty"` + + ManuallyEdited *bool `json:"manuallyEdited,omitempty"` + + Schedule *Buschedulereference `json:"schedule,omitempty"` + *Alias + }{ + Id: u.Id, + + StartDate: StartDate, + + LengthMinutes: u.LengthMinutes, + + Activities: u.Activities, + + ManuallyEdited: u.ManuallyEdited, + + Schedule: u.Schedule, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentscheduleshift) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulesqueryresponse.go b/platformclientv2/buagentschedulesqueryresponse.go index 8ac955757..a43750267 100644 --- a/platformclientv2/buagentschedulesqueryresponse.go +++ b/platformclientv2/buagentschedulesqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buagentschedulesqueryresponse struct { } +func (u *Buagentschedulesqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulesqueryresponse + + + + return json.Marshal(&struct { + AgentSchedules *[]Buagentschedulequeryresponse `json:"agentSchedules,omitempty"` + + BusinessUnitTimeZone *string `json:"businessUnitTimeZone,omitempty"` + *Alias + }{ + AgentSchedules: u.AgentSchedules, + + BusinessUnitTimeZone: u.BusinessUnitTimeZone, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulesqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentschedulessearchresponse.go b/platformclientv2/buagentschedulessearchresponse.go index bdff45dde..9dcdf2b84 100644 --- a/platformclientv2/buagentschedulessearchresponse.go +++ b/platformclientv2/buagentschedulessearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buagentschedulessearchresponse struct { } +func (u *Buagentschedulessearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentschedulessearchresponse + + + + return json.Marshal(&struct { + AgentSchedules *[]Buagentschedulesearchresponse `json:"agentSchedules,omitempty"` + + BusinessUnitTimeZone *string `json:"businessUnitTimeZone,omitempty"` + + PublishedSchedules *[]Buagentschedulepublishedschedulereference `json:"publishedSchedules,omitempty"` + *Alias + }{ + AgentSchedules: u.AgentSchedules, + + BusinessUnitTimeZone: u.BusinessUnitTimeZone, + + PublishedSchedules: u.PublishedSchedules, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentschedulessearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buagentscheduleupdate.go b/platformclientv2/buagentscheduleupdate.go index b9dd80bce..5d698be06 100644 --- a/platformclientv2/buagentscheduleupdate.go +++ b/platformclientv2/buagentscheduleupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,26 @@ type Buagentscheduleupdate struct { } +func (u *Buagentscheduleupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buagentscheduleupdate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + ShiftStartDates *[]time.Time `json:"shiftStartDates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + ShiftStartDates: u.ShiftStartDates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buagentscheduleupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buasyncagentschedulesqueryresponse.go b/platformclientv2/buasyncagentschedulesqueryresponse.go index 8bdabeafb..46efdceb7 100644 --- a/platformclientv2/buasyncagentschedulesqueryresponse.go +++ b/platformclientv2/buasyncagentschedulesqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Buasyncagentschedulesqueryresponse struct { } +func (u *Buasyncagentschedulesqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buasyncagentschedulesqueryresponse + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Buagentschedulesqueryresponse `json:"result,omitempty"` + + Progress *int `json:"progress,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + + Progress: u.Progress, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buasyncagentschedulesqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buasyncagentschedulessearchresponse.go b/platformclientv2/buasyncagentschedulessearchresponse.go index 1897d9341..e58c934a0 100644 --- a/platformclientv2/buasyncagentschedulessearchresponse.go +++ b/platformclientv2/buasyncagentschedulessearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Buasyncagentschedulessearchresponse struct { } +func (u *Buasyncagentschedulessearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buasyncagentschedulessearchresponse + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Buagentschedulessearchresponse `json:"result,omitempty"` + + Progress *int `json:"progress,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + + Progress: u.Progress, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buasyncagentschedulessearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buasyncscheduleresponse.go b/platformclientv2/buasyncscheduleresponse.go index ae19e5e79..a1e50fc0a 100644 --- a/platformclientv2/buasyncscheduleresponse.go +++ b/platformclientv2/buasyncscheduleresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buasyncscheduleresponse struct { } +func (u *Buasyncscheduleresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buasyncscheduleresponse + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Buschedulemetadata `json:"result,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buasyncscheduleresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buasyncschedulerunresponse.go b/platformclientv2/buasyncschedulerunresponse.go index ea507db5a..ee7803283 100644 --- a/platformclientv2/buasyncschedulerunresponse.go +++ b/platformclientv2/buasyncschedulerunresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buasyncschedulerunresponse struct { } +func (u *Buasyncschedulerunresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buasyncschedulerunresponse + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Buschedulerun `json:"result,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buasyncschedulerunresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buaveragespeedofanswer.go b/platformclientv2/buaveragespeedofanswer.go index 940ebb014..0716f8ef2 100644 --- a/platformclientv2/buaveragespeedofanswer.go +++ b/platformclientv2/buaveragespeedofanswer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buaveragespeedofanswer struct { } +func (u *Buaveragespeedofanswer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buaveragespeedofanswer + + + + return json.Marshal(&struct { + Include *bool `json:"include,omitempty"` + + Seconds *int `json:"seconds,omitempty"` + *Alias + }{ + Include: u.Include, + + Seconds: u.Seconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buaveragespeedofanswer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bucopyschedulerequest.go b/platformclientv2/bucopyschedulerequest.go index 9cb0e45be..fb2cfa977 100644 --- a/platformclientv2/bucopyschedulerequest.go +++ b/platformclientv2/bucopyschedulerequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,33 @@ type Bucopyschedulerequest struct { } +func (u *Bucopyschedulerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bucopyschedulerequest + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Description *string `json:"description,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + *Alias + }{ + Description: u.Description, + + WeekDate: WeekDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bucopyschedulerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bucreateblankschedulerequest.go b/platformclientv2/bucreateblankschedulerequest.go index 756f8ec39..927fb6df7 100644 --- a/platformclientv2/bucreateblankschedulerequest.go +++ b/platformclientv2/bucreateblankschedulerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bucreateblankschedulerequest struct { } +func (u *Bucreateblankschedulerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bucreateblankschedulerequest + + + + return json.Marshal(&struct { + Description *string `json:"description,omitempty"` + + ShortTermForecast *Bushorttermforecastreference `json:"shortTermForecast,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + *Alias + }{ + Description: u.Description, + + ShortTermForecast: u.ShortTermForecast, + + WeekCount: u.WeekCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bucreateblankschedulerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bucurrentagentschedulesearchresponse.go b/platformclientv2/bucurrentagentschedulesearchresponse.go index ef740beda..d22af61e1 100644 --- a/platformclientv2/bucurrentagentschedulesearchresponse.go +++ b/platformclientv2/bucurrentagentschedulesearchresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,58 @@ type Bucurrentagentschedulesearchresponse struct { } +func (u *Bucurrentagentschedulesearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bucurrentagentschedulesearchresponse + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + AgentSchedules *[]Buagentschedulesearchresponse `json:"agentSchedules,omitempty"` + + BusinessUnitTimeZone *string `json:"businessUnitTimeZone,omitempty"` + + PublishedSchedules *[]Buagentschedulepublishedschedulereference `json:"publishedSchedules,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + Updates *[]Buagentscheduleupdate `json:"updates,omitempty"` + *Alias + }{ + AgentSchedules: u.AgentSchedules, + + BusinessUnitTimeZone: u.BusinessUnitTimeZone, + + PublishedSchedules: u.PublishedSchedules, + + StartDate: StartDate, + + EndDate: EndDate, + + Updates: u.Updates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bucurrentagentschedulesearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buforecastgenerationplanninggroupresult.go b/platformclientv2/buforecastgenerationplanninggroupresult.go index d963f2c3f..302eb4374 100644 --- a/platformclientv2/buforecastgenerationplanninggroupresult.go +++ b/platformclientv2/buforecastgenerationplanninggroupresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buforecastgenerationplanninggroupresult struct { } +func (u *Buforecastgenerationplanninggroupresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buforecastgenerationplanninggroupresult + + + + return json.Marshal(&struct { + PlanningGroupId *string `json:"planningGroupId,omitempty"` + + MetricResults *[]Buforecasttimeseriesresult `json:"metricResults,omitempty"` + *Alias + }{ + PlanningGroupId: u.PlanningGroupId, + + MetricResults: u.MetricResults, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buforecastgenerationplanninggroupresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buforecastgenerationresult.go b/platformclientv2/buforecastgenerationresult.go index d9bbfa490..f8ab3cc20 100644 --- a/platformclientv2/buforecastgenerationresult.go +++ b/platformclientv2/buforecastgenerationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Buforecastgenerationresult struct { } +func (u *Buforecastgenerationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buforecastgenerationresult + + + + return json.Marshal(&struct { + PlanningGroupResults *[]Buforecastgenerationplanninggroupresult `json:"planningGroupResults,omitempty"` + *Alias + }{ + PlanningGroupResults: u.PlanningGroupResults, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buforecastgenerationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buforecastmodification.go b/platformclientv2/buforecastmodification.go index 4075cd4ce..eb02a791a 100644 --- a/platformclientv2/buforecastmodification.go +++ b/platformclientv2/buforecastmodification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Buforecastmodification struct { } +func (u *Buforecastmodification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buforecastmodification + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + StartIntervalIndex *int `json:"startIntervalIndex,omitempty"` + + EndIntervalIndex *int `json:"endIntervalIndex,omitempty"` + + Metric *string `json:"metric,omitempty"` + + LegacyMetric *string `json:"legacyMetric,omitempty"` + + Value *float64 `json:"value,omitempty"` + + Values *[]Wfmforecastmodificationintervaloffsetvalue `json:"values,omitempty"` + + DisplayGranularity *string `json:"displayGranularity,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + PlanningGroupIds *[]string `json:"planningGroupIds,omitempty"` + *Alias + }{ + VarType: u.VarType, + + StartIntervalIndex: u.StartIntervalIndex, + + EndIntervalIndex: u.EndIntervalIndex, + + Metric: u.Metric, + + LegacyMetric: u.LegacyMetric, + + Value: u.Value, + + Values: u.Values, + + DisplayGranularity: u.DisplayGranularity, + + Granularity: u.Granularity, + + Enabled: u.Enabled, + + PlanningGroupIds: u.PlanningGroupIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buforecastmodification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buforecastresult.go b/platformclientv2/buforecastresult.go index 5d7c25d02..ae767e40d 100644 --- a/platformclientv2/buforecastresult.go +++ b/platformclientv2/buforecastresult.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Buforecastresult struct { } +func (u *Buforecastresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buforecastresult + + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + + PlanningGroups *[]Forecastplanninggroupdata `json:"planningGroups,omitempty"` + + WeekNumber *int `json:"weekNumber,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + *Alias + }{ + ReferenceStartDate: ReferenceStartDate, + + PlanningGroups: u.PlanningGroups, + + WeekNumber: u.WeekNumber, + + WeekCount: u.WeekCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buforecastresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buforecastresultresponse.go b/platformclientv2/buforecastresultresponse.go index 9918a6153..dbf5e3cdb 100644 --- a/platformclientv2/buforecastresultresponse.go +++ b/platformclientv2/buforecastresultresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buforecastresultresponse struct { } +func (u *Buforecastresultresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buforecastresultresponse + + + + return json.Marshal(&struct { + Result *Buforecastresult `json:"result,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + Result: u.Result, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buforecastresultresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buforecasttimeseriesresult.go b/platformclientv2/buforecasttimeseriesresult.go index 82c1f0476..1f7a07121 100644 --- a/platformclientv2/buforecasttimeseriesresult.go +++ b/platformclientv2/buforecasttimeseriesresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buforecasttimeseriesresult struct { } +func (u *Buforecasttimeseriesresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buforecasttimeseriesresult + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + ForecastingMethod *string `json:"forecastingMethod,omitempty"` + + ForecastType *string `json:"forecastType,omitempty"` + *Alias + }{ + Metric: u.Metric, + + ForecastingMethod: u.ForecastingMethod, + + ForecastType: u.ForecastType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buforecasttimeseriesresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bufulldaytimeoffmarker.go b/platformclientv2/bufulldaytimeoffmarker.go index cf5fb5fda..1d5214ec7 100644 --- a/platformclientv2/bufulldaytimeoffmarker.go +++ b/platformclientv2/bufulldaytimeoffmarker.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,49 @@ type Bufulldaytimeoffmarker struct { } +func (u *Bufulldaytimeoffmarker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bufulldaytimeoffmarker + + + BusinessUnitDate := new(string) + if u.BusinessUnitDate != nil { + *BusinessUnitDate = timeutil.Strftime(u.BusinessUnitDate, "%Y-%m-%d") + } else { + BusinessUnitDate = nil + } + + + return json.Marshal(&struct { + BusinessUnitDate *string `json:"businessUnitDate,omitempty"` + + LengthMinutes *int `json:"lengthMinutes,omitempty"` + + Description *string `json:"description,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Paid *bool `json:"paid,omitempty"` + + TimeOffRequestId *string `json:"timeOffRequestId,omitempty"` + *Alias + }{ + BusinessUnitDate: BusinessUnitDate, + + LengthMinutes: u.LengthMinutes, + + Description: u.Description, + + ActivityCodeId: u.ActivityCodeId, + + Paid: u.Paid, + + TimeOffRequestId: u.TimeOffRequestId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bufulldaytimeoffmarker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bugenerateschedulerequest.go b/platformclientv2/bugenerateschedulerequest.go index af49fcffd..a03d10bc2 100644 --- a/platformclientv2/bugenerateschedulerequest.go +++ b/platformclientv2/bugenerateschedulerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bugenerateschedulerequest struct { } +func (u *Bugenerateschedulerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bugenerateschedulerequest + + + + return json.Marshal(&struct { + Description *string `json:"description,omitempty"` + + ShortTermForecast *Bushorttermforecastreference `json:"shortTermForecast,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + *Alias + }{ + Description: u.Description, + + ShortTermForecast: u.ShortTermForecast, + + WeekCount: u.WeekCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bugenerateschedulerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bugetcurrentagentschedulerequest.go b/platformclientv2/bugetcurrentagentschedulerequest.go index 1ae73d1e0..a52831f80 100644 --- a/platformclientv2/bugetcurrentagentschedulerequest.go +++ b/platformclientv2/bugetcurrentagentschedulerequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,42 @@ type Bugetcurrentagentschedulerequest struct { } +func (u *Bugetcurrentagentschedulerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bugetcurrentagentschedulerequest + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bugetcurrentagentschedulerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buheadcountforecast.go b/platformclientv2/buheadcountforecast.go index ced2fdb50..1a3bc10e5 100644 --- a/platformclientv2/buheadcountforecast.go +++ b/platformclientv2/buheadcountforecast.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Buheadcountforecast struct { } +func (u *Buheadcountforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buheadcountforecast + + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + Entities *[]Buplanninggroupheadcountforecast `json:"entities,omitempty"` + + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + *Alias + }{ + Entities: u.Entities, + + ReferenceStartDate: ReferenceStartDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buheadcountforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buheadcountforecastresponse.go b/platformclientv2/buheadcountforecastresponse.go index fd2eb1029..0bbf6bfc1 100644 --- a/platformclientv2/buheadcountforecastresponse.go +++ b/platformclientv2/buheadcountforecastresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buheadcountforecastresponse struct { } +func (u *Buheadcountforecastresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buheadcountforecastresponse + + + + return json.Marshal(&struct { + Result *Buheadcountforecast `json:"result,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + Result: u.Result, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buheadcountforecastresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buintradaydatagroup.go b/platformclientv2/buintradaydatagroup.go index 714a2a098..ab7bb2e4e 100644 --- a/platformclientv2/buintradaydatagroup.go +++ b/platformclientv2/buintradaydatagroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Buintradaydatagroup struct { } +func (u *Buintradaydatagroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buintradaydatagroup + + + + return json.Marshal(&struct { + MediaType *string `json:"mediaType,omitempty"` + + ForecastDataSummary *Buintradayforecastdata `json:"forecastDataSummary,omitempty"` + + ForecastDataPerInterval *[]Buintradayforecastdata `json:"forecastDataPerInterval,omitempty"` + + ScheduleDataSummary *Buintradayscheduledata `json:"scheduleDataSummary,omitempty"` + + ScheduleDataPerInterval *[]Buintradayscheduledata `json:"scheduleDataPerInterval,omitempty"` + + PerformancePredictionDataSummary *Intradayperformancepredictiondata `json:"performancePredictionDataSummary,omitempty"` + + PerformancePredictionDataPerInterval *[]Intradayperformancepredictiondata `json:"performancePredictionDataPerInterval,omitempty"` + *Alias + }{ + MediaType: u.MediaType, + + ForecastDataSummary: u.ForecastDataSummary, + + ForecastDataPerInterval: u.ForecastDataPerInterval, + + ScheduleDataSummary: u.ScheduleDataSummary, + + ScheduleDataPerInterval: u.ScheduleDataPerInterval, + + PerformancePredictionDataSummary: u.PerformancePredictionDataSummary, + + PerformancePredictionDataPerInterval: u.PerformancePredictionDataPerInterval, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buintradaydatagroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buintradayforecastdata.go b/platformclientv2/buintradayforecastdata.go index 4fc605ba4..9fa177b76 100644 --- a/platformclientv2/buintradayforecastdata.go +++ b/platformclientv2/buintradayforecastdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buintradayforecastdata struct { } +func (u *Buintradayforecastdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buintradayforecastdata + + + + return json.Marshal(&struct { + Offered *float64 `json:"offered,omitempty"` + + AverageHandleTimeSeconds *float64 `json:"averageHandleTimeSeconds,omitempty"` + *Alias + }{ + Offered: u.Offered, + + AverageHandleTimeSeconds: u.AverageHandleTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buintradayforecastdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buintradayresponse.go b/platformclientv2/buintradayresponse.go index 97fde723a..1efe1464a 100644 --- a/platformclientv2/buintradayresponse.go +++ b/platformclientv2/buintradayresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Buintradayresponse struct { } +func (u *Buintradayresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buintradayresponse + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + IntervalLengthMinutes *int `json:"intervalLengthMinutes,omitempty"` + + NoDataReason *string `json:"noDataReason,omitempty"` + + Categories *[]string `json:"categories,omitempty"` + + ShortTermForecast *Bushorttermforecastreference `json:"shortTermForecast,omitempty"` + + Schedule *Buschedulereference `json:"schedule,omitempty"` + + IntradayDataGroupings *[]Buintradaydatagroup `json:"intradayDataGroupings,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + IntervalLengthMinutes: u.IntervalLengthMinutes, + + NoDataReason: u.NoDataReason, + + Categories: u.Categories, + + ShortTermForecast: u.ShortTermForecast, + + Schedule: u.Schedule, + + IntradayDataGroupings: u.IntradayDataGroupings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buintradayresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buintradayscheduledata.go b/platformclientv2/buintradayscheduledata.go index e30c7f6e9..62185148f 100644 --- a/platformclientv2/buintradayscheduledata.go +++ b/platformclientv2/buintradayscheduledata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Buintradayscheduledata struct { } +func (u *Buintradayscheduledata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buintradayscheduledata + + + + return json.Marshal(&struct { + OnQueueTimeSeconds *int `json:"onQueueTimeSeconds,omitempty"` + *Alias + }{ + OnQueueTimeSeconds: u.OnQueueTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buintradayscheduledata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkcontactsrequest.go b/platformclientv2/bulkcontactsrequest.go index 2b9a38264..7b8a29d63 100644 --- a/platformclientv2/bulkcontactsrequest.go +++ b/platformclientv2/bulkcontactsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bulkcontactsrequest struct { } +func (u *Bulkcontactsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkcontactsrequest + + + + return json.Marshal(&struct { + Entities *[]Externalcontact `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkcontactsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkcontactsresponse.go b/platformclientv2/bulkcontactsresponse.go index de6ed63d8..e88984860 100644 --- a/platformclientv2/bulkcontactsresponse.go +++ b/platformclientv2/bulkcontactsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkcontactsresponse struct { } +func (u *Bulkcontactsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkcontactsresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultexternalcontactexternalcontact `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkcontactsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkdeleteresponse.go b/platformclientv2/bulkdeleteresponse.go index cbd0f7c79..ae609367d 100644 --- a/platformclientv2/bulkdeleteresponse.go +++ b/platformclientv2/bulkdeleteresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkdeleteresponse struct { } +func (u *Bulkdeleteresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkdeleteresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultvoidentity `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkdeleteresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkerrordetail.go b/platformclientv2/bulkerrordetail.go index 440c2878a..205710d71 100644 --- a/platformclientv2/bulkerrordetail.go +++ b/platformclientv2/bulkerrordetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkerrordetail struct { } +func (u *Bulkerrordetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkerrordetail + + + + return json.Marshal(&struct { + FieldName *string `json:"fieldName,omitempty"` + + Value *string `json:"value,omitempty"` + + Message *string `json:"message,omitempty"` + *Alias + }{ + FieldName: u.FieldName, + + Value: u.Value, + + Message: u.Message, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkerrordetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkerrorentity.go b/platformclientv2/bulkerrorentity.go index f2a14b30b..9475d791e 100644 --- a/platformclientv2/bulkerrorentity.go +++ b/platformclientv2/bulkerrorentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Bulkerrorentity struct { } +func (u *Bulkerrorentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkerrorentity + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + Status *int `json:"status,omitempty"` + + Retryable *bool `json:"retryable,omitempty"` + + Entity *Entity `json:"entity,omitempty"` + + Details *[]Bulkerrordetail `json:"details,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + Status: u.Status, + + Retryable: u.Retryable, + + Entity: u.Entity, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkerrorentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkerrorexternalcontact.go b/platformclientv2/bulkerrorexternalcontact.go index d4b105802..2b7dd9582 100644 --- a/platformclientv2/bulkerrorexternalcontact.go +++ b/platformclientv2/bulkerrorexternalcontact.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Bulkerrorexternalcontact struct { } +func (u *Bulkerrorexternalcontact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkerrorexternalcontact + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + Status *int `json:"status,omitempty"` + + Retryable *bool `json:"retryable,omitempty"` + + Entity *Externalcontact `json:"entity,omitempty"` + + Details *[]Bulkerrordetail `json:"details,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + Status: u.Status, + + Retryable: u.Retryable, + + Entity: u.Entity, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkerrorexternalcontact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkerrorexternalorganization.go b/platformclientv2/bulkerrorexternalorganization.go index f248110ca..9ed47d716 100644 --- a/platformclientv2/bulkerrorexternalorganization.go +++ b/platformclientv2/bulkerrorexternalorganization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Bulkerrorexternalorganization struct { } +func (u *Bulkerrorexternalorganization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkerrorexternalorganization + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + Status *int `json:"status,omitempty"` + + Retryable *bool `json:"retryable,omitempty"` + + Entity *Externalorganization `json:"entity,omitempty"` + + Details *[]Bulkerrordetail `json:"details,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + Status: u.Status, + + Retryable: u.Retryable, + + Entity: u.Entity, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkerrorexternalorganization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkerrornote.go b/platformclientv2/bulkerrornote.go index 495b9f887..a74ef57ea 100644 --- a/platformclientv2/bulkerrornote.go +++ b/platformclientv2/bulkerrornote.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Bulkerrornote struct { } +func (u *Bulkerrornote) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkerrornote + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + Status *int `json:"status,omitempty"` + + Retryable *bool `json:"retryable,omitempty"` + + Entity *Note `json:"entity,omitempty"` + + Details *[]Bulkerrordetail `json:"details,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + Status: u.Status, + + Retryable: u.Retryable, + + Entity: u.Entity, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkerrornote) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkerrorrelationship.go b/platformclientv2/bulkerrorrelationship.go index 538caed44..ce9f990fe 100644 --- a/platformclientv2/bulkerrorrelationship.go +++ b/platformclientv2/bulkerrorrelationship.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Bulkerrorrelationship struct { } +func (u *Bulkerrorrelationship) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkerrorrelationship + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + Status *int `json:"status,omitempty"` + + Retryable *bool `json:"retryable,omitempty"` + + Entity *Relationship `json:"entity,omitempty"` + + Details *[]Bulkerrordetail `json:"details,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + Status: u.Status, + + Retryable: u.Retryable, + + Entity: u.Entity, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkerrorrelationship) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkfetchcontactsresponse.go b/platformclientv2/bulkfetchcontactsresponse.go index 0e8fd0c40..560d249bf 100644 --- a/platformclientv2/bulkfetchcontactsresponse.go +++ b/platformclientv2/bulkfetchcontactsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkfetchcontactsresponse struct { } +func (u *Bulkfetchcontactsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkfetchcontactsresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultexternalcontactentity `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkfetchcontactsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkfetchnotesresponse.go b/platformclientv2/bulkfetchnotesresponse.go index 0ed6c7878..c728b1ae9 100644 --- a/platformclientv2/bulkfetchnotesresponse.go +++ b/platformclientv2/bulkfetchnotesresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkfetchnotesresponse struct { } +func (u *Bulkfetchnotesresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkfetchnotesresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultnoteentity `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkfetchnotesresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkfetchorganizationsresponse.go b/platformclientv2/bulkfetchorganizationsresponse.go index 2fe88d52f..adb374007 100644 --- a/platformclientv2/bulkfetchorganizationsresponse.go +++ b/platformclientv2/bulkfetchorganizationsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkfetchorganizationsresponse struct { } +func (u *Bulkfetchorganizationsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkfetchorganizationsresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultexternalorganizationentity `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkfetchorganizationsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkfetchrelationshipsresponse.go b/platformclientv2/bulkfetchrelationshipsresponse.go index 8f05f4156..d0d7fcc2f 100644 --- a/platformclientv2/bulkfetchrelationshipsresponse.go +++ b/platformclientv2/bulkfetchrelationshipsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkfetchrelationshipsresponse struct { } +func (u *Bulkfetchrelationshipsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkfetchrelationshipsresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultrelationshipentity `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkfetchrelationshipsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkidsrequest.go b/platformclientv2/bulkidsrequest.go index 74bb4923a..9aa7f9d3d 100644 --- a/platformclientv2/bulkidsrequest.go +++ b/platformclientv2/bulkidsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bulkidsrequest struct { } +func (u *Bulkidsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkidsrequest + + + + return json.Marshal(&struct { + Entities *[]Entity `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkidsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulknotesrequest.go b/platformclientv2/bulknotesrequest.go index 29c4f0c0f..661718997 100644 --- a/platformclientv2/bulknotesrequest.go +++ b/platformclientv2/bulknotesrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bulknotesrequest struct { } +func (u *Bulknotesrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulknotesrequest + + + + return json.Marshal(&struct { + Entities *[]Note `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulknotesrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulknotesresponse.go b/platformclientv2/bulknotesresponse.go index f1d2a6630..6e46d2f58 100644 --- a/platformclientv2/bulknotesresponse.go +++ b/platformclientv2/bulknotesresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulknotesresponse struct { } +func (u *Bulknotesresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulknotesresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultnotenote `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulknotesresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkorganizationsrequest.go b/platformclientv2/bulkorganizationsrequest.go index f26d29a72..c809f3ad9 100644 --- a/platformclientv2/bulkorganizationsrequest.go +++ b/platformclientv2/bulkorganizationsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bulkorganizationsrequest struct { } +func (u *Bulkorganizationsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkorganizationsrequest + + + + return json.Marshal(&struct { + Entities *[]Externalorganization `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkorganizationsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkorganizationsresponse.go b/platformclientv2/bulkorganizationsresponse.go index 5a098f417..ad455787c 100644 --- a/platformclientv2/bulkorganizationsresponse.go +++ b/platformclientv2/bulkorganizationsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkorganizationsresponse struct { } +func (u *Bulkorganizationsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkorganizationsresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultexternalorganizationexternalorganization `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkorganizationsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkrelationshipsrequest.go b/platformclientv2/bulkrelationshipsrequest.go index 5ce2cfc1d..c8e960e12 100644 --- a/platformclientv2/bulkrelationshipsrequest.go +++ b/platformclientv2/bulkrelationshipsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bulkrelationshipsrequest struct { } +func (u *Bulkrelationshipsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkrelationshipsrequest + + + + return json.Marshal(&struct { + Entities *[]Relationship `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkrelationshipsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkrelationshipsresponse.go b/platformclientv2/bulkrelationshipsresponse.go index 8a0d316b1..889f4538f 100644 --- a/platformclientv2/bulkrelationshipsresponse.go +++ b/platformclientv2/bulkrelationshipsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkrelationshipsresponse struct { } +func (u *Bulkrelationshipsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkrelationshipsresponse + + + + return json.Marshal(&struct { + Results *[]Bulkresponseresultrelationshiprelationship `json:"results,omitempty"` + + ErrorCount *int `json:"errorCount,omitempty"` + + ErrorIndexes *[]int `json:"errorIndexes,omitempty"` + *Alias + }{ + Results: u.Results, + + ErrorCount: u.ErrorCount, + + ErrorIndexes: u.ErrorIndexes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkrelationshipsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultexternalcontactentity.go b/platformclientv2/bulkresponseresultexternalcontactentity.go index 0b760c9bc..ab11c394c 100644 --- a/platformclientv2/bulkresponseresultexternalcontactentity.go +++ b/platformclientv2/bulkresponseresultexternalcontactentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultexternalcontactentity struct { } +func (u *Bulkresponseresultexternalcontactentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultexternalcontactentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Externalcontact `json:"entity,omitempty"` + + VarError *Bulkerrorentity `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultexternalcontactentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultexternalcontactexternalcontact.go b/platformclientv2/bulkresponseresultexternalcontactexternalcontact.go index a7f3b0950..26d75fe04 100644 --- a/platformclientv2/bulkresponseresultexternalcontactexternalcontact.go +++ b/platformclientv2/bulkresponseresultexternalcontactexternalcontact.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultexternalcontactexternalcontact struct { } +func (u *Bulkresponseresultexternalcontactexternalcontact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultexternalcontactexternalcontact + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Externalcontact `json:"entity,omitempty"` + + VarError *Bulkerrorexternalcontact `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultexternalcontactexternalcontact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultexternalorganizationentity.go b/platformclientv2/bulkresponseresultexternalorganizationentity.go index 8d8c738a0..6b0fcda5c 100644 --- a/platformclientv2/bulkresponseresultexternalorganizationentity.go +++ b/platformclientv2/bulkresponseresultexternalorganizationentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultexternalorganizationentity struct { } +func (u *Bulkresponseresultexternalorganizationentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultexternalorganizationentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Externalorganization `json:"entity,omitempty"` + + VarError *Bulkerrorentity `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultexternalorganizationentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultexternalorganizationexternalorganization.go b/platformclientv2/bulkresponseresultexternalorganizationexternalorganization.go index cab004b1c..c1861856a 100644 --- a/platformclientv2/bulkresponseresultexternalorganizationexternalorganization.go +++ b/platformclientv2/bulkresponseresultexternalorganizationexternalorganization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultexternalorganizationexternalorganization struct { } +func (u *Bulkresponseresultexternalorganizationexternalorganization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultexternalorganizationexternalorganization + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Externalorganization `json:"entity,omitempty"` + + VarError *Bulkerrorexternalorganization `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultexternalorganizationexternalorganization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultnoteentity.go b/platformclientv2/bulkresponseresultnoteentity.go index f7621cb99..164ae8c0e 100644 --- a/platformclientv2/bulkresponseresultnoteentity.go +++ b/platformclientv2/bulkresponseresultnoteentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultnoteentity struct { } +func (u *Bulkresponseresultnoteentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultnoteentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Note `json:"entity,omitempty"` + + VarError *Bulkerrorentity `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultnoteentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultnotenote.go b/platformclientv2/bulkresponseresultnotenote.go index b04aa1d4c..92f7307b2 100644 --- a/platformclientv2/bulkresponseresultnotenote.go +++ b/platformclientv2/bulkresponseresultnotenote.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultnotenote struct { } +func (u *Bulkresponseresultnotenote) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultnotenote + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Note `json:"entity,omitempty"` + + VarError *Bulkerrornote `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultnotenote) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultrelationshipentity.go b/platformclientv2/bulkresponseresultrelationshipentity.go index 6733f5737..d6f797ea2 100644 --- a/platformclientv2/bulkresponseresultrelationshipentity.go +++ b/platformclientv2/bulkresponseresultrelationshipentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultrelationshipentity struct { } +func (u *Bulkresponseresultrelationshipentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultrelationshipentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Relationship `json:"entity,omitempty"` + + VarError *Bulkerrorentity `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultrelationshipentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultrelationshiprelationship.go b/platformclientv2/bulkresponseresultrelationshiprelationship.go index eec00ac48..3e60ac227 100644 --- a/platformclientv2/bulkresponseresultrelationshiprelationship.go +++ b/platformclientv2/bulkresponseresultrelationshiprelationship.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultrelationshiprelationship struct { } +func (u *Bulkresponseresultrelationshiprelationship) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultrelationshiprelationship + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Relationship `json:"entity,omitempty"` + + VarError *Bulkerrorrelationship `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultrelationshiprelationship) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkresponseresultvoidentity.go b/platformclientv2/bulkresponseresultvoidentity.go index b7747f408..d587ee45a 100644 --- a/platformclientv2/bulkresponseresultvoidentity.go +++ b/platformclientv2/bulkresponseresultvoidentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Bulkresponseresultvoidentity struct { } +func (u *Bulkresponseresultvoidentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkresponseresultvoidentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Success *bool `json:"success,omitempty"` + + Entity *Void `json:"entity,omitempty"` + + VarError *Bulkerrorentity `json:"error,omitempty"` + *Alias + }{ + Id: u.Id, + + Success: u.Success, + + Entity: u.Entity, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkresponseresultvoidentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkshifttradestateupdaterequest.go b/platformclientv2/bulkshifttradestateupdaterequest.go index c7b37e694..4960d9d82 100644 --- a/platformclientv2/bulkshifttradestateupdaterequest.go +++ b/platformclientv2/bulkshifttradestateupdaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bulkshifttradestateupdaterequest struct { } +func (u *Bulkshifttradestateupdaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkshifttradestateupdaterequest + + + + return json.Marshal(&struct { + Entities *[]Bulkupdateshifttradestaterequestitem `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkshifttradestateupdaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkupdateshifttradestaterequestitem.go b/platformclientv2/bulkupdateshifttradestaterequestitem.go index e35d450fc..3fdf49038 100644 --- a/platformclientv2/bulkupdateshifttradestaterequestitem.go +++ b/platformclientv2/bulkupdateshifttradestaterequestitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkupdateshifttradestaterequestitem struct { } +func (u *Bulkupdateshifttradestaterequestitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkupdateshifttradestaterequestitem + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkupdateshifttradestaterequestitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkupdateshifttradestateresponse.go b/platformclientv2/bulkupdateshifttradestateresponse.go index 996eb9b0e..23a8b8a10 100644 --- a/platformclientv2/bulkupdateshifttradestateresponse.go +++ b/platformclientv2/bulkupdateshifttradestateresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Bulkupdateshifttradestateresponse struct { } +func (u *Bulkupdateshifttradestateresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkupdateshifttradestateresponse + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Bulkupdateshifttradestateresult `json:"result,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkupdateshifttradestateresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkupdateshifttradestateresult.go b/platformclientv2/bulkupdateshifttradestateresult.go index 06da0539e..b454eca64 100644 --- a/platformclientv2/bulkupdateshifttradestateresult.go +++ b/platformclientv2/bulkupdateshifttradestateresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bulkupdateshifttradestateresult struct { } +func (u *Bulkupdateshifttradestateresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkupdateshifttradestateresult + + + + return json.Marshal(&struct { + Entities *[]Bulkupdateshifttradestateresultitem `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkupdateshifttradestateresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bulkupdateshifttradestateresultitem.go b/platformclientv2/bulkupdateshifttradestateresultitem.go index a337b41e3..8029e41ac 100644 --- a/platformclientv2/bulkupdateshifttradestateresultitem.go +++ b/platformclientv2/bulkupdateshifttradestateresultitem.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Bulkupdateshifttradestateresultitem struct { } +func (u *Bulkupdateshifttradestateresultitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bulkupdateshifttradestateresultitem + + + ReviewedDate := new(string) + if u.ReviewedDate != nil { + + *ReviewedDate = timeutil.Strftime(u.ReviewedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReviewedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + ReviewedBy *Userreference `json:"reviewedBy,omitempty"` + + ReviewedDate *string `json:"reviewedDate,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + ReviewedBy: u.ReviewedBy, + + ReviewedDate: ReviewedDate, + + FailureReason: u.FailureReason, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bulkupdateshifttradestateresultitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bullseye.go b/platformclientv2/bullseye.go index d65b9573c..6048e78b4 100644 --- a/platformclientv2/bullseye.go +++ b/platformclientv2/bullseye.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bullseye struct { } +func (u *Bullseye) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bullseye + + + + return json.Marshal(&struct { + Rings *[]Ring `json:"rings,omitempty"` + *Alias + }{ + Rings: u.Rings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bullseye) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bumanagementunitschedulesummary.go b/platformclientv2/bumanagementunitschedulesummary.go index 2e075a5a5..106eaccec 100644 --- a/platformclientv2/bumanagementunitschedulesummary.go +++ b/platformclientv2/bumanagementunitschedulesummary.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Bumanagementunitschedulesummary struct { } +func (u *Bumanagementunitschedulesummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bumanagementunitschedulesummary + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + ManagementUnit *Managementunitreference `json:"managementUnit,omitempty"` + + AgentCount *int `json:"agentCount,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + Agents *[]Userreference `json:"agents,omitempty"` + *Alias + }{ + ManagementUnit: u.ManagementUnit, + + AgentCount: u.AgentCount, + + StartDate: StartDate, + + EndDate: EndDate, + + Agents: u.Agents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bumanagementunitschedulesummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buplanninggroupheadcountforecast.go b/platformclientv2/buplanninggroupheadcountforecast.go index 2e06dc061..978a0c6f3 100644 --- a/platformclientv2/buplanninggroupheadcountforecast.go +++ b/platformclientv2/buplanninggroupheadcountforecast.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buplanninggroupheadcountforecast struct { } +func (u *Buplanninggroupheadcountforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buplanninggroupheadcountforecast + + + + return json.Marshal(&struct { + PlanningGroup *Planninggroupreference `json:"planningGroup,omitempty"` + + RequiredPerInterval *[]float64 `json:"requiredPerInterval,omitempty"` + + RequiredWithoutShrinkagePerInterval *[]float64 `json:"requiredWithoutShrinkagePerInterval,omitempty"` + *Alias + }{ + PlanningGroup: u.PlanningGroup, + + RequiredPerInterval: u.RequiredPerInterval, + + RequiredWithoutShrinkagePerInterval: u.RequiredWithoutShrinkagePerInterval, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buplanninggroupheadcountforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buqueryagentschedulesrequest.go b/platformclientv2/buqueryagentschedulesrequest.go index aa18be76a..fa4bbb246 100644 --- a/platformclientv2/buqueryagentschedulesrequest.go +++ b/platformclientv2/buqueryagentschedulesrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buqueryagentschedulesrequest struct { } +func (u *Buqueryagentschedulesrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buqueryagentschedulesrequest + + + + return json.Marshal(&struct { + ManagementUnitId *string `json:"managementUnitId,omitempty"` + + UserIds *[]string `json:"userIds,omitempty"` + *Alias + }{ + ManagementUnitId: u.ManagementUnitId, + + UserIds: u.UserIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buqueryagentschedulesrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/burescheduleagentscheduleresult.go b/platformclientv2/burescheduleagentscheduleresult.go index b15e161f5..46baa252c 100644 --- a/platformclientv2/burescheduleagentscheduleresult.go +++ b/platformclientv2/burescheduleagentscheduleresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Burescheduleagentscheduleresult struct { } +func (u *Burescheduleagentscheduleresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Burescheduleagentscheduleresult + + + + return json.Marshal(&struct { + ManagementUnit *Managementunitreference `json:"managementUnit,omitempty"` + + DownloadResult *Murescheduleresultwrapper `json:"downloadResult,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + ManagementUnit: u.ManagementUnit, + + DownloadResult: u.DownloadResult, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Burescheduleagentscheduleresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bureschedulerequest.go b/platformclientv2/bureschedulerequest.go index 0b9325217..471e3cd82 100644 --- a/platformclientv2/bureschedulerequest.go +++ b/platformclientv2/bureschedulerequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Bureschedulerequest struct { } +func (u *Bureschedulerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bureschedulerequest + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + AgentIds *[]string `json:"agentIds,omitempty"` + + ActivityCodeIds *[]string `json:"activityCodeIds,omitempty"` + + ManagementUnitIds *[]string `json:"managementUnitIds,omitempty"` + + DoNotChangeWeeklyPaidTime *bool `json:"doNotChangeWeeklyPaidTime,omitempty"` + + DoNotChangeDailyPaidTime *bool `json:"doNotChangeDailyPaidTime,omitempty"` + + DoNotChangeShiftStartTimes *bool `json:"doNotChangeShiftStartTimes,omitempty"` + + DoNotChangeManuallyEditedShifts *bool `json:"doNotChangeManuallyEditedShifts,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + AgentIds: u.AgentIds, + + ActivityCodeIds: u.ActivityCodeIds, + + ManagementUnitIds: u.ManagementUnitIds, + + DoNotChangeWeeklyPaidTime: u.DoNotChangeWeeklyPaidTime, + + DoNotChangeDailyPaidTime: u.DoNotChangeDailyPaidTime, + + DoNotChangeShiftStartTimes: u.DoNotChangeShiftStartTimes, + + DoNotChangeManuallyEditedShifts: u.DoNotChangeManuallyEditedShifts, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bureschedulerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/burescheduleresult.go b/platformclientv2/burescheduleresult.go index 7cf5e9e77..264f88cdc 100644 --- a/platformclientv2/burescheduleresult.go +++ b/platformclientv2/burescheduleresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Burescheduleresult struct { } +func (u *Burescheduleresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Burescheduleresult + + + + return json.Marshal(&struct { + GenerationResults *Schedulegenerationresult `json:"generationResults,omitempty"` + + GenerationResultsDownloadUrl *string `json:"generationResultsDownloadUrl,omitempty"` + + HeadcountForecast *Buheadcountforecast `json:"headcountForecast,omitempty"` + + HeadcountForecastDownloadUrl *string `json:"headcountForecastDownloadUrl,omitempty"` + + AgentSchedules *[]Burescheduleagentscheduleresult `json:"agentSchedules,omitempty"` + *Alias + }{ + GenerationResults: u.GenerationResults, + + GenerationResultsDownloadUrl: u.GenerationResultsDownloadUrl, + + HeadcountForecast: u.HeadcountForecast, + + HeadcountForecastDownloadUrl: u.HeadcountForecastDownloadUrl, + + AgentSchedules: u.AgentSchedules, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Burescheduleresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buschedulelisting.go b/platformclientv2/buschedulelisting.go index f766ebc85..daa99f08d 100644 --- a/platformclientv2/buschedulelisting.go +++ b/platformclientv2/buschedulelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Buschedulelisting struct { } +func (u *Buschedulelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buschedulelisting + + + + return json.Marshal(&struct { + Entities *[]Buschedulelistitem `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buschedulelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buschedulelistitem.go b/platformclientv2/buschedulelistitem.go index 660722dd3..2724ac209 100644 --- a/platformclientv2/buschedulelistitem.go +++ b/platformclientv2/buschedulelistitem.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,61 @@ type Buschedulelistitem struct { } +func (u *Buschedulelistitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buschedulelistitem + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + ShortTermForecast *Bushorttermforecastreference `json:"shortTermForecast,omitempty"` + + GenerationResults *Schedulegenerationresultsummary `json:"generationResults,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + WeekCount: u.WeekCount, + + Description: u.Description, + + Published: u.Published, + + ShortTermForecast: u.ShortTermForecast, + + GenerationResults: u.GenerationResults, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buschedulelistitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buschedulemetadata.go b/platformclientv2/buschedulemetadata.go index 5aba68028..95573513a 100644 --- a/platformclientv2/buschedulemetadata.go +++ b/platformclientv2/buschedulemetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,65 @@ type Buschedulemetadata struct { } +func (u *Buschedulemetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buschedulemetadata + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + ShortTermForecast *Bushorttermforecastreference `json:"shortTermForecast,omitempty"` + + GenerationResults *Schedulegenerationresultsummary `json:"generationResults,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + ManagementUnits *[]Bumanagementunitschedulesummary `json:"managementUnits,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + WeekCount: u.WeekCount, + + Description: u.Description, + + Published: u.Published, + + ShortTermForecast: u.ShortTermForecast, + + GenerationResults: u.GenerationResults, + + Metadata: u.Metadata, + + ManagementUnits: u.ManagementUnits, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buschedulemetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buschedulereference.go b/platformclientv2/buschedulereference.go index 0a86d75d9..9af4b274c 100644 --- a/platformclientv2/buschedulereference.go +++ b/platformclientv2/buschedulereference.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,37 @@ type Buschedulereference struct { } +func (u *Buschedulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buschedulereference + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buschedulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buschedulereferenceformuroute.go b/platformclientv2/buschedulereferenceformuroute.go index e550496b8..7dfc6b425 100644 --- a/platformclientv2/buschedulereferenceformuroute.go +++ b/platformclientv2/buschedulereferenceformuroute.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,41 @@ type Buschedulereferenceformuroute struct { } +func (u *Buschedulereferenceformuroute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buschedulereferenceformuroute + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + BusinessUnit *Businessunitreference `json:"businessUnit,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + BusinessUnit: u.BusinessUnit, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buschedulereferenceformuroute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buschedulerun.go b/platformclientv2/buschedulerun.go index 25a2b656e..b1c637a8e 100644 --- a/platformclientv2/buschedulerun.go +++ b/platformclientv2/buschedulerun.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,117 @@ type Buschedulerun struct { } +func (u *Buschedulerun) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buschedulerun + + + TargetWeek := new(string) + if u.TargetWeek != nil { + *TargetWeek = timeutil.Strftime(u.TargetWeek, "%Y-%m-%d") + } else { + TargetWeek = nil + } + + SchedulingStartTime := new(string) + if u.SchedulingStartTime != nil { + + *SchedulingStartTime = timeutil.Strftime(u.SchedulingStartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SchedulingStartTime = nil + } + + SchedulingCompletedTime := new(string) + if u.SchedulingCompletedTime != nil { + + *SchedulingCompletedTime = timeutil.Strftime(u.SchedulingCompletedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SchedulingCompletedTime = nil + } + + ReschedulingResultExpiration := new(string) + if u.ReschedulingResultExpiration != nil { + + *ReschedulingResultExpiration = timeutil.Strftime(u.ReschedulingResultExpiration, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReschedulingResultExpiration = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SchedulerRunId *string `json:"schedulerRunId,omitempty"` + + IntradayRescheduling *bool `json:"intradayRescheduling,omitempty"` + + State *string `json:"state,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + PercentComplete *float64 `json:"percentComplete,omitempty"` + + TargetWeek *string `json:"targetWeek,omitempty"` + + Schedule *Buschedulereference `json:"schedule,omitempty"` + + ScheduleDescription *string `json:"scheduleDescription,omitempty"` + + SchedulingStartTime *string `json:"schedulingStartTime,omitempty"` + + SchedulingStartedBy *Userreference `json:"schedulingStartedBy,omitempty"` + + SchedulingCanceledBy *Userreference `json:"schedulingCanceledBy,omitempty"` + + SchedulingCompletedTime *string `json:"schedulingCompletedTime,omitempty"` + + MessageCount *int `json:"messageCount,omitempty"` + + ReschedulingOptions *Reschedulingoptionsrunresponse `json:"reschedulingOptions,omitempty"` + + ReschedulingResultExpiration *string `json:"reschedulingResultExpiration,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SchedulerRunId: u.SchedulerRunId, + + IntradayRescheduling: u.IntradayRescheduling, + + State: u.State, + + WeekCount: u.WeekCount, + + PercentComplete: u.PercentComplete, + + TargetWeek: TargetWeek, + + Schedule: u.Schedule, + + ScheduleDescription: u.ScheduleDescription, + + SchedulingStartTime: SchedulingStartTime, + + SchedulingStartedBy: u.SchedulingStartedBy, + + SchedulingCanceledBy: u.SchedulingCanceledBy, + + SchedulingCompletedTime: SchedulingCompletedTime, + + MessageCount: u.MessageCount, + + ReschedulingOptions: u.ReschedulingOptions, + + ReschedulingResultExpiration: ReschedulingResultExpiration, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buschedulerun) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buschedulerunlisting.go b/platformclientv2/buschedulerunlisting.go index fb26ad2dd..7703b4045 100644 --- a/platformclientv2/buschedulerunlisting.go +++ b/platformclientv2/buschedulerunlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Buschedulerunlisting struct { } +func (u *Buschedulerunlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buschedulerunlisting + + + + return json.Marshal(&struct { + Entities *[]Buschedulerun `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buschedulerunlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/busearchagentschedulesrequest.go b/platformclientv2/busearchagentschedulesrequest.go index 37c0038c8..cb9af7b87 100644 --- a/platformclientv2/busearchagentschedulesrequest.go +++ b/platformclientv2/busearchagentschedulesrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Busearchagentschedulesrequest struct { } +func (u *Busearchagentschedulesrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Busearchagentschedulesrequest + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + UserIds *[]string `json:"userIds,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + UserIds: u.UserIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Busearchagentschedulesrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buservicelevel.go b/platformclientv2/buservicelevel.go index c9bedb8fc..702b2d2d4 100644 --- a/platformclientv2/buservicelevel.go +++ b/platformclientv2/buservicelevel.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buservicelevel struct { } +func (u *Buservicelevel) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buservicelevel + + + + return json.Marshal(&struct { + Include *bool `json:"include,omitempty"` + + Percent *int `json:"percent,omitempty"` + + Seconds *int `json:"seconds,omitempty"` + *Alias + }{ + Include: u.Include, + + Percent: u.Percent, + + Seconds: u.Seconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buservicelevel) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bushorttermforecast.go b/platformclientv2/bushorttermforecast.go index eb7201179..b03b4ee51 100644 --- a/platformclientv2/bushorttermforecast.go +++ b/platformclientv2/bushorttermforecast.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,97 @@ type Bushorttermforecast struct { } +func (u *Bushorttermforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bushorttermforecast + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + CreationMethod *string `json:"creationMethod,omitempty"` + + Description *string `json:"description,omitempty"` + + Legacy *bool `json:"legacy,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + CanUseForScheduling *bool `json:"canUseForScheduling,omitempty"` + + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + + SourceDays *[]Forecastsourcedaypointer `json:"sourceDays,omitempty"` + + Modifications *[]Buforecastmodification `json:"modifications,omitempty"` + + GenerationResults *Buforecastgenerationresult `json:"generationResults,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + PlanningGroupsVersion *int `json:"planningGroupsVersion,omitempty"` + + PlanningGroups *Forecastplanninggroupsresponse `json:"planningGroups,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + WeekCount: u.WeekCount, + + CreationMethod: u.CreationMethod, + + Description: u.Description, + + Legacy: u.Legacy, + + Metadata: u.Metadata, + + CanUseForScheduling: u.CanUseForScheduling, + + ReferenceStartDate: ReferenceStartDate, + + SourceDays: u.SourceDays, + + Modifications: u.Modifications, + + GenerationResults: u.GenerationResults, + + TimeZone: u.TimeZone, + + PlanningGroupsVersion: u.PlanningGroupsVersion, + + PlanningGroups: u.PlanningGroups, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bushorttermforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bushorttermforecastingsettings.go b/platformclientv2/bushorttermforecastingsettings.go index d9a2c32ee..31337d9b7 100644 --- a/platformclientv2/bushorttermforecastingsettings.go +++ b/platformclientv2/bushorttermforecastingsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bushorttermforecastingsettings struct { } +func (u *Bushorttermforecastingsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bushorttermforecastingsettings + + + + return json.Marshal(&struct { + DefaultHistoryWeeks *int `json:"defaultHistoryWeeks,omitempty"` + *Alias + }{ + DefaultHistoryWeeks: u.DefaultHistoryWeeks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bushorttermforecastingsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bushorttermforecastlisting.go b/platformclientv2/bushorttermforecastlisting.go index 890a11a9c..07d2766cc 100644 --- a/platformclientv2/bushorttermforecastlisting.go +++ b/platformclientv2/bushorttermforecastlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Bushorttermforecastlisting struct { } +func (u *Bushorttermforecastlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bushorttermforecastlisting + + + + return json.Marshal(&struct { + Entities *[]Bushorttermforecastlistitem `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bushorttermforecastlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bushorttermforecastlistitem.go b/platformclientv2/bushorttermforecastlistitem.go index 4c4ac229c..8014315c2 100644 --- a/platformclientv2/bushorttermforecastlistitem.go +++ b/platformclientv2/bushorttermforecastlistitem.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,61 @@ type Bushorttermforecastlistitem struct { } +func (u *Bushorttermforecastlistitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bushorttermforecastlistitem + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + CreationMethod *string `json:"creationMethod,omitempty"` + + Description *string `json:"description,omitempty"` + + Legacy *bool `json:"legacy,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + CanUseForScheduling *bool `json:"canUseForScheduling,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + WeekCount: u.WeekCount, + + CreationMethod: u.CreationMethod, + + Description: u.Description, + + Legacy: u.Legacy, + + Metadata: u.Metadata, + + CanUseForScheduling: u.CanUseForScheduling, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bushorttermforecastlistitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/bushorttermforecastreference.go b/platformclientv2/bushorttermforecastreference.go index 0bb9983ce..06ce0db0e 100644 --- a/platformclientv2/bushorttermforecastreference.go +++ b/platformclientv2/bushorttermforecastreference.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,41 @@ type Bushorttermforecastreference struct { } +func (u *Bushorttermforecastreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Bushorttermforecastreference + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + Description *string `json:"description,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + Description: u.Description, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Bushorttermforecastreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/businessunit.go b/platformclientv2/businessunit.go index 63d15a560..fd44a5438 100644 --- a/platformclientv2/businessunit.go +++ b/platformclientv2/businessunit.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Businessunit struct { } +func (u *Businessunit) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Businessunit + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Settings *Businessunitsettings `json:"settings,omitempty"` + + Division *Divisionreference `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Settings: u.Settings, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Businessunit) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/businessunitactivitycode.go b/platformclientv2/businessunitactivitycode.go index 957ffeecd..90e45702d 100644 --- a/platformclientv2/businessunitactivitycode.go +++ b/platformclientv2/businessunitactivitycode.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Businessunitactivitycode struct { } +func (u *Businessunitactivitycode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Businessunitactivitycode + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Active *bool `json:"active,omitempty"` + + DefaultCode *bool `json:"defaultCode,omitempty"` + + Category *string `json:"category,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + CountsAsWorkTime *bool `json:"countsAsWorkTime,omitempty"` + + AgentTimeOffSelectable *bool `json:"agentTimeOffSelectable,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Active: u.Active, + + DefaultCode: u.DefaultCode, + + Category: u.Category, + + LengthInMinutes: u.LengthInMinutes, + + CountsAsPaidTime: u.CountsAsPaidTime, + + CountsAsWorkTime: u.CountsAsWorkTime, + + AgentTimeOffSelectable: u.AgentTimeOffSelectable, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Businessunitactivitycode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/businessunitactivitycodelisting.go b/platformclientv2/businessunitactivitycodelisting.go index fecf12d4b..77265da29 100644 --- a/platformclientv2/businessunitactivitycodelisting.go +++ b/platformclientv2/businessunitactivitycodelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Businessunitactivitycodelisting struct { } +func (u *Businessunitactivitycodelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Businessunitactivitycodelisting + + + + return json.Marshal(&struct { + Entities *[]Businessunitactivitycode `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Businessunitactivitycodelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/businessunitlisting.go b/platformclientv2/businessunitlisting.go index 783cc735e..6c672d4dc 100644 --- a/platformclientv2/businessunitlisting.go +++ b/platformclientv2/businessunitlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Businessunitlisting struct { } +func (u *Businessunitlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Businessunitlisting + + + + return json.Marshal(&struct { + Entities *[]Businessunitlistitem `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Businessunitlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/businessunitlistitem.go b/platformclientv2/businessunitlistitem.go index 2a6487f04..68bda55c8 100644 --- a/platformclientv2/businessunitlistitem.go +++ b/platformclientv2/businessunitlistitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Businessunitlistitem struct { } +func (u *Businessunitlistitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Businessunitlistitem + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Authorized *bool `json:"authorized,omitempty"` + + Division *Divisionreference `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Authorized: u.Authorized, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Businessunitlistitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/businessunitreference.go b/platformclientv2/businessunitreference.go index 1a9eb43e5..aa0c7fc6a 100644 --- a/platformclientv2/businessunitreference.go +++ b/platformclientv2/businessunitreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Businessunitreference struct { } +func (u *Businessunitreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Businessunitreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Businessunitreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/businessunitsettings.go b/platformclientv2/businessunitsettings.go index 5a940a93a..51bac6cf2 100644 --- a/platformclientv2/businessunitsettings.go +++ b/platformclientv2/businessunitsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Businessunitsettings struct { } +func (u *Businessunitsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Businessunitsettings + + + + return json.Marshal(&struct { + StartDayOfWeek *string `json:"startDayOfWeek,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + ShortTermForecasting *Bushorttermforecastingsettings `json:"shortTermForecasting,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + StartDayOfWeek: u.StartDayOfWeek, + + TimeZone: u.TimeZone, + + ShortTermForecasting: u.ShortTermForecasting, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Businessunitsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buttoncomponent.go b/platformclientv2/buttoncomponent.go index 9a573bb25..cef9ca8f0 100644 --- a/platformclientv2/buttoncomponent.go +++ b/platformclientv2/buttoncomponent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Buttoncomponent struct { } +func (u *Buttoncomponent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buttoncomponent + + + + return json.Marshal(&struct { + Title *string `json:"title,omitempty"` + + Actions *Contentactions `json:"actions,omitempty"` + *Alias + }{ + Title: u.Title, + + Actions: u.Actions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buttoncomponent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/buttonresponse.go b/platformclientv2/buttonresponse.go index 1a3bf4d8f..52aee83e5 100644 --- a/platformclientv2/buttonresponse.go +++ b/platformclientv2/buttonresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Buttonresponse struct { } +func (u *Buttonresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Buttonresponse + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Payload *string `json:"payload,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Text: u.Text, + + Payload: u.Payload, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Buttonresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/calendarurlresponse.go b/platformclientv2/calendarurlresponse.go index eca850ecb..49392336a 100644 --- a/platformclientv2/calendarurlresponse.go +++ b/platformclientv2/calendarurlresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Calendarurlresponse struct { } +func (u *Calendarurlresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Calendarurlresponse + + + + return json.Marshal(&struct { + CalendarUrl *string `json:"calendarUrl,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + CalendarUrl: u.CalendarUrl, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Calendarurlresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/calibration.go b/platformclientv2/calibration.go index b67b45848..569bbfb55 100644 --- a/platformclientv2/calibration.go +++ b/platformclientv2/calibration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,90 @@ type Calibration struct { } +func (u *Calibration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Calibration + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Calibrator *User `json:"calibrator,omitempty"` + + Agent *User `json:"agent,omitempty"` + + Conversation *Conversation `json:"conversation,omitempty"` + + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + AverageScore *int `json:"averageScore,omitempty"` + + HighScore *int `json:"highScore,omitempty"` + + LowScore *int `json:"lowScore,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + Evaluations *[]Evaluation `json:"evaluations,omitempty"` + + Evaluators *[]User `json:"evaluators,omitempty"` + + ScoringIndex **Evaluation `json:"scoringIndex,omitempty"` + + ExpertEvaluator *User `json:"expertEvaluator,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Calibrator: u.Calibrator, + + Agent: u.Agent, + + Conversation: u.Conversation, + + EvaluationForm: u.EvaluationForm, + + ContextId: u.ContextId, + + AverageScore: u.AverageScore, + + HighScore: u.HighScore, + + LowScore: u.LowScore, + + CreatedDate: CreatedDate, + + Evaluations: u.Evaluations, + + Evaluators: u.Evaluators, + + ScoringIndex: u.ScoringIndex, + + ExpertEvaluator: u.ExpertEvaluator, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Calibration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/calibrationassignment.go b/platformclientv2/calibrationassignment.go index 5d3a8091b..9d3b44f51 100644 --- a/platformclientv2/calibrationassignment.go +++ b/platformclientv2/calibrationassignment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Calibrationassignment struct { } +func (u *Calibrationassignment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Calibrationassignment + + + + return json.Marshal(&struct { + Calibrator *User `json:"calibrator,omitempty"` + + Evaluators *[]User `json:"evaluators,omitempty"` + + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + ExpertEvaluator *User `json:"expertEvaluator,omitempty"` + *Alias + }{ + Calibrator: u.Calibrator, + + Evaluators: u.Evaluators, + + EvaluationForm: u.EvaluationForm, + + ExpertEvaluator: u.ExpertEvaluator, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Calibrationassignment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/calibrationcreate.go b/platformclientv2/calibrationcreate.go index e21a80e63..a3297c572 100644 --- a/platformclientv2/calibrationcreate.go +++ b/platformclientv2/calibrationcreate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,90 @@ type Calibrationcreate struct { } +func (u *Calibrationcreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Calibrationcreate + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Calibrator *User `json:"calibrator,omitempty"` + + Agent *User `json:"agent,omitempty"` + + Conversation *Conversation `json:"conversation,omitempty"` + + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + AverageScore *int `json:"averageScore,omitempty"` + + HighScore *int `json:"highScore,omitempty"` + + LowScore *int `json:"lowScore,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + Evaluations *[]Evaluation `json:"evaluations,omitempty"` + + Evaluators *[]User `json:"evaluators,omitempty"` + + ScoringIndex *Evaluation `json:"scoringIndex,omitempty"` + + ExpertEvaluator *User `json:"expertEvaluator,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Calibrator: u.Calibrator, + + Agent: u.Agent, + + Conversation: u.Conversation, + + EvaluationForm: u.EvaluationForm, + + ContextId: u.ContextId, + + AverageScore: u.AverageScore, + + HighScore: u.HighScore, + + LowScore: u.LowScore, + + CreatedDate: CreatedDate, + + Evaluations: u.Evaluations, + + Evaluators: u.Evaluators, + + ScoringIndex: u.ScoringIndex, + + ExpertEvaluator: u.ExpertEvaluator, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Calibrationcreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/calibrationentitylisting.go b/platformclientv2/calibrationentitylisting.go index 1c1f37035..696fa4ef0 100644 --- a/platformclientv2/calibrationentitylisting.go +++ b/platformclientv2/calibrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Calibrationentitylisting struct { } +func (u *Calibrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Calibrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Calibration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Calibrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/call.go b/platformclientv2/call.go index bea39e8ad..b247dd2d6 100644 --- a/platformclientv2/call.go +++ b/platformclientv2/call.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -125,6 +126,166 @@ type Call struct { } +func (u *Call) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Call + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Held *bool `json:"held,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + DisconnectReasons *[]Disconnectreason `json:"disconnectReasons,omitempty"` + + FaxStatus *Faxstatus `json:"faxStatus,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + + Self *Address `json:"self,omitempty"` + + Other *Address `json:"other,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Direction: u.Direction, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Muted: u.Muted, + + Confined: u.Confined, + + Held: u.Held, + + RecordingId: u.RecordingId, + + Segments: u.Segments, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DocumentId: u.DocumentId, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + DisconnectReasons: u.DisconnectReasons, + + FaxStatus: u.FaxStatus, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + UuiData: u.UuiData, + + Self: u.Self, + + Other: u.Other, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AgentAssistantId: u.AgentAssistantId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Call) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callablecontactsdiagnostic.go b/platformclientv2/callablecontactsdiagnostic.go index c70b425b3..113308b5e 100644 --- a/platformclientv2/callablecontactsdiagnostic.go +++ b/platformclientv2/callablecontactsdiagnostic.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Callablecontactsdiagnostic struct { } +func (u *Callablecontactsdiagnostic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callablecontactsdiagnostic + + + + return json.Marshal(&struct { + AttemptLimits *Domainentityref `json:"attemptLimits,omitempty"` + + DncLists *[]Domainentityref `json:"dncLists,omitempty"` + + CallableTimeSet *Domainentityref `json:"callableTimeSet,omitempty"` + + RuleSets *[]Domainentityref `json:"ruleSets,omitempty"` + *Alias + }{ + AttemptLimits: u.AttemptLimits, + + DncLists: u.DncLists, + + CallableTimeSet: u.CallableTimeSet, + + RuleSets: u.RuleSets, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callablecontactsdiagnostic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callabletime.go b/platformclientv2/callabletime.go index ef60f5498..4b4e256d6 100644 --- a/platformclientv2/callabletime.go +++ b/platformclientv2/callabletime.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Callabletime struct { } +func (u *Callabletime) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callabletime + + + + return json.Marshal(&struct { + TimeSlots *[]Campaigntimeslot `json:"timeSlots,omitempty"` + + TimeZoneId *string `json:"timeZoneId,omitempty"` + *Alias + }{ + TimeSlots: u.TimeSlots, + + TimeZoneId: u.TimeZoneId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callabletime) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callabletimeset.go b/platformclientv2/callabletimeset.go index 23bf6ff7d..a87817936 100644 --- a/platformclientv2/callabletimeset.go +++ b/platformclientv2/callabletimeset.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Callabletimeset struct { } +func (u *Callabletimeset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callabletimeset + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + CallableTimes *[]Callabletime `json:"callableTimes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + CallableTimes: u.CallableTimes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callabletimeset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callabletimesetentitylisting.go b/platformclientv2/callabletimesetentitylisting.go index af652e1c3..8aad749c0 100644 --- a/platformclientv2/callabletimesetentitylisting.go +++ b/platformclientv2/callabletimesetentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Callabletimesetentitylisting struct { } +func (u *Callabletimesetentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callabletimesetentitylisting + + + + return json.Marshal(&struct { + Entities *[]Callabletimeset `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callabletimesetentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callablewindow.go b/platformclientv2/callablewindow.go index 634cd5ced..5b861a972 100644 --- a/platformclientv2/callablewindow.go +++ b/platformclientv2/callablewindow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Callablewindow struct { } +func (u *Callablewindow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callablewindow + + + + return json.Marshal(&struct { + Mapped *Atzmtimeslot `json:"mapped,omitempty"` + + Unmapped *Atzmtimeslotwithtimezone `json:"unmapped,omitempty"` + *Alias + }{ + Mapped: u.Mapped, + + Unmapped: u.Unmapped, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callablewindow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callback.go b/platformclientv2/callback.go index 9bba33b6a..03ad77680 100644 --- a/platformclientv2/callback.go +++ b/platformclientv2/callback.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,166 @@ type Callback struct { } +func (u *Callback) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callback + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DialerPreview *Dialerpreview `json:"dialerPreview,omitempty"` + + Voicemail *Voicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + + Provider *string `json:"provider,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Segments: u.Segments, + + Direction: u.Direction, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DialerPreview: u.DialerPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + ScriptId: u.ScriptId, + + ExternalCampaign: u.ExternalCampaign, + + SkipEnabled: u.SkipEnabled, + + TimeoutSeconds: u.TimeoutSeconds, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + + Provider: u.Provider, + + PeerId: u.PeerId, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callback) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callbackbasic.go b/platformclientv2/callbackbasic.go index f8805d6f7..74d1160fb 100644 --- a/platformclientv2/callbackbasic.go +++ b/platformclientv2/callbackbasic.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,166 @@ type Callbackbasic struct { } +func (u *Callbackbasic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callbackbasic + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DialerPreview *Dialerpreview `json:"dialerPreview,omitempty"` + + Voicemail *Voicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + + Provider *string `json:"provider,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Segments: u.Segments, + + Direction: u.Direction, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DialerPreview: u.DialerPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + ScriptId: u.ScriptId, + + ExternalCampaign: u.ExternalCampaign, + + SkipEnabled: u.SkipEnabled, + + TimeoutSeconds: u.TimeoutSeconds, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + + Provider: u.Provider, + + PeerId: u.PeerId, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callbackbasic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callbackconversation.go b/platformclientv2/callbackconversation.go index 932b7d8ee..f9a985054 100644 --- a/platformclientv2/callbackconversation.go +++ b/platformclientv2/callbackconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Callbackconversation struct { } +func (u *Callbackconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callbackconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Callbackmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callbackconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callbackconversationentitylisting.go b/platformclientv2/callbackconversationentitylisting.go index 5e9f8bd14..f92c1eb4f 100644 --- a/platformclientv2/callbackconversationentitylisting.go +++ b/platformclientv2/callbackconversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Callbackconversationentitylisting struct { } +func (u *Callbackconversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callbackconversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Callbackconversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callbackconversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callbackidentifier.go b/platformclientv2/callbackidentifier.go index 9008deff3..251a48bdb 100644 --- a/platformclientv2/callbackidentifier.go +++ b/platformclientv2/callbackidentifier.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Callbackidentifier struct { } +func (u *Callbackidentifier) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callbackidentifier + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callbackidentifier) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callbackmediaparticipant.go b/platformclientv2/callbackmediaparticipant.go index 09b77350b..8fa960319 100644 --- a/platformclientv2/callbackmediaparticipant.go +++ b/platformclientv2/callbackmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -177,6 +178,242 @@ type Callbackmediaparticipant struct { } +func (u *Callbackmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callbackmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Team *Domainentityref `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Domainentityref `json:"externalContact,omitempty"` + + ExternalOrganization *Domainentityref `json:"externalOrganization,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + Peer *string `json:"peer,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + OutboundPreview *Dialerpreview `json:"outboundPreview,omitempty"` + + Voicemail *Voicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + Peer: u.Peer, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + ConversationRoutingData: u.ConversationRoutingData, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + OutboundPreview: u.OutboundPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + ExternalCampaign: u.ExternalCampaign, + + SkipEnabled: u.SkipEnabled, + + TimeoutSeconds: u.TimeoutSeconds, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + + CallbackScheduledTime: CallbackScheduledTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callbackmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callbasic.go b/platformclientv2/callbasic.go index 666903636..f0d8f2844 100644 --- a/platformclientv2/callbasic.go +++ b/platformclientv2/callbasic.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -125,6 +126,166 @@ type Callbasic struct { } +func (u *Callbasic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callbasic + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Held *bool `json:"held,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + DisconnectReasons *[]Disconnectreason `json:"disconnectReasons,omitempty"` + + FaxStatus *Faxstatus `json:"faxStatus,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + + Self *Address `json:"self,omitempty"` + + Other *Address `json:"other,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Direction: u.Direction, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Muted: u.Muted, + + Confined: u.Confined, + + Held: u.Held, + + RecordingId: u.RecordingId, + + Segments: u.Segments, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DocumentId: u.DocumentId, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + DisconnectReasons: u.DisconnectReasons, + + FaxStatus: u.FaxStatus, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + UuiData: u.UuiData, + + Self: u.Self, + + Other: u.Other, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AgentAssistantId: u.AgentAssistantId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callbasic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callcommand.go b/platformclientv2/callcommand.go index fb07e1b45..100ee9d0a 100644 --- a/platformclientv2/callcommand.go +++ b/platformclientv2/callcommand.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Callcommand struct { } +func (u *Callcommand) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callcommand + + + + return json.Marshal(&struct { + CallNumber *string `json:"callNumber,omitempty"` + + PhoneColumn *string `json:"phoneColumn,omitempty"` + *Alias + }{ + CallNumber: u.CallNumber, + + PhoneColumn: u.PhoneColumn, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callcommand) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callconversation.go b/platformclientv2/callconversation.go index 98e5d8bda..bf54cd39d 100644 --- a/platformclientv2/callconversation.go +++ b/platformclientv2/callconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Callconversation struct { } +func (u *Callconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Callmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + RecordingState: u.RecordingState, + + MaxParticipants: u.MaxParticipants, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callconversationentitylisting.go b/platformclientv2/callconversationentitylisting.go index a0d1c885c..6b0e1cbec 100644 --- a/platformclientv2/callconversationentitylisting.go +++ b/platformclientv2/callconversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Callconversationentitylisting struct { } +func (u *Callconversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callconversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Callconversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callconversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callforwarding.go b/platformclientv2/callforwarding.go index 14760dd75..65be9827d 100644 --- a/platformclientv2/callforwarding.go +++ b/platformclientv2/callforwarding.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,62 @@ type Callforwarding struct { } +func (u *Callforwarding) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callforwarding + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + User *User `json:"user,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + Calls *[]Callroute `json:"calls,omitempty"` + + Voicemail *string `json:"voicemail,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + User: u.User, + + Enabled: u.Enabled, + + PhoneNumber: u.PhoneNumber, + + Calls: u.Calls, + + Voicemail: u.Voicemail, + + ModifiedDate: ModifiedDate, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callforwarding) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callforwardingeventcall.go b/platformclientv2/callforwardingeventcall.go index 96eb43263..a1a8ed234 100644 --- a/platformclientv2/callforwardingeventcall.go +++ b/platformclientv2/callforwardingeventcall.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Callforwardingeventcall struct { } +func (u *Callforwardingeventcall) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callforwardingeventcall + + + + return json.Marshal(&struct { + Targets *[]Callforwardingeventtarget `json:"targets,omitempty"` + *Alias + }{ + Targets: u.Targets, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callforwardingeventcall) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callforwardingeventcallforwarding.go b/platformclientv2/callforwardingeventcallforwarding.go index b2856d976..323528678 100644 --- a/platformclientv2/callforwardingeventcallforwarding.go +++ b/platformclientv2/callforwardingeventcallforwarding.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Callforwardingeventcallforwarding struct { } +func (u *Callforwardingeventcallforwarding) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callforwardingeventcallforwarding + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + User *Callforwardingeventuser `json:"user,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Calls *[]Callforwardingeventcall `json:"calls,omitempty"` + + Voicemail *string `json:"voicemail,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + User: u.User, + + Enabled: u.Enabled, + + Calls: u.Calls, + + Voicemail: u.Voicemail, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callforwardingeventcallforwarding) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callforwardingeventtarget.go b/platformclientv2/callforwardingeventtarget.go index 5b78d96b7..06689a96f 100644 --- a/platformclientv2/callforwardingeventtarget.go +++ b/platformclientv2/callforwardingeventtarget.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Callforwardingeventtarget struct { } +func (u *Callforwardingeventtarget) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callforwardingeventtarget + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callforwardingeventtarget) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callforwardingeventuser.go b/platformclientv2/callforwardingeventuser.go index e17d90eff..9be56f6b3 100644 --- a/platformclientv2/callforwardingeventuser.go +++ b/platformclientv2/callforwardingeventuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Callforwardingeventuser struct { } +func (u *Callforwardingeventuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callforwardingeventuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callforwardingeventuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callhistoryconversation.go b/platformclientv2/callhistoryconversation.go index 120188de4..5ad5fa699 100644 --- a/platformclientv2/callhistoryconversation.go +++ b/platformclientv2/callhistoryconversation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Callhistoryconversation struct { } +func (u *Callhistoryconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callhistoryconversation + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Callhistoryparticipant `json:"participants,omitempty"` + + Direction *string `json:"direction,omitempty"` + + WentToVoicemail *bool `json:"wentToVoicemail,omitempty"` + + MissedCall *bool `json:"missedCall,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + WasConference *bool `json:"wasConference,omitempty"` + + WasCallback *bool `json:"wasCallback,omitempty"` + + HadScreenShare *bool `json:"hadScreenShare,omitempty"` + + HadCobrowse *bool `json:"hadCobrowse,omitempty"` + + WasOutboundCampaign *bool `json:"wasOutboundCampaign,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + Direction: u.Direction, + + WentToVoicemail: u.WentToVoicemail, + + MissedCall: u.MissedCall, + + StartTime: StartTime, + + WasConference: u.WasConference, + + WasCallback: u.WasCallback, + + HadScreenShare: u.HadScreenShare, + + HadCobrowse: u.HadCobrowse, + + WasOutboundCampaign: u.WasOutboundCampaign, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callhistoryconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callhistoryconversationentitylisting.go b/platformclientv2/callhistoryconversationentitylisting.go index 8b2555abd..f30ac34e2 100644 --- a/platformclientv2/callhistoryconversationentitylisting.go +++ b/platformclientv2/callhistoryconversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Callhistoryconversationentitylisting struct { } +func (u *Callhistoryconversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callhistoryconversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Callhistoryconversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callhistoryconversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callhistoryparticipant.go b/platformclientv2/callhistoryparticipant.go index 9770a69ea..e6b9fa827 100644 --- a/platformclientv2/callhistoryparticipant.go +++ b/platformclientv2/callhistoryparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,110 @@ type Callhistoryparticipant struct { } +func (u *Callhistoryparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callhistoryparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Ani *string `json:"ani,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + User *User `json:"user,omitempty"` + + Queue *Queue `json:"queue,omitempty"` + + Group *Group `json:"group,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ExternalContact *Externalcontact `json:"externalContact,omitempty"` + + ExternalOrganization *Externalorganization `json:"externalOrganization,omitempty"` + + DidInteract *bool `json:"didInteract,omitempty"` + + SipResponseCodes *[]int `json:"sipResponseCodes,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + OutboundCampaign *Campaign `json:"outboundCampaign,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + EndTime: EndTime, + + Purpose: u.Purpose, + + Direction: u.Direction, + + Ani: u.Ani, + + Dnis: u.Dnis, + + User: u.User, + + Queue: u.Queue, + + Group: u.Group, + + DisconnectType: u.DisconnectType, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + DidInteract: u.DidInteract, + + SipResponseCodes: u.SipResponseCodes, + + FlaggedReason: u.FlaggedReason, + + OutboundCampaign: u.OutboundCampaign, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callhistoryparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callmediaparticipant.go b/platformclientv2/callmediaparticipant.go index f9253726f..d3be63c24 100644 --- a/platformclientv2/callmediaparticipant.go +++ b/platformclientv2/callmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -193,6 +194,250 @@ type Callmediaparticipant struct { } +func (u *Callmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Team *Domainentityref `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Domainentityref `json:"externalContact,omitempty"` + + ExternalOrganization *Domainentityref `json:"externalOrganization,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + Peer *string `json:"peer,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Group *Domainentityref `json:"group,omitempty"` + + Ani *string `json:"ani,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + FaxStatus *Faxstatus `json:"faxStatus,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + Peer: u.Peer, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + ConversationRoutingData: u.ConversationRoutingData, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Muted: u.Muted, + + Confined: u.Confined, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Group: u.Group, + + Ani: u.Ani, + + Dnis: u.Dnis, + + DocumentId: u.DocumentId, + + FaxStatus: u.FaxStatus, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + ConsultParticipantId: u.ConsultParticipantId, + + UuiData: u.UuiData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callmediapolicy.go b/platformclientv2/callmediapolicy.go index 078c7da74..29ef55e65 100644 --- a/platformclientv2/callmediapolicy.go +++ b/platformclientv2/callmediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Callmediapolicy struct { } +func (u *Callmediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callmediapolicy + + + + return json.Marshal(&struct { + Actions *Policyactions `json:"actions,omitempty"` + + Conditions *Callmediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callmediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callmediapolicyconditions.go b/platformclientv2/callmediapolicyconditions.go index 31e123681..d42829c6c 100644 --- a/platformclientv2/callmediapolicyconditions.go +++ b/platformclientv2/callmediapolicyconditions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Callmediapolicyconditions struct { } +func (u *Callmediapolicyconditions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callmediapolicyconditions + + + + return json.Marshal(&struct { + ForUsers *[]User `json:"forUsers,omitempty"` + + DateRanges *[]string `json:"dateRanges,omitempty"` + + ForQueues *[]Queue `json:"forQueues,omitempty"` + + WrapupCodes *[]Wrapupcode `json:"wrapupCodes,omitempty"` + + Languages *[]Language `json:"languages,omitempty"` + + TimeAllowed *Timeallowed `json:"timeAllowed,omitempty"` + + Directions *[]string `json:"directions,omitempty"` + + Duration *Durationcondition `json:"duration,omitempty"` + *Alias + }{ + ForUsers: u.ForUsers, + + DateRanges: u.DateRanges, + + ForQueues: u.ForQueues, + + WrapupCodes: u.WrapupCodes, + + Languages: u.Languages, + + TimeAllowed: u.TimeAllowed, + + Directions: u.Directions, + + Duration: u.Duration, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callmediapolicyconditions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callrecord.go b/platformclientv2/callrecord.go index 106544a80..e69f493d4 100644 --- a/platformclientv2/callrecord.go +++ b/platformclientv2/callrecord.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Callrecord struct { } +func (u *Callrecord) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callrecord + + + LastAttempt := new(string) + if u.LastAttempt != nil { + + *LastAttempt = timeutil.Strftime(u.LastAttempt, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + LastAttempt = nil + } + + + return json.Marshal(&struct { + LastAttempt *string `json:"lastAttempt,omitempty"` + + LastResult *string `json:"lastResult,omitempty"` + *Alias + }{ + LastAttempt: LastAttempt, + + LastResult: u.LastResult, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callrecord) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/callroute.go b/platformclientv2/callroute.go index 63de1b0b9..4c957eff8 100644 --- a/platformclientv2/callroute.go +++ b/platformclientv2/callroute.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Callroute struct { } +func (u *Callroute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Callroute + + + + return json.Marshal(&struct { + Targets *[]Calltarget `json:"targets,omitempty"` + *Alias + }{ + Targets: u.Targets, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Callroute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/calltarget.go b/platformclientv2/calltarget.go index ef05c07f0..466393c6a 100644 --- a/platformclientv2/calltarget.go +++ b/platformclientv2/calltarget.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Calltarget struct { } +func (u *Calltarget) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Calltarget + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Calltarget) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/calltoaction.go b/platformclientv2/calltoaction.go index cee07a886..a037a9859 100644 --- a/platformclientv2/calltoaction.go +++ b/platformclientv2/calltoaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Calltoaction struct { } +func (u *Calltoaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Calltoaction + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Url *string `json:"url,omitempty"` + + Target *string `json:"target,omitempty"` + *Alias + }{ + Text: u.Text, + + Url: u.Url, + + Target: u.Target, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Calltoaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaign.go b/platformclientv2/campaign.go index 81143716c..ac969c348 100644 --- a/platformclientv2/campaign.go +++ b/platformclientv2/campaign.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -141,6 +142,166 @@ type Campaign struct { } +func (u *Campaign) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaign + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ContactList *Domainentityref `json:"contactList,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + DialingMode *string `json:"dialingMode,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + EdgeGroup *Domainentityref `json:"edgeGroup,omitempty"` + + Site *Domainentityref `json:"site,omitempty"` + + CampaignStatus *string `json:"campaignStatus,omitempty"` + + PhoneColumns *[]Phonecolumn `json:"phoneColumns,omitempty"` + + AbandonRate *float64 `json:"abandonRate,omitempty"` + + DncLists *[]Domainentityref `json:"dncLists,omitempty"` + + CallableTimeSet *Domainentityref `json:"callableTimeSet,omitempty"` + + CallAnalysisResponseSet *Domainentityref `json:"callAnalysisResponseSet,omitempty"` + + Errors *[]Resterrordetail `json:"errors,omitempty"` + + CallerName *string `json:"callerName,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + OutboundLineCount *int `json:"outboundLineCount,omitempty"` + + RuleSets *[]Domainentityref `json:"ruleSets,omitempty"` + + SkipPreviewDisabled *bool `json:"skipPreviewDisabled,omitempty"` + + PreviewTimeOutSeconds *int `json:"previewTimeOutSeconds,omitempty"` + + AlwaysRunning *bool `json:"alwaysRunning,omitempty"` + + ContactSort *Contactsort `json:"contactSort,omitempty"` + + ContactSorts *[]Contactsort `json:"contactSorts,omitempty"` + + NoAnswerTimeout *int `json:"noAnswerTimeout,omitempty"` + + CallAnalysisLanguage *string `json:"callAnalysisLanguage,omitempty"` + + Priority *int `json:"priority,omitempty"` + + ContactListFilters *[]Domainentityref `json:"contactListFilters,omitempty"` + + Division *Domainentityref `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ContactList: u.ContactList, + + Queue: u.Queue, + + DialingMode: u.DialingMode, + + Script: u.Script, + + EdgeGroup: u.EdgeGroup, + + Site: u.Site, + + CampaignStatus: u.CampaignStatus, + + PhoneColumns: u.PhoneColumns, + + AbandonRate: u.AbandonRate, + + DncLists: u.DncLists, + + CallableTimeSet: u.CallableTimeSet, + + CallAnalysisResponseSet: u.CallAnalysisResponseSet, + + Errors: u.Errors, + + CallerName: u.CallerName, + + CallerAddress: u.CallerAddress, + + OutboundLineCount: u.OutboundLineCount, + + RuleSets: u.RuleSets, + + SkipPreviewDisabled: u.SkipPreviewDisabled, + + PreviewTimeOutSeconds: u.PreviewTimeOutSeconds, + + AlwaysRunning: u.AlwaysRunning, + + ContactSort: u.ContactSort, + + ContactSorts: u.ContactSorts, + + NoAnswerTimeout: u.NoAnswerTimeout, + + CallAnalysisLanguage: u.CallAnalysisLanguage, + + Priority: u.Priority, + + ContactListFilters: u.ContactListFilters, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaign) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaigndiagnostics.go b/platformclientv2/campaigndiagnostics.go index 4ba68e248..2bbecf710 100644 --- a/platformclientv2/campaigndiagnostics.go +++ b/platformclientv2/campaigndiagnostics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Campaigndiagnostics struct { } +func (u *Campaigndiagnostics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaigndiagnostics + + + + return json.Marshal(&struct { + CallableContacts *Callablecontactsdiagnostic `json:"callableContacts,omitempty"` + + QueueUtilizationDiagnostic *Queueutilizationdiagnostic `json:"queueUtilizationDiagnostic,omitempty"` + + RuleSetDiagnostics *[]Rulesetdiagnostic `json:"ruleSetDiagnostics,omitempty"` + + OutstandingInteractionsCount *int `json:"outstandingInteractionsCount,omitempty"` + + ScheduledInteractionsCount *int `json:"scheduledInteractionsCount,omitempty"` + *Alias + }{ + CallableContacts: u.CallableContacts, + + QueueUtilizationDiagnostic: u.QueueUtilizationDiagnostic, + + RuleSetDiagnostics: u.RuleSetDiagnostics, + + OutstandingInteractionsCount: u.OutstandingInteractionsCount, + + ScheduledInteractionsCount: u.ScheduledInteractionsCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaigndiagnostics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaigndivisionview.go b/platformclientv2/campaigndivisionview.go index 11cd5886a..486c6ca3c 100644 --- a/platformclientv2/campaigndivisionview.go +++ b/platformclientv2/campaigndivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Campaigndivisionview struct { } +func (u *Campaigndivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaigndivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaigndivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaigndivisionviewlisting.go b/platformclientv2/campaigndivisionviewlisting.go index cbdab72d9..989f44d1a 100644 --- a/platformclientv2/campaigndivisionviewlisting.go +++ b/platformclientv2/campaigndivisionviewlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Campaigndivisionviewlisting struct { } +func (u *Campaigndivisionviewlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaigndivisionviewlisting + + + + return json.Marshal(&struct { + Entities *[]Campaigndivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaigndivisionviewlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignentitylisting.go b/platformclientv2/campaignentitylisting.go index 91a65185a..8d524485c 100644 --- a/platformclientv2/campaignentitylisting.go +++ b/platformclientv2/campaignentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Campaignentitylisting struct { } +func (u *Campaignentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignentitylisting + + + + return json.Marshal(&struct { + Entities *[]Campaign `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaigninteraction.go b/platformclientv2/campaigninteraction.go index 763837b76..1b84c449e 100644 --- a/platformclientv2/campaigninteraction.go +++ b/platformclientv2/campaigninteraction.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -93,6 +94,150 @@ type Campaigninteraction struct { } +func (u *Campaigninteraction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaigninteraction + + + LastActivePreviewWrapupTime := new(string) + if u.LastActivePreviewWrapupTime != nil { + + *LastActivePreviewWrapupTime = timeutil.Strftime(u.LastActivePreviewWrapupTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + LastActivePreviewWrapupTime = nil + } + + CreationTime := new(string) + if u.CreationTime != nil { + + *CreationTime = timeutil.Strftime(u.CreationTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreationTime = nil + } + + CallPlacedTime := new(string) + if u.CallPlacedTime != nil { + + *CallPlacedTime = timeutil.Strftime(u.CallPlacedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallPlacedTime = nil + } + + CallRoutedTime := new(string) + if u.CallRoutedTime != nil { + + *CallRoutedTime = timeutil.Strftime(u.CallRoutedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallRoutedTime = nil + } + + PreviewConnectedTime := new(string) + if u.PreviewConnectedTime != nil { + + *PreviewConnectedTime = timeutil.Strftime(u.PreviewConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PreviewConnectedTime = nil + } + + PreviewPopDeliveredTime := new(string) + if u.PreviewPopDeliveredTime != nil { + + *PreviewPopDeliveredTime = timeutil.Strftime(u.PreviewPopDeliveredTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PreviewPopDeliveredTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Campaign *Domainentityref `json:"campaign,omitempty"` + + Agent *Domainentityref `json:"agent,omitempty"` + + Contact *Domainentityref `json:"contact,omitempty"` + + DestinationAddress *string `json:"destinationAddress,omitempty"` + + ActivePreviewCall *bool `json:"activePreviewCall,omitempty"` + + LastActivePreviewWrapupTime *string `json:"lastActivePreviewWrapupTime,omitempty"` + + CreationTime *string `json:"creationTime,omitempty"` + + CallPlacedTime *string `json:"callPlacedTime,omitempty"` + + CallRoutedTime *string `json:"callRoutedTime,omitempty"` + + PreviewConnectedTime *string `json:"previewConnectedTime,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + Disposition *string `json:"disposition,omitempty"` + + CallerName *string `json:"callerName,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + PreviewPopDeliveredTime *string `json:"previewPopDeliveredTime,omitempty"` + + Conversation *Conversationbasic `json:"conversation,omitempty"` + + DialerSystemParticipantId *string `json:"dialerSystemParticipantId,omitempty"` + + DialingMode *string `json:"dialingMode,omitempty"` + + Skills *[]Domainentityref `json:"skills,omitempty"` + *Alias + }{ + Id: u.Id, + + Campaign: u.Campaign, + + Agent: u.Agent, + + Contact: u.Contact, + + DestinationAddress: u.DestinationAddress, + + ActivePreviewCall: u.ActivePreviewCall, + + LastActivePreviewWrapupTime: LastActivePreviewWrapupTime, + + CreationTime: CreationTime, + + CallPlacedTime: CallPlacedTime, + + CallRoutedTime: CallRoutedTime, + + PreviewConnectedTime: PreviewConnectedTime, + + Queue: u.Queue, + + Script: u.Script, + + Disposition: u.Disposition, + + CallerName: u.CallerName, + + CallerAddress: u.CallerAddress, + + PreviewPopDeliveredTime: PreviewPopDeliveredTime, + + Conversation: u.Conversation, + + DialerSystemParticipantId: u.DialerSystemParticipantId, + + DialingMode: u.DialingMode, + + Skills: u.Skills, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaigninteraction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaigninteractions.go b/platformclientv2/campaigninteractions.go index 213bd086d..c91c17ae0 100644 --- a/platformclientv2/campaigninteractions.go +++ b/platformclientv2/campaigninteractions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Campaigninteractions struct { } +func (u *Campaigninteractions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaigninteractions + + + + return json.Marshal(&struct { + Campaign *Domainentityref `json:"campaign,omitempty"` + + PendingInteractions *[]Campaigninteraction `json:"pendingInteractions,omitempty"` + + ProceedingInteractions *[]Campaigninteraction `json:"proceedingInteractions,omitempty"` + + PreviewingInteractions *[]Campaigninteraction `json:"previewingInteractions,omitempty"` + + InteractingInteractions *[]Campaigninteraction `json:"interactingInteractions,omitempty"` + + ScheduledInteractions *[]Campaigninteraction `json:"scheduledInteractions,omitempty"` + *Alias + }{ + Campaign: u.Campaign, + + PendingInteractions: u.PendingInteractions, + + ProceedingInteractions: u.ProceedingInteractions, + + PreviewingInteractions: u.PreviewingInteractions, + + InteractingInteractions: u.InteractingInteractions, + + ScheduledInteractions: u.ScheduledInteractions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaigninteractions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignprogress.go b/platformclientv2/campaignprogress.go index eb44e9e64..32dd7161e 100644 --- a/platformclientv2/campaignprogress.go +++ b/platformclientv2/campaignprogress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Campaignprogress struct { } +func (u *Campaignprogress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignprogress + + + + return json.Marshal(&struct { + Campaign *Domainentityref `json:"campaign,omitempty"` + + ContactList *Domainentityref `json:"contactList,omitempty"` + + NumberOfContactsCalled *int `json:"numberOfContactsCalled,omitempty"` + + NumberOfContactsMessaged *int `json:"numberOfContactsMessaged,omitempty"` + + TotalNumberOfContacts *int `json:"totalNumberOfContacts,omitempty"` + + Percentage *int `json:"percentage,omitempty"` + *Alias + }{ + Campaign: u.Campaign, + + ContactList: u.ContactList, + + NumberOfContactsCalled: u.NumberOfContactsCalled, + + NumberOfContactsMessaged: u.NumberOfContactsMessaged, + + TotalNumberOfContacts: u.TotalNumberOfContacts, + + Percentage: u.Percentage, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignprogress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignrule.go b/platformclientv2/campaignrule.go index 044eb10d6..8f6a8d474 100644 --- a/platformclientv2/campaignrule.go +++ b/platformclientv2/campaignrule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Campaignrule struct { } +func (u *Campaignrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignrule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + CampaignRuleEntities *Campaignruleentities `json:"campaignRuleEntities,omitempty"` + + CampaignRuleConditions *[]Campaignrulecondition `json:"campaignRuleConditions,omitempty"` + + CampaignRuleActions *[]Campaignruleaction `json:"campaignRuleActions,omitempty"` + + MatchAnyConditions *bool `json:"matchAnyConditions,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + CampaignRuleEntities: u.CampaignRuleEntities, + + CampaignRuleConditions: u.CampaignRuleConditions, + + CampaignRuleActions: u.CampaignRuleActions, + + MatchAnyConditions: u.MatchAnyConditions, + + Enabled: u.Enabled, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignruleaction.go b/platformclientv2/campaignruleaction.go index f07bab3c6..b424256f4 100644 --- a/platformclientv2/campaignruleaction.go +++ b/platformclientv2/campaignruleaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Campaignruleaction struct { } +func (u *Campaignruleaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignruleaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Parameters *Campaignruleparameters `json:"parameters,omitempty"` + + ActionType *string `json:"actionType,omitempty"` + + CampaignRuleActionEntities *Campaignruleactionentities `json:"campaignRuleActionEntities,omitempty"` + *Alias + }{ + Id: u.Id, + + Parameters: u.Parameters, + + ActionType: u.ActionType, + + CampaignRuleActionEntities: u.CampaignRuleActionEntities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignruleaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignruleactionentities.go b/platformclientv2/campaignruleactionentities.go index 41055b43c..22ea6e950 100644 --- a/platformclientv2/campaignruleactionentities.go +++ b/platformclientv2/campaignruleactionentities.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Campaignruleactionentities struct { } +func (u *Campaignruleactionentities) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignruleactionentities + + + + return json.Marshal(&struct { + Campaigns *[]Domainentityref `json:"campaigns,omitempty"` + + Sequences *[]Domainentityref `json:"sequences,omitempty"` + + UseTriggeringEntity *bool `json:"useTriggeringEntity,omitempty"` + *Alias + }{ + Campaigns: u.Campaigns, + + Sequences: u.Sequences, + + UseTriggeringEntity: u.UseTriggeringEntity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignruleactionentities) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignrulecondition.go b/platformclientv2/campaignrulecondition.go index 0d0a48024..a8eea6ba0 100644 --- a/platformclientv2/campaignrulecondition.go +++ b/platformclientv2/campaignrulecondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Campaignrulecondition struct { } +func (u *Campaignrulecondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignrulecondition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Parameters *Campaignruleparameters `json:"parameters,omitempty"` + + ConditionType *string `json:"conditionType,omitempty"` + *Alias + }{ + Id: u.Id, + + Parameters: u.Parameters, + + ConditionType: u.ConditionType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignrulecondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignruleentities.go b/platformclientv2/campaignruleentities.go index 0ebca51ee..acca7bf43 100644 --- a/platformclientv2/campaignruleentities.go +++ b/platformclientv2/campaignruleentities.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Campaignruleentities struct { } +func (u *Campaignruleentities) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignruleentities + + + + return json.Marshal(&struct { + Campaigns *[]Domainentityref `json:"campaigns,omitempty"` + + Sequences *[]Domainentityref `json:"sequences,omitempty"` + *Alias + }{ + Campaigns: u.Campaigns, + + Sequences: u.Sequences, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignruleentities) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignruleentitylisting.go b/platformclientv2/campaignruleentitylisting.go index b5898c0e8..49efd6ba0 100644 --- a/platformclientv2/campaignruleentitylisting.go +++ b/platformclientv2/campaignruleentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Campaignruleentitylisting struct { } +func (u *Campaignruleentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignruleentitylisting + + + + return json.Marshal(&struct { + Entities *[]Campaignrule `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignruleentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignruleparameters.go b/platformclientv2/campaignruleparameters.go index 981f485f1..0697094a9 100644 --- a/platformclientv2/campaignruleparameters.go +++ b/platformclientv2/campaignruleparameters.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Campaignruleparameters struct { } +func (u *Campaignruleparameters) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignruleparameters + + + + return json.Marshal(&struct { + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + Priority *string `json:"priority,omitempty"` + + DialingMode *string `json:"dialingMode,omitempty"` + *Alias + }{ + Operator: u.Operator, + + Value: u.Value, + + Priority: u.Priority, + + DialingMode: u.DialingMode, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignruleparameters) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignschedule.go b/platformclientv2/campaignschedule.go index b61c34d5a..579b926b4 100644 --- a/platformclientv2/campaignschedule.go +++ b/platformclientv2/campaignschedule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Campaignschedule struct { } +func (u *Campaignschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignschedule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Intervals *[]Scheduleinterval `json:"intervals,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + Campaign *Domainentityref `json:"campaign,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Intervals: u.Intervals, + + TimeZone: u.TimeZone, + + Campaign: u.Campaign, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignsequence.go b/platformclientv2/campaignsequence.go index 3a62b606c..e9d58531c 100644 --- a/platformclientv2/campaignsequence.go +++ b/platformclientv2/campaignsequence.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Campaignsequence struct { } +func (u *Campaignsequence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignsequence + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Campaigns *[]Domainentityref `json:"campaigns,omitempty"` + + CurrentCampaign *int `json:"currentCampaign,omitempty"` + + Status *string `json:"status,omitempty"` + + StopMessage *string `json:"stopMessage,omitempty"` + + Repeat *bool `json:"repeat,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Campaigns: u.Campaigns, + + CurrentCampaign: u.CurrentCampaign, + + Status: u.Status, + + StopMessage: u.StopMessage, + + Repeat: u.Repeat, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignsequence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignsequenceentitylisting.go b/platformclientv2/campaignsequenceentitylisting.go index 2689835d2..2ef839a9a 100644 --- a/platformclientv2/campaignsequenceentitylisting.go +++ b/platformclientv2/campaignsequenceentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Campaignsequenceentitylisting struct { } +func (u *Campaignsequenceentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignsequenceentitylisting + + + + return json.Marshal(&struct { + Entities *[]Campaignsequence `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignsequenceentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaignstats.go b/platformclientv2/campaignstats.go index f11fad9e2..d91c26356 100644 --- a/platformclientv2/campaignstats.go +++ b/platformclientv2/campaignstats.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Campaignstats struct { } +func (u *Campaignstats) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaignstats + + + + return json.Marshal(&struct { + ContactRate *Connectrate `json:"contactRate,omitempty"` + + IdleAgents *int `json:"idleAgents,omitempty"` + + EffectiveIdleAgents *float64 `json:"effectiveIdleAgents,omitempty"` + + AdjustedCallsPerAgent *float64 `json:"adjustedCallsPerAgent,omitempty"` + + OutstandingCalls *int `json:"outstandingCalls,omitempty"` + + ScheduledCalls *int `json:"scheduledCalls,omitempty"` + *Alias + }{ + ContactRate: u.ContactRate, + + IdleAgents: u.IdleAgents, + + EffectiveIdleAgents: u.EffectiveIdleAgents, + + AdjustedCallsPerAgent: u.AdjustedCallsPerAgent, + + OutstandingCalls: u.OutstandingCalls, + + ScheduledCalls: u.ScheduledCalls, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaignstats) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/campaigntimeslot.go b/platformclientv2/campaigntimeslot.go index e9b455c51..5f026fbf1 100644 --- a/platformclientv2/campaigntimeslot.go +++ b/platformclientv2/campaigntimeslot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Campaigntimeslot struct { } +func (u *Campaigntimeslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Campaigntimeslot + + + + return json.Marshal(&struct { + StartTime *string `json:"startTime,omitempty"` + + StopTime *string `json:"stopTime,omitempty"` + + Day *int `json:"day,omitempty"` + *Alias + }{ + StartTime: u.StartTime, + + StopTime: u.StopTime, + + Day: u.Day, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Campaigntimeslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/category.go b/platformclientv2/category.go index 101f8230f..57ed8a5ea 100644 --- a/platformclientv2/category.go +++ b/platformclientv2/category.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Category struct { } +func (u *Category) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Category + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Category) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/categoryentitylisting.go b/platformclientv2/categoryentitylisting.go index 81b86dbbf..19ca52419 100644 --- a/platformclientv2/categoryentitylisting.go +++ b/platformclientv2/categoryentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Categoryentitylisting struct { } +func (u *Categoryentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Categoryentitylisting + + + + return json.Marshal(&struct { + Entities *[]Category `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Categoryentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/categorylisting.go b/platformclientv2/categorylisting.go index d3cdeceda..d1bd9e5e8 100644 --- a/platformclientv2/categorylisting.go +++ b/platformclientv2/categorylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Categorylisting struct { } +func (u *Categorylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Categorylisting + + + + return json.Marshal(&struct { + Entities *[]Knowledgecategory `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Categorylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/certificate.go b/platformclientv2/certificate.go index a1b17a4a0..ab584d04c 100644 --- a/platformclientv2/certificate.go +++ b/platformclientv2/certificate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Certificate struct { } +func (u *Certificate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Certificate + + + + return json.Marshal(&struct { + Certificate *string `json:"certificate,omitempty"` + *Alias + }{ + Certificate: u.Certificate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Certificate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/certificateauthorityentitylisting.go b/platformclientv2/certificateauthorityentitylisting.go index 8b1c5fbfb..17c1ad93f 100644 --- a/platformclientv2/certificateauthorityentitylisting.go +++ b/platformclientv2/certificateauthorityentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Certificateauthorityentitylisting struct { } +func (u *Certificateauthorityentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Certificateauthorityentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domaincertificateauthority `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Certificateauthorityentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/certificatedetails.go b/platformclientv2/certificatedetails.go index 36939884c..05f1c4588 100644 --- a/platformclientv2/certificatedetails.go +++ b/platformclientv2/certificatedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Certificatedetails struct { } +func (u *Certificatedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Certificatedetails + + + ExpirationDate := new(string) + if u.ExpirationDate != nil { + + *ExpirationDate = timeutil.Strftime(u.ExpirationDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExpirationDate = nil + } + + IssueDate := new(string) + if u.IssueDate != nil { + + *IssueDate = timeutil.Strftime(u.IssueDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + IssueDate = nil + } + + + return json.Marshal(&struct { + Issuer *string `json:"issuer,omitempty"` + + Subject *string `json:"subject,omitempty"` + + ExpirationDate *string `json:"expirationDate,omitempty"` + + IssueDate *string `json:"issueDate,omitempty"` + + Expired *bool `json:"expired,omitempty"` + + SignatureValid *bool `json:"signatureValid,omitempty"` + + Valid *bool `json:"valid,omitempty"` + *Alias + }{ + Issuer: u.Issuer, + + Subject: u.Subject, + + ExpirationDate: ExpirationDate, + + IssueDate: IssueDate, + + Expired: u.Expired, + + SignatureValid: u.SignatureValid, + + Valid: u.Valid, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Certificatedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/change.go b/platformclientv2/change.go index 4e61ba739..77e2abc3e 100644 --- a/platformclientv2/change.go +++ b/platformclientv2/change.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Change struct { } +func (u *Change) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Change + + + + return json.Marshal(&struct { + Entity *Auditentity `json:"entity,omitempty"` + + Property *string `json:"property,omitempty"` + + OldValues *[]string `json:"oldValues,omitempty"` + + NewValues *[]string `json:"newValues,omitempty"` + *Alias + }{ + Entity: u.Entity, + + Property: u.Property, + + OldValues: u.OldValues, + + NewValues: u.NewValues, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Change) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/changemypasswordrequest.go b/platformclientv2/changemypasswordrequest.go index fa87a7fea..3ac1b8c07 100644 --- a/platformclientv2/changemypasswordrequest.go +++ b/platformclientv2/changemypasswordrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Changemypasswordrequest struct { } +func (u *Changemypasswordrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Changemypasswordrequest + + + + return json.Marshal(&struct { + NewPassword *string `json:"newPassword,omitempty"` + + OldPassword *string `json:"oldPassword,omitempty"` + *Alias + }{ + NewPassword: u.NewPassword, + + OldPassword: u.OldPassword, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Changemypasswordrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/changepasswordrequest.go b/platformclientv2/changepasswordrequest.go index 307f8c0d0..5eab9d0e5 100644 --- a/platformclientv2/changepasswordrequest.go +++ b/platformclientv2/changepasswordrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Changepasswordrequest struct { } +func (u *Changepasswordrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Changepasswordrequest + + + + return json.Marshal(&struct { + NewPassword *string `json:"newPassword,omitempty"` + *Alias + }{ + NewPassword: u.NewPassword, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Changepasswordrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/channel.go b/platformclientv2/channel.go index f655f9dbc..592e01c40 100644 --- a/platformclientv2/channel.go +++ b/platformclientv2/channel.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Channel struct { } +func (u *Channel) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Channel + + + Expires := new(string) + if u.Expires != nil { + + *Expires = timeutil.Strftime(u.Expires, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Expires = nil + } + + + return json.Marshal(&struct { + ConnectUri *string `json:"connectUri,omitempty"` + + Id *string `json:"id,omitempty"` + + Expires *string `json:"expires,omitempty"` + *Alias + }{ + ConnectUri: u.ConnectUri, + + Id: u.Id, + + Expires: Expires, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Channel) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/channelentitylisting.go b/platformclientv2/channelentitylisting.go index 9802912ce..3c0d7072e 100644 --- a/platformclientv2/channelentitylisting.go +++ b/platformclientv2/channelentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Channelentitylisting struct { } +func (u *Channelentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Channelentitylisting + + + + return json.Marshal(&struct { + Entities *[]Channel `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Channelentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/channeltopic.go b/platformclientv2/channeltopic.go index a00c67bf4..18fcb150e 100644 --- a/platformclientv2/channeltopic.go +++ b/platformclientv2/channeltopic.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Channeltopic struct { } +func (u *Channeltopic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Channeltopic + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Channeltopic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/channeltopicentitylisting.go b/platformclientv2/channeltopicentitylisting.go index 25b6279e9..8e9af5cdd 100644 --- a/platformclientv2/channeltopicentitylisting.go +++ b/platformclientv2/channeltopicentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Channeltopicentitylisting struct { } +func (u *Channeltopicentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Channeltopicentitylisting + + + + return json.Marshal(&struct { + Entities *[]Channeltopic `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Channeltopicentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chat.go b/platformclientv2/chat.go index 9cea4d864..d403cc313 100644 --- a/platformclientv2/chat.go +++ b/platformclientv2/chat.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Chat struct { } +func (u *Chat) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chat + + + + return json.Marshal(&struct { + JabberId *string `json:"jabberId,omitempty"` + *Alias + }{ + JabberId: u.JabberId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chat) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatbadgetopicbadgeentity.go b/platformclientv2/chatbadgetopicbadgeentity.go index b34689f85..e3ee54e5b 100644 --- a/platformclientv2/chatbadgetopicbadgeentity.go +++ b/platformclientv2/chatbadgetopicbadgeentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Chatbadgetopicbadgeentity struct { } +func (u *Chatbadgetopicbadgeentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatbadgetopicbadgeentity + + + + return json.Marshal(&struct { + JabberId *string `json:"jabberId,omitempty"` + *Alias + }{ + JabberId: u.JabberId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatbadgetopicbadgeentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatbadgetopicchatbadge.go b/platformclientv2/chatbadgetopicchatbadge.go index 4d55fd768..ce3916e9d 100644 --- a/platformclientv2/chatbadgetopicchatbadge.go +++ b/platformclientv2/chatbadgetopicchatbadge.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Chatbadgetopicchatbadge struct { } +func (u *Chatbadgetopicchatbadge) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatbadgetopicchatbadge + + + LastUnreadNotificationDate := new(string) + if u.LastUnreadNotificationDate != nil { + + *LastUnreadNotificationDate = timeutil.Strftime(u.LastUnreadNotificationDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + LastUnreadNotificationDate = nil + } + + + return json.Marshal(&struct { + Entity *Chatbadgetopicbadgeentity `json:"entity,omitempty"` + + UnreadCount *int `json:"unreadCount,omitempty"` + + LastUnreadNotificationDate *string `json:"lastUnreadNotificationDate,omitempty"` + *Alias + }{ + Entity: u.Entity, + + UnreadCount: u.UnreadCount, + + LastUnreadNotificationDate: LastUnreadNotificationDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatbadgetopicchatbadge) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatconversation.go b/platformclientv2/chatconversation.go index 22d7b8197..4d49561f5 100644 --- a/platformclientv2/chatconversation.go +++ b/platformclientv2/chatconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Chatconversation struct { } +func (u *Chatconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Chatmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatconversationentitylisting.go b/platformclientv2/chatconversationentitylisting.go index 90ae61456..b164b5f21 100644 --- a/platformclientv2/chatconversationentitylisting.go +++ b/platformclientv2/chatconversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Chatconversationentitylisting struct { } +func (u *Chatconversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatconversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Chatconversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatconversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatmediaparticipant.go b/platformclientv2/chatmediaparticipant.go index aa34ee407..3f223501b 100644 --- a/platformclientv2/chatmediaparticipant.go +++ b/platformclientv2/chatmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -149,6 +150,206 @@ type Chatmediaparticipant struct { } +func (u *Chatmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Team *Domainentityref `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Domainentityref `json:"externalContact,omitempty"` + + ExternalOrganization *Domainentityref `json:"externalOrganization,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + Peer *string `json:"peer,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + Peer: u.Peer, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + ConversationRoutingData: u.ConversationRoutingData, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + RoomId: u.RoomId, + + AvatarImageUrl: u.AvatarImageUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatmediapolicy.go b/platformclientv2/chatmediapolicy.go index de6b0fe7f..29583c55d 100644 --- a/platformclientv2/chatmediapolicy.go +++ b/platformclientv2/chatmediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Chatmediapolicy struct { } +func (u *Chatmediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatmediapolicy + + + + return json.Marshal(&struct { + Actions *Policyactions `json:"actions,omitempty"` + + Conditions *Chatmediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatmediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatmediapolicyconditions.go b/platformclientv2/chatmediapolicyconditions.go index d1590a135..7c2885f11 100644 --- a/platformclientv2/chatmediapolicyconditions.go +++ b/platformclientv2/chatmediapolicyconditions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Chatmediapolicyconditions struct { } +func (u *Chatmediapolicyconditions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatmediapolicyconditions + + + + return json.Marshal(&struct { + ForUsers *[]User `json:"forUsers,omitempty"` + + DateRanges *[]string `json:"dateRanges,omitempty"` + + ForQueues *[]Queue `json:"forQueues,omitempty"` + + WrapupCodes *[]Wrapupcode `json:"wrapupCodes,omitempty"` + + Languages *[]Language `json:"languages,omitempty"` + + TimeAllowed *Timeallowed `json:"timeAllowed,omitempty"` + + Duration *Durationcondition `json:"duration,omitempty"` + *Alias + }{ + ForUsers: u.ForUsers, + + DateRanges: u.DateRanges, + + ForQueues: u.ForQueues, + + WrapupCodes: u.WrapupCodes, + + Languages: u.Languages, + + TimeAllowed: u.TimeAllowed, + + Duration: u.Duration, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatmediapolicyconditions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatmessage.go b/platformclientv2/chatmessage.go index 65fae4315..8f36e48e0 100644 --- a/platformclientv2/chatmessage.go +++ b/platformclientv2/chatmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Chatmessage struct { } +func (u *Chatmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatmessage + + + + return json.Marshal(&struct { + Body *string `json:"body,omitempty"` + + Id *string `json:"id,omitempty"` + + To *string `json:"to,omitempty"` + + From *string `json:"from,omitempty"` + + Utc *string `json:"utc,omitempty"` + + Chat *string `json:"chat,omitempty"` + + Message *string `json:"message,omitempty"` + + VarType *string `json:"type,omitempty"` + + BodyType *string `json:"bodyType,omitempty"` + + SenderCommunicationId *string `json:"senderCommunicationId,omitempty"` + + ParticipantPurpose *string `json:"participantPurpose,omitempty"` + + User *Chatmessageuser `json:"user,omitempty"` + *Alias + }{ + Body: u.Body, + + Id: u.Id, + + To: u.To, + + From: u.From, + + Utc: u.Utc, + + Chat: u.Chat, + + Message: u.Message, + + VarType: u.VarType, + + BodyType: u.BodyType, + + SenderCommunicationId: u.SenderCommunicationId, + + ParticipantPurpose: u.ParticipantPurpose, + + User: u.User, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatmessageuser.go b/platformclientv2/chatmessageuser.go index fe44f8f9f..8086ba6bf 100644 --- a/platformclientv2/chatmessageuser.go +++ b/platformclientv2/chatmessageuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Chatmessageuser struct { } +func (u *Chatmessageuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatmessageuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + Username *string `json:"username,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DisplayName: u.DisplayName, + + Username: u.Username, + + Images: u.Images, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatmessageuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/chatsettings.go b/platformclientv2/chatsettings.go index 4b47943d0..160da7a96 100644 --- a/platformclientv2/chatsettings.go +++ b/platformclientv2/chatsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Chatsettings struct { } +func (u *Chatsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Chatsettings + + + + return json.Marshal(&struct { + MessageRetentionPeriodDays *int `json:"messageRetentionPeriodDays,omitempty"` + *Alias + }{ + MessageRetentionPeriodDays: u.MessageRetentionPeriodDays, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Chatsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/check.go b/platformclientv2/check.go index 115575f4f..502b65157 100644 --- a/platformclientv2/check.go +++ b/platformclientv2/check.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Check struct { } +func (u *Check) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Check + + + + return json.Marshal(&struct { + Result *string `json:"result,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Result: u.Result, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Check) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/clientapp.go b/platformclientv2/clientapp.go index c1ef24b0a..728174fcf 100644 --- a/platformclientv2/clientapp.go +++ b/platformclientv2/clientapp.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Clientapp struct { } +func (u *Clientapp) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Clientapp + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + IntegrationType *Integrationtype `json:"integrationType,omitempty"` + + Notes *string `json:"notes,omitempty"` + + IntendedState *string `json:"intendedState,omitempty"` + + Config *Clientappconfigurationinfo `json:"config,omitempty"` + + ReportedState *Integrationstatusinfo `json:"reportedState,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + IntegrationType: u.IntegrationType, + + Notes: u.Notes, + + IntendedState: u.IntendedState, + + Config: u.Config, + + ReportedState: u.ReportedState, + + Attributes: u.Attributes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Clientapp) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/clientappconfigurationinfo.go b/platformclientv2/clientappconfigurationinfo.go index 65e4958ee..6b7ae8110 100644 --- a/platformclientv2/clientappconfigurationinfo.go +++ b/platformclientv2/clientappconfigurationinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Clientappconfigurationinfo struct { } +func (u *Clientappconfigurationinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Clientappconfigurationinfo + + + + return json.Marshal(&struct { + Current *Integrationconfiguration `json:"current,omitempty"` + + Effective *Effectiveconfiguration `json:"effective,omitempty"` + *Alias + }{ + Current: u.Current, + + Effective: u.Effective, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Clientappconfigurationinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/clientappentitylisting.go b/platformclientv2/clientappentitylisting.go index 4332de5c1..07be66ed0 100644 --- a/platformclientv2/clientappentitylisting.go +++ b/platformclientv2/clientappentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Clientappentitylisting struct { } +func (u *Clientappentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Clientappentitylisting + + + + return json.Marshal(&struct { + Entities *[]Clientapp `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Clientappentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/closebuttonstyleproperties.go b/platformclientv2/closebuttonstyleproperties.go index ede321c78..29cd7ea32 100644 --- a/platformclientv2/closebuttonstyleproperties.go +++ b/platformclientv2/closebuttonstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Closebuttonstyleproperties struct { } +func (u *Closebuttonstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Closebuttonstyleproperties + + + + return json.Marshal(&struct { + Color *string `json:"color,omitempty"` + + Opacity *float32 `json:"opacity,omitempty"` + *Alias + }{ + Color: u.Color, + + Opacity: u.Opacity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Closebuttonstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingannotation.go b/platformclientv2/coachingannotation.go index 5cdbfd451..f02e51e5f 100644 --- a/platformclientv2/coachingannotation.go +++ b/platformclientv2/coachingannotation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Coachingannotation struct { } +func (u *Coachingannotation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingannotation + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + CreatedBy *Userreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Text *string `json:"text,omitempty"` + + IsDeleted *bool `json:"isDeleted,omitempty"` + + AccessType *string `json:"accessType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + Text: u.Text, + + IsDeleted: u.IsDeleted, + + AccessType: u.AccessType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingannotation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingannotationcreaterequest.go b/platformclientv2/coachingannotationcreaterequest.go index 9a8e29b45..78964cf39 100644 --- a/platformclientv2/coachingannotationcreaterequest.go +++ b/platformclientv2/coachingannotationcreaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Coachingannotationcreaterequest struct { } +func (u *Coachingannotationcreaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingannotationcreaterequest + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + AccessType *string `json:"accessType,omitempty"` + *Alias + }{ + Text: u.Text, + + AccessType: u.AccessType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingannotationcreaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingannotationlist.go b/platformclientv2/coachingannotationlist.go index a03b86ba4..b941d1cdd 100644 --- a/platformclientv2/coachingannotationlist.go +++ b/platformclientv2/coachingannotationlist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Coachingannotationlist struct { } +func (u *Coachingannotationlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingannotationlist + + + + return json.Marshal(&struct { + Entities *[]Coachingannotation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingannotationlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentaggregaterequest.go b/platformclientv2/coachingappointmentaggregaterequest.go index fe21c2b75..d6e1ed7c7 100644 --- a/platformclientv2/coachingappointmentaggregaterequest.go +++ b/platformclientv2/coachingappointmentaggregaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Coachingappointmentaggregaterequest struct { } +func (u *Coachingappointmentaggregaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentaggregaterequest + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Queryrequestfilter `json:"filter,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentaggregaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentaggregateresponse.go b/platformclientv2/coachingappointmentaggregateresponse.go index 31e24cbf8..31b213f90 100644 --- a/platformclientv2/coachingappointmentaggregateresponse.go +++ b/platformclientv2/coachingappointmentaggregateresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Coachingappointmentaggregateresponse struct { } +func (u *Coachingappointmentaggregateresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentaggregateresponse + + + + return json.Marshal(&struct { + Results *[]Queryresponsegroupeddata `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentaggregateresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentreference.go b/platformclientv2/coachingappointmentreference.go index 559945316..05e6073e0 100644 --- a/platformclientv2/coachingappointmentreference.go +++ b/platformclientv2/coachingappointmentreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Coachingappointmentreference struct { } +func (u *Coachingappointmentreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentresponse.go b/platformclientv2/coachingappointmentresponse.go index bbe65068f..93c72d5ef 100644 --- a/platformclientv2/coachingappointmentresponse.go +++ b/platformclientv2/coachingappointmentresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,106 @@ type Coachingappointmentresponse struct { } +func (u *Coachingappointmentresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentresponse + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Status *string `json:"status,omitempty"` + + Facilitator *Userreference `json:"facilitator,omitempty"` + + Attendees *[]Userreference `json:"attendees,omitempty"` + + CreatedBy *Userreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Conversations *[]Conversationreference `json:"conversations,omitempty"` + + Documents *[]Documentreference `json:"documents,omitempty"` + + IsOverdue *bool `json:"isOverdue,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + DateStart: DateStart, + + LengthInMinutes: u.LengthInMinutes, + + Status: u.Status, + + Facilitator: u.Facilitator, + + Attendees: u.Attendees, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + Conversations: u.Conversations, + + Documents: u.Documents, + + IsOverdue: u.IsOverdue, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentresponselist.go b/platformclientv2/coachingappointmentresponselist.go index 4bbae686f..9f19d9a2e 100644 --- a/platformclientv2/coachingappointmentresponselist.go +++ b/platformclientv2/coachingappointmentresponselist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Coachingappointmentresponselist struct { } +func (u *Coachingappointmentresponselist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentresponselist + + + + return json.Marshal(&struct { + Entities *[]Coachingappointmentresponse `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentresponselist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentstatusrequest.go b/platformclientv2/coachingappointmentstatusrequest.go index 3a761812c..d08944adf 100644 --- a/platformclientv2/coachingappointmentstatusrequest.go +++ b/platformclientv2/coachingappointmentstatusrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Coachingappointmentstatusrequest struct { } +func (u *Coachingappointmentstatusrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentstatusrequest + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + *Alias + }{ + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentstatusrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentstatusresponse.go b/platformclientv2/coachingappointmentstatusresponse.go index d60adf22c..0c03647ea 100644 --- a/platformclientv2/coachingappointmentstatusresponse.go +++ b/platformclientv2/coachingappointmentstatusresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Coachingappointmentstatusresponse struct { } +func (u *Coachingappointmentstatusresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentstatusresponse + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Appointment *Coachingappointmentreference `json:"appointment,omitempty"` + + CreatedBy *Userreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + Appointment: u.Appointment, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentstatusresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingappointmentstatusresponselist.go b/platformclientv2/coachingappointmentstatusresponselist.go index 7b8262355..8bb2f4b2c 100644 --- a/platformclientv2/coachingappointmentstatusresponselist.go +++ b/platformclientv2/coachingappointmentstatusresponselist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Coachingappointmentstatusresponselist struct { } +func (u *Coachingappointmentstatusresponselist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingappointmentstatusresponselist + + + + return json.Marshal(&struct { + Entities *[]Coachingappointmentstatusresponse `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingappointmentstatusresponselist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingnotification.go b/platformclientv2/coachingnotification.go index 13404e0dd..f4f3739fe 100644 --- a/platformclientv2/coachingnotification.go +++ b/platformclientv2/coachingnotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Coachingnotification struct { } +func (u *Coachingnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingnotification + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + MarkedAsRead *bool `json:"markedAsRead,omitempty"` + + ActionType *string `json:"actionType,omitempty"` + + Relationship *string `json:"relationship,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Status *string `json:"status,omitempty"` + + User *Userreference `json:"user,omitempty"` + + Appointment *Coachingappointmentresponse `json:"appointment,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + MarkedAsRead: u.MarkedAsRead, + + ActionType: u.ActionType, + + Relationship: u.Relationship, + + DateStart: DateStart, + + LengthInMinutes: u.LengthInMinutes, + + Status: u.Status, + + User: u.User, + + Appointment: u.Appointment, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingnotificationlist.go b/platformclientv2/coachingnotificationlist.go index 53771bcc4..d80d62a6b 100644 --- a/platformclientv2/coachingnotificationlist.go +++ b/platformclientv2/coachingnotificationlist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Coachingnotificationlist struct { } +func (u *Coachingnotificationlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingnotificationlist + + + + return json.Marshal(&struct { + Entities *[]Coachingnotification `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingnotificationlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingslot.go b/platformclientv2/coachingslot.go index cea562fd5..8af24a4c2 100644 --- a/platformclientv2/coachingslot.go +++ b/platformclientv2/coachingslot.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Coachingslot struct { } +func (u *Coachingslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingslot + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + DateStart *string `json:"dateStart,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + StaffingDifference *float64 `json:"staffingDifference,omitempty"` + + DifferenceRating *string `json:"differenceRating,omitempty"` + + WfmSchedule *Wfmschedulereference `json:"wfmSchedule,omitempty"` + *Alias + }{ + DateStart: DateStart, + + LengthInMinutes: u.LengthInMinutes, + + StaffingDifference: u.StaffingDifference, + + DifferenceRating: u.DifferenceRating, + + WfmSchedule: u.WfmSchedule, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingslotsrequest.go b/platformclientv2/coachingslotsrequest.go index 68d376858..38e043177 100644 --- a/platformclientv2/coachingslotsrequest.go +++ b/platformclientv2/coachingslotsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Coachingslotsrequest struct { } +func (u *Coachingslotsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingslotsrequest + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + AttendeeIds *[]string `json:"attendeeIds,omitempty"` + + FacilitatorIds *[]string `json:"facilitatorIds,omitempty"` + *Alias + }{ + Interval: u.Interval, + + LengthInMinutes: u.LengthInMinutes, + + AttendeeIds: u.AttendeeIds, + + FacilitatorIds: u.FacilitatorIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingslotsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coachingslotsresponse.go b/platformclientv2/coachingslotsresponse.go index 5ac3eee3b..466c20080 100644 --- a/platformclientv2/coachingslotsresponse.go +++ b/platformclientv2/coachingslotsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Coachingslotsresponse struct { } +func (u *Coachingslotsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coachingslotsresponse + + + + return json.Marshal(&struct { + SuggestedSlots *[]Coachingslot `json:"suggestedSlots,omitempty"` + + AttendeeSchedules *[]Useravailabletimes `json:"attendeeSchedules,omitempty"` + + FacilitatorSchedules *[]Useravailabletimes `json:"facilitatorSchedules,omitempty"` + *Alias + }{ + SuggestedSlots: u.SuggestedSlots, + + AttendeeSchedules: u.AttendeeSchedules, + + FacilitatorSchedules: u.FacilitatorSchedules, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coachingslotsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cobrowseconversation.go b/platformclientv2/cobrowseconversation.go index 372bc00da..2dc01ce6b 100644 --- a/platformclientv2/cobrowseconversation.go +++ b/platformclientv2/cobrowseconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Cobrowseconversation struct { } +func (u *Cobrowseconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cobrowseconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Cobrowsemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cobrowseconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cobrowseconversationentitylisting.go b/platformclientv2/cobrowseconversationentitylisting.go index 002d21398..b502308f8 100644 --- a/platformclientv2/cobrowseconversationentitylisting.go +++ b/platformclientv2/cobrowseconversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Cobrowseconversationentitylisting struct { } +func (u *Cobrowseconversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cobrowseconversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Cobrowseconversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cobrowseconversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cobrowsemediaparticipant.go b/platformclientv2/cobrowsemediaparticipant.go index 8e46de6dd..50e12ecd4 100644 --- a/platformclientv2/cobrowsemediaparticipant.go +++ b/platformclientv2/cobrowsemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -161,6 +162,226 @@ type Cobrowsemediaparticipant struct { } +func (u *Cobrowsemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cobrowsemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Team *Domainentityref `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Domainentityref `json:"externalContact,omitempty"` + + ExternalOrganization *Domainentityref `json:"externalOrganization,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + Peer *string `json:"peer,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + Peer: u.Peer, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + ConversationRoutingData: u.ConversationRoutingData, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + Controlling: u.Controlling, + + ViewerUrl: u.ViewerUrl, + + ProviderEventTime: ProviderEventTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cobrowsemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cobrowsesession.go b/platformclientv2/cobrowsesession.go index 84d499686..576c9a744 100644 --- a/platformclientv2/cobrowsesession.go +++ b/platformclientv2/cobrowsesession.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,122 @@ type Cobrowsesession struct { } +func (u *Cobrowsesession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cobrowsesession + + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Self *Address `json:"self,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Provider *string `json:"provider,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + DisconnectType: u.DisconnectType, + + Self: u.Self, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + Controlling: u.Controlling, + + ViewerUrl: u.ViewerUrl, + + ProviderEventTime: ProviderEventTime, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Provider: u.Provider, + + PeerId: u.PeerId, + + Segments: u.Segments, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cobrowsesession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/commandstatus.go b/platformclientv2/commandstatus.go index 19fd58642..cee044d06 100644 --- a/platformclientv2/commandstatus.go +++ b/platformclientv2/commandstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Commandstatus struct { } +func (u *Commandstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Commandstatus + + + Expiration := new(string) + if u.Expiration != nil { + + *Expiration = timeutil.Strftime(u.Expiration, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Expiration = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Expiration *string `json:"expiration,omitempty"` + + UserId *string `json:"userId,omitempty"` + + StatusCode *string `json:"statusCode,omitempty"` + + CommandType *string `json:"commandType,omitempty"` + + Document *Document `json:"document,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Expiration: Expiration, + + UserId: u.UserId, + + StatusCode: u.StatusCode, + + CommandType: u.CommandType, + + Document: u.Document, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Commandstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/commandstatusentitylisting.go b/platformclientv2/commandstatusentitylisting.go index 140179c80..db5fe551f 100644 --- a/platformclientv2/commandstatusentitylisting.go +++ b/platformclientv2/commandstatusentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Commandstatusentitylisting struct { } +func (u *Commandstatusentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Commandstatusentitylisting + + + + return json.Marshal(&struct { + Entities *[]Commandstatus `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Commandstatusentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/commoncampaign.go b/platformclientv2/commoncampaign.go index a5feab52a..45b6cf267 100644 --- a/platformclientv2/commoncampaign.go +++ b/platformclientv2/commoncampaign.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Commoncampaign struct { } +func (u *Commoncampaign) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Commoncampaign + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + MediaType: u.MediaType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Commoncampaign) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/commoncampaigndivisionview.go b/platformclientv2/commoncampaigndivisionview.go index bf11b615d..af86f8fc0 100644 --- a/platformclientv2/commoncampaigndivisionview.go +++ b/platformclientv2/commoncampaigndivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Commoncampaigndivisionview struct { } +func (u *Commoncampaigndivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Commoncampaigndivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + MediaType: u.MediaType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Commoncampaigndivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/commoncampaigndivisionviewentitylisting.go b/platformclientv2/commoncampaigndivisionviewentitylisting.go index 4729e4cbb..242786bf7 100644 --- a/platformclientv2/commoncampaigndivisionviewentitylisting.go +++ b/platformclientv2/commoncampaigndivisionviewentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Commoncampaigndivisionviewentitylisting struct { } +func (u *Commoncampaigndivisionviewentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Commoncampaigndivisionviewentitylisting + + + + return json.Marshal(&struct { + Entities *[]Commoncampaigndivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Commoncampaigndivisionviewentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/commoncampaignentitylisting.go b/platformclientv2/commoncampaignentitylisting.go index 6a7121a7e..77a0f9097 100644 --- a/platformclientv2/commoncampaignentitylisting.go +++ b/platformclientv2/commoncampaignentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Commoncampaignentitylisting struct { } +func (u *Commoncampaignentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Commoncampaignentitylisting + + + + return json.Marshal(&struct { + Entities *[]Commoncampaign `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Commoncampaignentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/comparisonperiod.go b/platformclientv2/comparisonperiod.go index 4ca0c3e49..a71f7cde6 100644 --- a/platformclientv2/comparisonperiod.go +++ b/platformclientv2/comparisonperiod.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Comparisonperiod struct { } +func (u *Comparisonperiod) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Comparisonperiod + + + DateStarted := new(string) + if u.DateStarted != nil { + + *DateStarted = timeutil.Strftime(u.DateStarted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStarted = nil + } + + DateEnded := new(string) + if u.DateEnded != nil { + + *DateEnded = timeutil.Strftime(u.DateEnded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateEnded = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Kpi *string `json:"kpi,omitempty"` + + DateStarted *string `json:"dateStarted,omitempty"` + + DateEnded *string `json:"dateEnded,omitempty"` + + KpiTotalOn *int `json:"kpiTotalOn,omitempty"` + + KpiTotalOff *int `json:"kpiTotalOff,omitempty"` + + InteractionCountOn *int `json:"interactionCountOn,omitempty"` + + InteractionCountOff *int `json:"interactionCountOff,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Kpi: u.Kpi, + + DateStarted: DateStarted, + + DateEnded: DateEnded, + + KpiTotalOn: u.KpiTotalOn, + + KpiTotalOff: u.KpiTotalOff, + + InteractionCountOn: u.InteractionCountOn, + + InteractionCountOff: u.InteractionCountOff, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Comparisonperiod) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/comparisonperiodlisting.go b/platformclientv2/comparisonperiodlisting.go index 022fa8b5a..4a0cb1746 100644 --- a/platformclientv2/comparisonperiodlisting.go +++ b/platformclientv2/comparisonperiodlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Comparisonperiodlisting struct { } +func (u *Comparisonperiodlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Comparisonperiodlisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Comparisonperiod `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Comparisonperiodlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/condition.go b/platformclientv2/condition.go index bdd7cd629..a0f5b058f 100644 --- a/platformclientv2/condition.go +++ b/platformclientv2/condition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Condition struct { } +func (u *Condition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Condition + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Inverted *bool `json:"inverted,omitempty"` + + AttributeName *string `json:"attributeName,omitempty"` + + Value *string `json:"value,omitempty"` + + ValueType *string `json:"valueType,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Codes *[]string `json:"codes,omitempty"` + + Property *string `json:"property,omitempty"` + + PropertyType *string `json:"propertyType,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Inverted: u.Inverted, + + AttributeName: u.AttributeName, + + Value: u.Value, + + ValueType: u.ValueType, + + Operator: u.Operator, + + Codes: u.Codes, + + Property: u.Property, + + PropertyType: u.PropertyType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Condition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/configurationoverrides.go b/platformclientv2/configurationoverrides.go index 1721d9fa9..8f472bb06 100644 --- a/platformclientv2/configurationoverrides.go +++ b/platformclientv2/configurationoverrides.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Configurationoverrides struct { } +func (u *Configurationoverrides) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Configurationoverrides + + + + return json.Marshal(&struct { + Priority *bool `json:"priority,omitempty"` + *Alias + }{ + Priority: u.Priority, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Configurationoverrides) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/connectededge.go b/platformclientv2/connectededge.go index 6eb7ccdbc..2a69aa83c 100644 --- a/platformclientv2/connectededge.go +++ b/platformclientv2/connectededge.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Connectededge struct { } +func (u *Connectededge) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Connectededge + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + InterfaceName *string `json:"interfaceName,omitempty"` + + InterfaceIpAddress *string `json:"interfaceIpAddress,omitempty"` + + EdgeConnectionList *[]Edgeconnectioninfo `json:"edgeConnectionList,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + InterfaceName: u.InterfaceName, + + InterfaceIpAddress: u.InterfaceIpAddress, + + EdgeConnectionList: u.EdgeConnectionList, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Connectededge) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/connectrate.go b/platformclientv2/connectrate.go index c5b214a5e..18c49a299 100644 --- a/platformclientv2/connectrate.go +++ b/platformclientv2/connectrate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Connectrate struct { } +func (u *Connectrate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Connectrate + + + + return json.Marshal(&struct { + Attempts *int `json:"attempts,omitempty"` + + Connects *int `json:"connects,omitempty"` + + ConnectRatio *float64 `json:"connectRatio,omitempty"` + *Alias + }{ + Attempts: u.Attempts, + + Connects: u.Connects, + + ConnectRatio: u.ConnectRatio, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Connectrate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/constraintconflictmessage.go b/platformclientv2/constraintconflictmessage.go index 8dc191c1d..32b966bcb 100644 --- a/platformclientv2/constraintconflictmessage.go +++ b/platformclientv2/constraintconflictmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Constraintconflictmessage struct { } +func (u *Constraintconflictmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Constraintconflictmessage + + + + return json.Marshal(&struct { + Message *Workplanconstraintconflictmessage `json:"message,omitempty"` + + ConflictedConstraintMessages *[]Workplanconstraintmessage `json:"conflictedConstraintMessages,omitempty"` + *Alias + }{ + Message: u.Message, + + ConflictedConstraintMessages: u.ConflictedConstraintMessages, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Constraintconflictmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/consulttransfer.go b/platformclientv2/consulttransfer.go index 4fa378464..f8f400cd8 100644 --- a/platformclientv2/consulttransfer.go +++ b/platformclientv2/consulttransfer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Consulttransfer struct { } +func (u *Consulttransfer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Consulttransfer + + + + return json.Marshal(&struct { + SpeakTo *string `json:"speakTo,omitempty"` + + Destination *Destination `json:"destination,omitempty"` + *Alias + }{ + SpeakTo: u.SpeakTo, + + Destination: u.Destination, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Consulttransfer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/consulttransferresponse.go b/platformclientv2/consulttransferresponse.go index a46fcf0e0..765ca10b9 100644 --- a/platformclientv2/consulttransferresponse.go +++ b/platformclientv2/consulttransferresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Consulttransferresponse struct { } +func (u *Consulttransferresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Consulttransferresponse + + + + return json.Marshal(&struct { + DestinationParticipantId *string `json:"destinationParticipantId,omitempty"` + *Alias + }{ + DestinationParticipantId: u.DestinationParticipantId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Consulttransferresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/consulttransferupdate.go b/platformclientv2/consulttransferupdate.go index ece163cb1..222571ea0 100644 --- a/platformclientv2/consulttransferupdate.go +++ b/platformclientv2/consulttransferupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Consulttransferupdate struct { } +func (u *Consulttransferupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Consulttransferupdate + + + + return json.Marshal(&struct { + SpeakTo *string `json:"speakTo,omitempty"` + *Alias + }{ + SpeakTo: u.SpeakTo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Consulttransferupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/consumedresourcesentitylisting.go b/platformclientv2/consumedresourcesentitylisting.go index 3f2815465..ce83c760a 100644 --- a/platformclientv2/consumedresourcesentitylisting.go +++ b/platformclientv2/consumedresourcesentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Consumedresourcesentitylisting struct { } +func (u *Consumedresourcesentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Consumedresourcesentitylisting + + + + return json.Marshal(&struct { + Entities *[]Dependency `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Consumedresourcesentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/consumingresourcesentitylisting.go b/platformclientv2/consumingresourcesentitylisting.go index 0350339e7..0597ea202 100644 --- a/platformclientv2/consumingresourcesentitylisting.go +++ b/platformclientv2/consumingresourcesentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Consumingresourcesentitylisting struct { } +func (u *Consumingresourcesentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Consumingresourcesentitylisting + + + + return json.Marshal(&struct { + Entities *[]Dependency `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Consumingresourcesentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contact.go b/platformclientv2/contact.go index 9965822b9..9483ea54b 100644 --- a/platformclientv2/contact.go +++ b/platformclientv2/contact.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Contact struct { } +func (u *Contact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contact + + + + return json.Marshal(&struct { + Address *string `json:"address,omitempty"` + + Display *string `json:"display,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + VarType *string `json:"type,omitempty"` + + Extension *string `json:"extension,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + Integration *string `json:"integration,omitempty"` + *Alias + }{ + Address: u.Address, + + Display: u.Display, + + MediaType: u.MediaType, + + VarType: u.VarType, + + Extension: u.Extension, + + CountryCode: u.CountryCode, + + Integration: u.Integration, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactaddress.go b/platformclientv2/contactaddress.go index 696eaaa3d..cdb64120f 100644 --- a/platformclientv2/contactaddress.go +++ b/platformclientv2/contactaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Contactaddress struct { } +func (u *Contactaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactaddress + + + + return json.Marshal(&struct { + Address1 *string `json:"address1,omitempty"` + + Address2 *string `json:"address2,omitempty"` + + City *string `json:"city,omitempty"` + + State *string `json:"state,omitempty"` + + PostalCode *string `json:"postalCode,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + *Alias + }{ + Address1: u.Address1, + + Address2: u.Address2, + + City: u.City, + + State: u.State, + + PostalCode: u.PostalCode, + + CountryCode: u.CountryCode, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactcallbackrequest.go b/platformclientv2/contactcallbackrequest.go index aea999954..19f71479f 100644 --- a/platformclientv2/contactcallbackrequest.go +++ b/platformclientv2/contactcallbackrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Contactcallbackrequest struct { } +func (u *Contactcallbackrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactcallbackrequest + + + + return json.Marshal(&struct { + CampaignId *string `json:"campaignId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + PhoneColumn *string `json:"phoneColumn,omitempty"` + + Schedule *string `json:"schedule,omitempty"` + *Alias + }{ + CampaignId: u.CampaignId, + + ContactListId: u.ContactListId, + + ContactId: u.ContactId, + + PhoneColumn: u.PhoneColumn, + + Schedule: u.Schedule, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactcallbackrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactcentersettings.go b/platformclientv2/contactcentersettings.go index 549d7dc84..84a05ab11 100644 --- a/platformclientv2/contactcentersettings.go +++ b/platformclientv2/contactcentersettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Contactcentersettings struct { } +func (u *Contactcentersettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactcentersettings + + + + return json.Marshal(&struct { + RemoveSkillsFromBlindTransfer *bool `json:"removeSkillsFromBlindTransfer,omitempty"` + *Alias + }{ + RemoveSkillsFromBlindTransfer: u.RemoveSkillsFromBlindTransfer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactcentersettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactcolumntimezone.go b/platformclientv2/contactcolumntimezone.go index 4440d5f8d..5e1ad331f 100644 --- a/platformclientv2/contactcolumntimezone.go +++ b/platformclientv2/contactcolumntimezone.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Contactcolumntimezone struct { } +func (u *Contactcolumntimezone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactcolumntimezone + + + + return json.Marshal(&struct { + TimeZone *string `json:"timeZone,omitempty"` + + ColumnType *string `json:"columnType,omitempty"` + *Alias + }{ + TimeZone: u.TimeZone, + + ColumnType: u.ColumnType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactcolumntimezone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactcolumntodataactionfieldmapping.go b/platformclientv2/contactcolumntodataactionfieldmapping.go index 25902af8d..00ebeb7e9 100644 --- a/platformclientv2/contactcolumntodataactionfieldmapping.go +++ b/platformclientv2/contactcolumntodataactionfieldmapping.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Contactcolumntodataactionfieldmapping type Contactcolumntodataactionfieldmapping struct { } +func (u *Contactcolumntodataactionfieldmapping) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactcolumntodataactionfieldmapping + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactcolumntodataactionfieldmapping) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlist.go b/platformclientv2/contactlist.go index 926f8c353..24959e8c9 100644 --- a/platformclientv2/contactlist.go +++ b/platformclientv2/contactlist.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Contactlist struct { } +func (u *Contactlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlist + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Division *Domainentityref `json:"division,omitempty"` + + ColumnNames *[]string `json:"columnNames,omitempty"` + + PhoneColumns *[]Contactphonenumbercolumn `json:"phoneColumns,omitempty"` + + ImportStatus *Importstatus `json:"importStatus,omitempty"` + + PreviewModeColumnName *string `json:"previewModeColumnName,omitempty"` + + PreviewModeAcceptedValues *[]string `json:"previewModeAcceptedValues,omitempty"` + + Size *int `json:"size,omitempty"` + + AttemptLimits *Domainentityref `json:"attemptLimits,omitempty"` + + AutomaticTimeZoneMapping *bool `json:"automaticTimeZoneMapping,omitempty"` + + ZipCodeColumnName *string `json:"zipCodeColumnName,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Division: u.Division, + + ColumnNames: u.ColumnNames, + + PhoneColumns: u.PhoneColumns, + + ImportStatus: u.ImportStatus, + + PreviewModeColumnName: u.PreviewModeColumnName, + + PreviewModeAcceptedValues: u.PreviewModeAcceptedValues, + + Size: u.Size, + + AttemptLimits: u.AttemptLimits, + + AutomaticTimeZoneMapping: u.AutomaticTimeZoneMapping, + + ZipCodeColumnName: u.ZipCodeColumnName, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistdivisionview.go b/platformclientv2/contactlistdivisionview.go index e1664707e..769dc6f1d 100644 --- a/platformclientv2/contactlistdivisionview.go +++ b/platformclientv2/contactlistdivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Contactlistdivisionview struct { } +func (u *Contactlistdivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistdivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + ColumnNames *[]string `json:"columnNames,omitempty"` + + PhoneColumns *[]Contactphonenumbercolumn `json:"phoneColumns,omitempty"` + + ImportStatus *Importstatus `json:"importStatus,omitempty"` + + Size *int `json:"size,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + ColumnNames: u.ColumnNames, + + PhoneColumns: u.PhoneColumns, + + ImportStatus: u.ImportStatus, + + Size: u.Size, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistdivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistdivisionviewlisting.go b/platformclientv2/contactlistdivisionviewlisting.go index c8394dac9..406726acc 100644 --- a/platformclientv2/contactlistdivisionviewlisting.go +++ b/platformclientv2/contactlistdivisionviewlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Contactlistdivisionviewlisting struct { } +func (u *Contactlistdivisionviewlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistdivisionviewlisting + + + + return json.Marshal(&struct { + Entities *[]Contactlistdivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistdivisionviewlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistdownloadreadyexporturi.go b/platformclientv2/contactlistdownloadreadyexporturi.go index 873ec15a7..06c7a4c70 100644 --- a/platformclientv2/contactlistdownloadreadyexporturi.go +++ b/platformclientv2/contactlistdownloadreadyexporturi.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Contactlistdownloadreadyexporturi struct { } +func (u *Contactlistdownloadreadyexporturi) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistdownloadreadyexporturi + + + + return json.Marshal(&struct { + Uri *string `json:"uri,omitempty"` + + ExportTimestamp *string `json:"exportTimestamp,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Uri: u.Uri, + + ExportTimestamp: u.ExportTimestamp, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistdownloadreadyexporturi) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistentitylisting.go b/platformclientv2/contactlistentitylisting.go index 58c61dfe8..451447ee4 100644 --- a/platformclientv2/contactlistentitylisting.go +++ b/platformclientv2/contactlistentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Contactlistentitylisting struct { } +func (u *Contactlistentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistentitylisting + + + + return json.Marshal(&struct { + Entities *[]Contactlist `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistfilter.go b/platformclientv2/contactlistfilter.go index 0e2297102..bb070a0ab 100644 --- a/platformclientv2/contactlistfilter.go +++ b/platformclientv2/contactlistfilter.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Contactlistfilter struct { } +func (u *Contactlistfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistfilter + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ContactList *Domainentityref `json:"contactList,omitempty"` + + Clauses *[]Contactlistfilterclause `json:"clauses,omitempty"` + + FilterType *string `json:"filterType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ContactList: u.ContactList, + + Clauses: u.Clauses, + + FilterType: u.FilterType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistfilterclause.go b/platformclientv2/contactlistfilterclause.go index 28e2e21b9..0688dfe66 100644 --- a/platformclientv2/contactlistfilterclause.go +++ b/platformclientv2/contactlistfilterclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Contactlistfilterclause struct { } +func (u *Contactlistfilterclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistfilterclause + + + + return json.Marshal(&struct { + FilterType *string `json:"filterType,omitempty"` + + Predicates *[]Contactlistfilterpredicate `json:"predicates,omitempty"` + *Alias + }{ + FilterType: u.FilterType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistfilterclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistfilterentitylisting.go b/platformclientv2/contactlistfilterentitylisting.go index b453f2d2b..d7ee8550a 100644 --- a/platformclientv2/contactlistfilterentitylisting.go +++ b/platformclientv2/contactlistfilterentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Contactlistfilterentitylisting struct { } +func (u *Contactlistfilterentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistfilterentitylisting + + + + return json.Marshal(&struct { + Entities *[]Contactlistfilter `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistfilterentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistfilterpredicate.go b/platformclientv2/contactlistfilterpredicate.go index b9ef145d5..169c8d39a 100644 --- a/platformclientv2/contactlistfilterpredicate.go +++ b/platformclientv2/contactlistfilterpredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Contactlistfilterpredicate struct { } +func (u *Contactlistfilterpredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistfilterpredicate + + + + return json.Marshal(&struct { + Column *string `json:"column,omitempty"` + + ColumnType *string `json:"columnType,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Contactlistfilterrange `json:"range,omitempty"` + + Inverted *bool `json:"inverted,omitempty"` + *Alias + }{ + Column: u.Column, + + ColumnType: u.ColumnType, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + + Inverted: u.Inverted, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistfilterpredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistfilterrange.go b/platformclientv2/contactlistfilterrange.go index 9353ca952..6ecf4d89e 100644 --- a/platformclientv2/contactlistfilterrange.go +++ b/platformclientv2/contactlistfilterrange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Contactlistfilterrange struct { } +func (u *Contactlistfilterrange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistfilterrange + + + + return json.Marshal(&struct { + Min *string `json:"min,omitempty"` + + Max *string `json:"max,omitempty"` + + MinInclusive *bool `json:"minInclusive,omitempty"` + + MaxInclusive *bool `json:"maxInclusive,omitempty"` + + InSet *[]string `json:"inSet,omitempty"` + *Alias + }{ + Min: u.Min, + + Max: u.Max, + + MinInclusive: u.MinInclusive, + + MaxInclusive: u.MaxInclusive, + + InSet: u.InSet, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistfilterrange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlistimportstatusimportstatus.go b/platformclientv2/contactlistimportstatusimportstatus.go index 099bccd09..7bd0979c1 100644 --- a/platformclientv2/contactlistimportstatusimportstatus.go +++ b/platformclientv2/contactlistimportstatusimportstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Contactlistimportstatusimportstatus struct { } +func (u *Contactlistimportstatusimportstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlistimportstatusimportstatus + + + + return json.Marshal(&struct { + ImportState *string `json:"importState,omitempty"` + + TotalRecords *int `json:"totalRecords,omitempty"` + + CompletedRecords *int `json:"completedRecords,omitempty"` + + PercentageComplete *int `json:"percentageComplete,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ImportState: u.ImportState, + + TotalRecords: u.TotalRecords, + + CompletedRecords: u.CompletedRecords, + + PercentageComplete: u.PercentageComplete, + + FailureReason: u.FailureReason, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlistimportstatusimportstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactlisting.go b/platformclientv2/contactlisting.go index ec33bd8a1..c85feac23 100644 --- a/platformclientv2/contactlisting.go +++ b/platformclientv2/contactlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Contactlisting struct { } +func (u *Contactlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactlisting + + + + return json.Marshal(&struct { + Entities *[]Externalcontact `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactphonenumbercolumn.go b/platformclientv2/contactphonenumbercolumn.go index 289b1ff7b..53f132e11 100644 --- a/platformclientv2/contactphonenumbercolumn.go +++ b/platformclientv2/contactphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Contactphonenumbercolumn struct { } +func (u *Contactphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + CallableTimeColumn *string `json:"callableTimeColumn,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + CallableTimeColumn: u.CallableTimeColumn, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contactsort.go b/platformclientv2/contactsort.go index c36821b5d..736f22caa 100644 --- a/platformclientv2/contactsort.go +++ b/platformclientv2/contactsort.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Contactsort struct { } +func (u *Contactsort) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contactsort + + + + return json.Marshal(&struct { + FieldName *string `json:"fieldName,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Numeric *bool `json:"numeric,omitempty"` + *Alias + }{ + FieldName: u.FieldName, + + Direction: u.Direction, + + Numeric: u.Numeric, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contactsort) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentactions.go b/platformclientv2/contentactions.go index d77ef684f..085e1cc0a 100644 --- a/platformclientv2/contentactions.go +++ b/platformclientv2/contentactions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Contentactions struct { } +func (u *Contentactions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentactions + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + UrlTarget *string `json:"urlTarget,omitempty"` + + Textback *string `json:"textback,omitempty"` + *Alias + }{ + Url: u.Url, + + UrlTarget: u.UrlTarget, + + Textback: u.Textback, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentactions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentattachment.go b/platformclientv2/contentattachment.go index 550dc04f2..e77546576 100644 --- a/platformclientv2/contentattachment.go +++ b/platformclientv2/contentattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Contentattachment struct { } +func (u *Contentattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentattachment + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + Url *string `json:"url,omitempty"` + + Mime *string `json:"mime,omitempty"` + + Text *string `json:"text,omitempty"` + + Sha256 *string `json:"sha256,omitempty"` + + Filename *string `json:"filename,omitempty"` + *Alias + }{ + Id: u.Id, + + MediaType: u.MediaType, + + Url: u.Url, + + Mime: u.Mime, + + Text: u.Text, + + Sha256: u.Sha256, + + Filename: u.Filename, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentattributefilteritem.go b/platformclientv2/contentattributefilteritem.go index 677c67b28..5ed9140e5 100644 --- a/platformclientv2/contentattributefilteritem.go +++ b/platformclientv2/contentattributefilteritem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Contentattributefilteritem struct { } +func (u *Contentattributefilteritem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentattributefilteritem + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Id: u.Id, + + Operator: u.Operator, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentattributefilteritem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentbuttonresponse.go b/platformclientv2/contentbuttonresponse.go index a5628434f..608c020d7 100644 --- a/platformclientv2/contentbuttonresponse.go +++ b/platformclientv2/contentbuttonresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Contentbuttonresponse struct { } +func (u *Contentbuttonresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentbuttonresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Payload *string `json:"payload,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + + Text: u.Text, + + Payload: u.Payload, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentbuttonresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentfacetfilteritem.go b/platformclientv2/contentfacetfilteritem.go index 39b08e43b..b9632fb10 100644 --- a/platformclientv2/contentfacetfilteritem.go +++ b/platformclientv2/contentfacetfilteritem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Contentfacetfilteritem struct { } +func (u *Contentfacetfilteritem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentfacetfilteritem + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + + Operator: u.Operator, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentfacetfilteritem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentfilteritem.go b/platformclientv2/contentfilteritem.go index 010461ec9..0a5054c63 100644 --- a/platformclientv2/contentfilteritem.go +++ b/platformclientv2/contentfilteritem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Contentfilteritem struct { } +func (u *Contentfilteritem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentfilteritem + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + + Operator: u.Operator, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentfilteritem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentgeneric.go b/platformclientv2/contentgeneric.go index 3a0a4796b..58c67aab3 100644 --- a/platformclientv2/contentgeneric.go +++ b/platformclientv2/contentgeneric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Contentgeneric struct { } +func (u *Contentgeneric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentgeneric + + + + return json.Marshal(&struct { + Title *string `json:"title,omitempty"` + + Description *string `json:"description,omitempty"` + + Image *string `json:"image,omitempty"` + + Video *string `json:"video,omitempty"` + + Actions *Contentactions `json:"actions,omitempty"` + + Components *[]Buttoncomponent `json:"components,omitempty"` + *Alias + }{ + Title: u.Title, + + Description: u.Description, + + Image: u.Image, + + Video: u.Video, + + Actions: u.Actions, + + Components: u.Components, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentgeneric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentlist.go b/platformclientv2/contentlist.go index e1f5c91fd..600b2d8cc 100644 --- a/platformclientv2/contentlist.go +++ b/platformclientv2/contentlist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Contentlist struct { } +func (u *Contentlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentlist + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ListType *string `json:"listType,omitempty"` + + Title *string `json:"title,omitempty"` + + Description *string `json:"description,omitempty"` + + SubmitLabel *string `json:"submitLabel,omitempty"` + + Actions *Contentactions `json:"actions,omitempty"` + + Components *[]Listitemcomponent `json:"components,omitempty"` + *Alias + }{ + Id: u.Id, + + ListType: u.ListType, + + Title: u.Title, + + Description: u.Description, + + SubmitLabel: u.SubmitLabel, + + Actions: u.Actions, + + Components: u.Components, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentlocation.go b/platformclientv2/contentlocation.go index aaf7473f8..301c6968d 100644 --- a/platformclientv2/contentlocation.go +++ b/platformclientv2/contentlocation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Contentlocation struct { } +func (u *Contentlocation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentlocation + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Address *string `json:"address,omitempty"` + + Text *string `json:"text,omitempty"` + + Latitude *float64 `json:"latitude,omitempty"` + + Longitude *float64 `json:"longitude,omitempty"` + *Alias + }{ + Url: u.Url, + + Address: u.Address, + + Text: u.Text, + + Latitude: u.Latitude, + + Longitude: u.Longitude, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentlocation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementsingledocumenttopicdocumentdatav2.go b/platformclientv2/contentmanagementsingledocumenttopicdocumentdatav2.go index 281f9e88c..3c2e42ece 100644 --- a/platformclientv2/contentmanagementsingledocumenttopicdocumentdatav2.go +++ b/platformclientv2/contentmanagementsingledocumenttopicdocumentdatav2.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,98 @@ type Contentmanagementsingledocumenttopicdocumentdatav2 struct { } +func (u *Contentmanagementsingledocumenttopicdocumentdatav2) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementsingledocumenttopicdocumentdatav2 + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateUploaded := new(string) + if u.DateUploaded != nil { + + *DateUploaded = timeutil.Strftime(u.DateUploaded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateUploaded = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Workspace *Contentmanagementsingledocumenttopicworkspacedata `json:"workspace,omitempty"` + + CreatedBy *Contentmanagementsingledocumenttopicuserdata `json:"createdBy,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + Filename *string `json:"filename,omitempty"` + + ChangeNumber *int `json:"changeNumber,omitempty"` + + DateUploaded *string `json:"dateUploaded,omitempty"` + + UploadedBy *Contentmanagementsingledocumenttopicuserdata `json:"uploadedBy,omitempty"` + + LockInfo *Contentmanagementsingledocumenttopiclockdata `json:"lockInfo,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Workspace: u.Workspace, + + CreatedBy: u.CreatedBy, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + Filename: u.Filename, + + ChangeNumber: u.ChangeNumber, + + DateUploaded: DateUploaded, + + UploadedBy: u.UploadedBy, + + LockInfo: u.LockInfo, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementsingledocumenttopicdocumentdatav2) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementsingledocumenttopiclockdata.go b/platformclientv2/contentmanagementsingledocumenttopiclockdata.go index aa1f219c2..acb2b59db 100644 --- a/platformclientv2/contentmanagementsingledocumenttopiclockdata.go +++ b/platformclientv2/contentmanagementsingledocumenttopiclockdata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Contentmanagementsingledocumenttopiclockdata struct { } +func (u *Contentmanagementsingledocumenttopiclockdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementsingledocumenttopiclockdata + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateExpires := new(string) + if u.DateExpires != nil { + + *DateExpires = timeutil.Strftime(u.DateExpires, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpires = nil + } + + + return json.Marshal(&struct { + LockedBy *Contentmanagementsingledocumenttopicuserdata `json:"lockedBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateExpires *string `json:"dateExpires,omitempty"` + *Alias + }{ + LockedBy: u.LockedBy, + + DateCreated: DateCreated, + + DateExpires: DateExpires, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementsingledocumenttopiclockdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementsingledocumenttopicuserdata.go b/platformclientv2/contentmanagementsingledocumenttopicuserdata.go index 685615037..bb6f24355 100644 --- a/platformclientv2/contentmanagementsingledocumenttopicuserdata.go +++ b/platformclientv2/contentmanagementsingledocumenttopicuserdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Contentmanagementsingledocumenttopicuserdata struct { } +func (u *Contentmanagementsingledocumenttopicuserdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementsingledocumenttopicuserdata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementsingledocumenttopicuserdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementsingledocumenttopicworkspacedata.go b/platformclientv2/contentmanagementsingledocumenttopicworkspacedata.go index 42c344402..ee283b815 100644 --- a/platformclientv2/contentmanagementsingledocumenttopicworkspacedata.go +++ b/platformclientv2/contentmanagementsingledocumenttopicworkspacedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Contentmanagementsingledocumenttopicworkspacedata struct { } +func (u *Contentmanagementsingledocumenttopicworkspacedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementsingledocumenttopicworkspacedata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementsingledocumenttopicworkspacedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementworkspacedocumentstopicdocumentdatav2.go b/platformclientv2/contentmanagementworkspacedocumentstopicdocumentdatav2.go index a08a6f742..419469d32 100644 --- a/platformclientv2/contentmanagementworkspacedocumentstopicdocumentdatav2.go +++ b/platformclientv2/contentmanagementworkspacedocumentstopicdocumentdatav2.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,98 @@ type Contentmanagementworkspacedocumentstopicdocumentdatav2 struct { } +func (u *Contentmanagementworkspacedocumentstopicdocumentdatav2) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementworkspacedocumentstopicdocumentdatav2 + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateUploaded := new(string) + if u.DateUploaded != nil { + + *DateUploaded = timeutil.Strftime(u.DateUploaded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateUploaded = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Workspace *Contentmanagementworkspacedocumentstopicworkspacedata `json:"workspace,omitempty"` + + CreatedBy *Contentmanagementworkspacedocumentstopicuserdata `json:"createdBy,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + Filename *string `json:"filename,omitempty"` + + ChangeNumber *int `json:"changeNumber,omitempty"` + + DateUploaded *string `json:"dateUploaded,omitempty"` + + UploadedBy *Contentmanagementworkspacedocumentstopicuserdata `json:"uploadedBy,omitempty"` + + LockInfo *Contentmanagementworkspacedocumentstopiclockdata `json:"lockInfo,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Workspace: u.Workspace, + + CreatedBy: u.CreatedBy, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + Filename: u.Filename, + + ChangeNumber: u.ChangeNumber, + + DateUploaded: DateUploaded, + + UploadedBy: u.UploadedBy, + + LockInfo: u.LockInfo, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementworkspacedocumentstopicdocumentdatav2) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementworkspacedocumentstopiclockdata.go b/platformclientv2/contentmanagementworkspacedocumentstopiclockdata.go index f3ac24a7e..7d8aa5f18 100644 --- a/platformclientv2/contentmanagementworkspacedocumentstopiclockdata.go +++ b/platformclientv2/contentmanagementworkspacedocumentstopiclockdata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Contentmanagementworkspacedocumentstopiclockdata struct { } +func (u *Contentmanagementworkspacedocumentstopiclockdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementworkspacedocumentstopiclockdata + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateExpires := new(string) + if u.DateExpires != nil { + + *DateExpires = timeutil.Strftime(u.DateExpires, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpires = nil + } + + + return json.Marshal(&struct { + LockedBy *Contentmanagementworkspacedocumentstopicuserdata `json:"lockedBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateExpires *string `json:"dateExpires,omitempty"` + *Alias + }{ + LockedBy: u.LockedBy, + + DateCreated: DateCreated, + + DateExpires: DateExpires, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementworkspacedocumentstopiclockdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementworkspacedocumentstopicuserdata.go b/platformclientv2/contentmanagementworkspacedocumentstopicuserdata.go index 2ccceea02..3bce9cb16 100644 --- a/platformclientv2/contentmanagementworkspacedocumentstopicuserdata.go +++ b/platformclientv2/contentmanagementworkspacedocumentstopicuserdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Contentmanagementworkspacedocumentstopicuserdata struct { } +func (u *Contentmanagementworkspacedocumentstopicuserdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementworkspacedocumentstopicuserdata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementworkspacedocumentstopicuserdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentmanagementworkspacedocumentstopicworkspacedata.go b/platformclientv2/contentmanagementworkspacedocumentstopicworkspacedata.go index 6ae6f316f..e9fd5ebcf 100644 --- a/platformclientv2/contentmanagementworkspacedocumentstopicworkspacedata.go +++ b/platformclientv2/contentmanagementworkspacedocumentstopicworkspacedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Contentmanagementworkspacedocumentstopicworkspacedata struct { } +func (u *Contentmanagementworkspacedocumentstopicworkspacedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentmanagementworkspacedocumentstopicworkspacedata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentmanagementworkspacedocumentstopicworkspacedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentnotificationtemplate.go b/platformclientv2/contentnotificationtemplate.go index 61a87d820..f1c15c3fb 100644 --- a/platformclientv2/contentnotificationtemplate.go +++ b/platformclientv2/contentnotificationtemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Contentnotificationtemplate struct { } +func (u *Contentnotificationtemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentnotificationtemplate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Language *string `json:"language,omitempty"` + + Header *Notificationtemplateheader `json:"header,omitempty"` + + Body *Notificationtemplatebody `json:"body,omitempty"` + + Footer *Notificationtemplatefooter `json:"footer,omitempty"` + *Alias + }{ + Id: u.Id, + + Language: u.Language, + + Header: u.Header, + + Body: u.Body, + + Footer: u.Footer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentnotificationtemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentoffer.go b/platformclientv2/contentoffer.go index 7cc6aaf47..2c8d77b9a 100644 --- a/platformclientv2/contentoffer.go +++ b/platformclientv2/contentoffer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Contentoffer struct { } +func (u *Contentoffer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentoffer + + + + return json.Marshal(&struct { + ImageUrl *string `json:"imageUrl,omitempty"` + + DisplayMode *string `json:"displayMode,omitempty"` + + LayoutMode *string `json:"layoutMode,omitempty"` + + Title *string `json:"title,omitempty"` + + Headline *string `json:"headline,omitempty"` + + Body *string `json:"body,omitempty"` + + CallToAction *Calltoaction `json:"callToAction,omitempty"` + + Style *Contentofferstylingconfiguration `json:"style,omitempty"` + *Alias + }{ + ImageUrl: u.ImageUrl, + + DisplayMode: u.DisplayMode, + + LayoutMode: u.LayoutMode, + + Title: u.Title, + + Headline: u.Headline, + + Body: u.Body, + + CallToAction: u.CallToAction, + + Style: u.Style, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentoffer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentofferstyleproperties.go b/platformclientv2/contentofferstyleproperties.go index 66cb1d610..3b3c561ce 100644 --- a/platformclientv2/contentofferstyleproperties.go +++ b/platformclientv2/contentofferstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Contentofferstyleproperties struct { } +func (u *Contentofferstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentofferstyleproperties + + + + return json.Marshal(&struct { + Padding *string `json:"padding,omitempty"` + + Color *string `json:"color,omitempty"` + + BackgroundColor *string `json:"backgroundColor,omitempty"` + *Alias + }{ + Padding: u.Padding, + + Color: u.Color, + + BackgroundColor: u.BackgroundColor, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentofferstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentofferstylingconfiguration.go b/platformclientv2/contentofferstylingconfiguration.go index e4eb9a3be..e80625d1c 100644 --- a/platformclientv2/contentofferstylingconfiguration.go +++ b/platformclientv2/contentofferstylingconfiguration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Contentofferstylingconfiguration struct { } +func (u *Contentofferstylingconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentofferstylingconfiguration + + + + return json.Marshal(&struct { + Position *Contentpositionproperties `json:"position,omitempty"` + + Offer *Contentofferstyleproperties `json:"offer,omitempty"` + + CloseButton *Closebuttonstyleproperties `json:"closeButton,omitempty"` + + CtaButton *Ctabuttonstyleproperties `json:"ctaButton,omitempty"` + + Title *Textstyleproperties `json:"title,omitempty"` + + Headline *Textstyleproperties `json:"headline,omitempty"` + + Body *Textstyleproperties `json:"body,omitempty"` + *Alias + }{ + Position: u.Position, + + Offer: u.Offer, + + CloseButton: u.CloseButton, + + CtaButton: u.CtaButton, + + Title: u.Title, + + Headline: u.Headline, + + Body: u.Body, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentofferstylingconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentpositionproperties.go b/platformclientv2/contentpositionproperties.go index 479411698..b504079f0 100644 --- a/platformclientv2/contentpositionproperties.go +++ b/platformclientv2/contentpositionproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Contentpositionproperties struct { } +func (u *Contentpositionproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentpositionproperties + + + + return json.Marshal(&struct { + Top *string `json:"top,omitempty"` + + Bottom *string `json:"bottom,omitempty"` + + Left *string `json:"left,omitempty"` + + Right *string `json:"right,omitempty"` + *Alias + }{ + Top: u.Top, + + Bottom: u.Bottom, + + Left: u.Left, + + Right: u.Right, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentpositionproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentpostback.go b/platformclientv2/contentpostback.go index 2355ad684..d2681c49f 100644 --- a/platformclientv2/contentpostback.go +++ b/platformclientv2/contentpostback.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Contentpostback struct { } +func (u *Contentpostback) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentpostback + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Text *string `json:"text,omitempty"` + + Payload *string `json:"payload,omitempty"` + *Alias + }{ + Id: u.Id, + + Text: u.Text, + + Payload: u.Payload, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentpostback) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentqueryrequest.go b/platformclientv2/contentqueryrequest.go index d59554e11..86913ff7b 100644 --- a/platformclientv2/contentqueryrequest.go +++ b/platformclientv2/contentqueryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Contentqueryrequest struct { } +func (u *Contentqueryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentqueryrequest + + + + return json.Marshal(&struct { + QueryPhrase *string `json:"queryPhrase,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + FacetNameRequests *[]string `json:"facetNameRequests,omitempty"` + + Sort *[]Contentsortitem `json:"sort,omitempty"` + + Filters *[]Contentfacetfilteritem `json:"filters,omitempty"` + + AttributeFilters *[]Contentattributefilteritem `json:"attributeFilters,omitempty"` + + IncludeShares *bool `json:"includeShares,omitempty"` + *Alias + }{ + QueryPhrase: u.QueryPhrase, + + PageNumber: u.PageNumber, + + PageSize: u.PageSize, + + FacetNameRequests: u.FacetNameRequests, + + Sort: u.Sort, + + Filters: u.Filters, + + AttributeFilters: u.AttributeFilters, + + IncludeShares: u.IncludeShares, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentqueryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentquickreply.go b/platformclientv2/contentquickreply.go index 392ee2ae3..c44b25a45 100644 --- a/platformclientv2/contentquickreply.go +++ b/platformclientv2/contentquickreply.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Contentquickreply struct { } +func (u *Contentquickreply) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentquickreply + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Text *string `json:"text,omitempty"` + + Payload *string `json:"payload,omitempty"` + + Image *string `json:"image,omitempty"` + + Action *string `json:"action,omitempty"` + *Alias + }{ + Id: u.Id, + + Text: u.Text, + + Payload: u.Payload, + + Image: u.Image, + + Action: u.Action, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentquickreply) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentreaction.go b/platformclientv2/contentreaction.go index 838281e70..a512d3c4b 100644 --- a/platformclientv2/contentreaction.go +++ b/platformclientv2/contentreaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Contentreaction struct { } +func (u *Contentreaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentreaction + + + + return json.Marshal(&struct { + ReactionType *string `json:"reactionType,omitempty"` + + Count *int `json:"count,omitempty"` + *Alias + }{ + ReactionType: u.ReactionType, + + Count: u.Count, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentreaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contentsortitem.go b/platformclientv2/contentsortitem.go index d71f3c0a0..8e19f830f 100644 --- a/platformclientv2/contentsortitem.go +++ b/platformclientv2/contentsortitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Contentsortitem struct { } +func (u *Contentsortitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contentsortitem + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Ascending *bool `json:"ascending,omitempty"` + *Alias + }{ + Name: u.Name, + + Ascending: u.Ascending, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contentsortitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/context.go b/platformclientv2/context.go index 2daa4f2ef..702f75650 100644 --- a/platformclientv2/context.go +++ b/platformclientv2/context.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Context struct { } +func (u *Context) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Context + + + + return json.Marshal(&struct { + Patterns *[]Contextpattern `json:"patterns,omitempty"` + *Alias + }{ + Patterns: u.Patterns, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Context) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contextentity.go b/platformclientv2/contextentity.go index 2f5b71fb2..099548f61 100644 --- a/platformclientv2/contextentity.go +++ b/platformclientv2/contextentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Contextentity struct { } +func (u *Contextentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contextentity + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contextentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contextintent.go b/platformclientv2/contextintent.go index 3d8251c09..c853b2151 100644 --- a/platformclientv2/contextintent.go +++ b/platformclientv2/contextintent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Contextintent struct { } +func (u *Contextintent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contextintent + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contextintent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/contextpattern.go b/platformclientv2/contextpattern.go index e7c21213d..4f6578b74 100644 --- a/platformclientv2/contextpattern.go +++ b/platformclientv2/contextpattern.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Contextpattern struct { } +func (u *Contextpattern) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Contextpattern + + + + return json.Marshal(&struct { + Criteria *[]Entitytypecriteria `json:"criteria,omitempty"` + *Alias + }{ + Criteria: u.Criteria, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Contextpattern) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversation.go b/platformclientv2/conversation.go index e857d0832..96b17c66f 100644 --- a/platformclientv2/conversation.go +++ b/platformclientv2/conversation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Conversation struct { } +func (u *Conversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversation + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + Address *string `json:"address,omitempty"` + + Participants *[]Participant `json:"participants,omitempty"` + + ConversationIds *[]string `json:"conversationIds,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + State *string `json:"state,omitempty"` + + Divisions *[]Conversationdivisionmembership `json:"divisions,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ExternalTag: u.ExternalTag, + + StartTime: StartTime, + + EndTime: EndTime, + + Address: u.Address, + + Participants: u.Participants, + + ConversationIds: u.ConversationIds, + + MaxParticipants: u.MaxParticipants, + + RecordingState: u.RecordingState, + + State: u.State, + + Divisions: u.Divisions, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationaggregatedatacontainer.go b/platformclientv2/conversationaggregatedatacontainer.go index 8ec549732..490947165 100644 --- a/platformclientv2/conversationaggregatedatacontainer.go +++ b/platformclientv2/conversationaggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationaggregatedatacontainer struct { } +func (u *Conversationaggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationaggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationaggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationaggregatequeryclause.go b/platformclientv2/conversationaggregatequeryclause.go index bb190101c..024bc7daa 100644 --- a/platformclientv2/conversationaggregatequeryclause.go +++ b/platformclientv2/conversationaggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationaggregatequeryclause struct { } +func (u *Conversationaggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationaggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Conversationaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationaggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationaggregatequeryfilter.go b/platformclientv2/conversationaggregatequeryfilter.go index 8c05a1643..461190b72 100644 --- a/platformclientv2/conversationaggregatequeryfilter.go +++ b/platformclientv2/conversationaggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationaggregatequeryfilter struct { } +func (u *Conversationaggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationaggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Conversationaggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Conversationaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationaggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationaggregatequerypredicate.go b/platformclientv2/conversationaggregatequerypredicate.go index a5146d77d..c0e1e8181 100644 --- a/platformclientv2/conversationaggregatequerypredicate.go +++ b/platformclientv2/conversationaggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationaggregatequerypredicate struct { } +func (u *Conversationaggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationaggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationaggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationaggregatequeryresponse.go b/platformclientv2/conversationaggregatequeryresponse.go index f255af5cf..df099823d 100644 --- a/platformclientv2/conversationaggregatequeryresponse.go +++ b/platformclientv2/conversationaggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Conversationaggregatequeryresponse struct { } +func (u *Conversationaggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationaggregatequeryresponse + + + + return json.Marshal(&struct { + Results *[]Conversationaggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationaggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationaggregationquery.go b/platformclientv2/conversationaggregationquery.go index bdc6c1f9d..b2f968382 100644 --- a/platformclientv2/conversationaggregationquery.go +++ b/platformclientv2/conversationaggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Conversationaggregationquery struct { } +func (u *Conversationaggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationaggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Conversationaggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Conversationaggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationaggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationaggregationview.go b/platformclientv2/conversationaggregationview.go index 0e89c3d86..a9d4edc35 100644 --- a/platformclientv2/conversationaggregationview.go +++ b/platformclientv2/conversationaggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationaggregationview struct { } +func (u *Conversationaggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationaggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationaggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationassociation.go b/platformclientv2/conversationassociation.go index 6c0c3f9ff..c57903933 100644 --- a/platformclientv2/conversationassociation.go +++ b/platformclientv2/conversationassociation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationassociation struct { } +func (u *Conversationassociation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationassociation + + + + return json.Marshal(&struct { + ExternalContactId *string `json:"externalContactId,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + CommunicationId *string `json:"communicationId,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + *Alias + }{ + ExternalContactId: u.ExternalContactId, + + ConversationId: u.ConversationId, + + CommunicationId: u.CommunicationId, + + MediaType: u.MediaType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationassociation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationbasic.go b/platformclientv2/conversationbasic.go index 30698e100..0470effad 100644 --- a/platformclientv2/conversationbasic.go +++ b/platformclientv2/conversationbasic.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Conversationbasic struct { } +func (u *Conversationbasic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationbasic + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + Divisions *[]Conversationdivisionmembership `json:"divisions,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + Participants *[]Participantbasic `json:"participants,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ExternalTag: u.ExternalTag, + + StartTime: StartTime, + + EndTime: EndTime, + + Divisions: u.Divisions, + + SelfUri: u.SelfUri, + + Participants: u.Participants, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationbasic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopiccallbackconversation.go b/platformclientv2/conversationcallbackeventtopiccallbackconversation.go index 2ecde5f00..1d8c374b4 100644 --- a/platformclientv2/conversationcallbackeventtopiccallbackconversation.go +++ b/platformclientv2/conversationcallbackeventtopiccallbackconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationcallbackeventtopiccallbackconversation struct { } +func (u *Conversationcallbackeventtopiccallbackconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopiccallbackconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationcallbackeventtopiccallbackmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopiccallbackconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopiccallbackmediaparticipant.go b/platformclientv2/conversationcallbackeventtopiccallbackmediaparticipant.go index 230228c64..245938f65 100644 --- a/platformclientv2/conversationcallbackeventtopiccallbackmediaparticipant.go +++ b/platformclientv2/conversationcallbackeventtopiccallbackmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -181,6 +182,246 @@ type Conversationcallbackeventtopiccallbackmediaparticipant struct { } +func (u *Conversationcallbackeventtopiccallbackmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopiccallbackmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationcallbackeventtopicurireference `json:"user,omitempty"` + + Queue *Conversationcallbackeventtopicurireference `json:"queue,omitempty"` + + Team *Conversationcallbackeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationcallbackeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationcallbackeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationcallbackeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationcallbackeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationcallbackeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationcallbackeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationcallbackeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + OutboundPreview *Conversationcallbackeventtopicdialerpreview `json:"outboundPreview,omitempty"` + + Voicemail *Conversationcallbackeventtopicvoicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + OutboundPreview: u.OutboundPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + SkipEnabled: u.SkipEnabled, + + ExternalCampaign: u.ExternalCampaign, + + TimeoutSeconds: u.TimeoutSeconds, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopiccallbackmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicconversationroutingdata.go b/platformclientv2/conversationcallbackeventtopicconversationroutingdata.go index ca6955d1a..917d52a20 100644 --- a/platformclientv2/conversationcallbackeventtopicconversationroutingdata.go +++ b/platformclientv2/conversationcallbackeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationcallbackeventtopicconversationroutingdata struct { } +func (u *Conversationcallbackeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationcallbackeventtopicurireference `json:"queue,omitempty"` + + Language *Conversationcallbackeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationcallbackeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationcallbackeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicdetail.go b/platformclientv2/conversationcallbackeventtopicdetail.go index 3cc5fff85..0ce9d5efb 100644 --- a/platformclientv2/conversationcallbackeventtopicdetail.go +++ b/platformclientv2/conversationcallbackeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationcallbackeventtopicdetail struct { } +func (u *Conversationcallbackeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicdialerpreview.go b/platformclientv2/conversationcallbackeventtopicdialerpreview.go index 07e7ab138..6d2726b55 100644 --- a/platformclientv2/conversationcallbackeventtopicdialerpreview.go +++ b/platformclientv2/conversationcallbackeventtopicdialerpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationcallbackeventtopicdialerpreview struct { } +func (u *Conversationcallbackeventtopicdialerpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicdialerpreview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + CampaignId *string `json:"campaignId,omitempty"` + + PhoneNumberColumns *[]Conversationcallbackeventtopicphonenumbercolumn `json:"phoneNumberColumns,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactId: u.ContactId, + + ContactListId: u.ContactListId, + + CampaignId: u.CampaignId, + + PhoneNumberColumns: u.PhoneNumberColumns, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicdialerpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicerrorbody.go b/platformclientv2/conversationcallbackeventtopicerrorbody.go index 0ee9a728b..a31eaf016 100644 --- a/platformclientv2/conversationcallbackeventtopicerrorbody.go +++ b/platformclientv2/conversationcallbackeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationcallbackeventtopicerrorbody struct { } +func (u *Conversationcallbackeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationcallbackeventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationcallbackeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicjourneyaction.go b/platformclientv2/conversationcallbackeventtopicjourneyaction.go index 1343b2c20..3ad09aae3 100644 --- a/platformclientv2/conversationcallbackeventtopicjourneyaction.go +++ b/platformclientv2/conversationcallbackeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcallbackeventtopicjourneyaction struct { } +func (u *Conversationcallbackeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationcallbackeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicjourneyactionmap.go b/platformclientv2/conversationcallbackeventtopicjourneyactionmap.go index 749cce8c0..f2c5ce6f3 100644 --- a/platformclientv2/conversationcallbackeventtopicjourneyactionmap.go +++ b/platformclientv2/conversationcallbackeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcallbackeventtopicjourneyactionmap struct { } +func (u *Conversationcallbackeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicjourneycontext.go b/platformclientv2/conversationcallbackeventtopicjourneycontext.go index 7dbbcfeaa..124a07e48 100644 --- a/platformclientv2/conversationcallbackeventtopicjourneycontext.go +++ b/platformclientv2/conversationcallbackeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationcallbackeventtopicjourneycontext struct { } +func (u *Conversationcallbackeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationcallbackeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationcallbackeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationcallbackeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicjourneycustomer.go b/platformclientv2/conversationcallbackeventtopicjourneycustomer.go index 32caf48f2..ccdbdeec3 100644 --- a/platformclientv2/conversationcallbackeventtopicjourneycustomer.go +++ b/platformclientv2/conversationcallbackeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcallbackeventtopicjourneycustomer struct { } +func (u *Conversationcallbackeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicjourneycustomersession.go b/platformclientv2/conversationcallbackeventtopicjourneycustomersession.go index a7bc96966..e9d7592b8 100644 --- a/platformclientv2/conversationcallbackeventtopicjourneycustomersession.go +++ b/platformclientv2/conversationcallbackeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcallbackeventtopicjourneycustomersession struct { } +func (u *Conversationcallbackeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicphonenumbercolumn.go b/platformclientv2/conversationcallbackeventtopicphonenumbercolumn.go index 24b48df6b..6ec2b3efb 100644 --- a/platformclientv2/conversationcallbackeventtopicphonenumbercolumn.go +++ b/platformclientv2/conversationcallbackeventtopicphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationcallbackeventtopicphonenumbercolumn struct { } +func (u *Conversationcallbackeventtopicphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicscoredagent.go b/platformclientv2/conversationcallbackeventtopicscoredagent.go index 6f623bcc8..af74ab277 100644 --- a/platformclientv2/conversationcallbackeventtopicscoredagent.go +++ b/platformclientv2/conversationcallbackeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcallbackeventtopicscoredagent struct { } +func (u *Conversationcallbackeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationcallbackeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicurireference.go b/platformclientv2/conversationcallbackeventtopicurireference.go index 7cc6e5819..ecb7cfd55 100644 --- a/platformclientv2/conversationcallbackeventtopicurireference.go +++ b/platformclientv2/conversationcallbackeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcallbackeventtopicurireference struct { } +func (u *Conversationcallbackeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicvoicemail.go b/platformclientv2/conversationcallbackeventtopicvoicemail.go index 595577af7..ec6a30a37 100644 --- a/platformclientv2/conversationcallbackeventtopicvoicemail.go +++ b/platformclientv2/conversationcallbackeventtopicvoicemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcallbackeventtopicvoicemail struct { } +func (u *Conversationcallbackeventtopicvoicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicvoicemail + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + UploadStatus: u.UploadStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicvoicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcallbackeventtopicwrapup.go b/platformclientv2/conversationcallbackeventtopicwrapup.go index 5e2ffd7cb..1bc3f369a 100644 --- a/platformclientv2/conversationcallbackeventtopicwrapup.go +++ b/platformclientv2/conversationcallbackeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationcallbackeventtopicwrapup struct { } +func (u *Conversationcallbackeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcallbackeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcallbackeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopiccallconversation.go b/platformclientv2/conversationcalleventtopiccallconversation.go index e771c5d29..3a4a569e1 100644 --- a/platformclientv2/conversationcalleventtopiccallconversation.go +++ b/platformclientv2/conversationcalleventtopiccallconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationcalleventtopiccallconversation struct { } +func (u *Conversationcalleventtopiccallconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopiccallconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationcalleventtopiccallmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + RecordingState: u.RecordingState, + + MaxParticipants: u.MaxParticipants, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopiccallconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopiccallmediaparticipant.go b/platformclientv2/conversationcalleventtopiccallmediaparticipant.go index 94ebd1e91..83d98f736 100644 --- a/platformclientv2/conversationcalleventtopiccallmediaparticipant.go +++ b/platformclientv2/conversationcalleventtopiccallmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -193,6 +194,250 @@ type Conversationcalleventtopiccallmediaparticipant struct { } +func (u *Conversationcalleventtopiccallmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopiccallmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationcalleventtopicurireference `json:"user,omitempty"` + + Queue *Conversationcalleventtopicurireference `json:"queue,omitempty"` + + Team *Conversationcalleventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationcalleventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationcalleventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationcalleventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationcalleventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationcalleventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationcalleventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationcalleventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Group *Conversationcalleventtopicurireference `json:"group,omitempty"` + + Ani *string `json:"ani,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + FaxStatus *Conversationcalleventtopicfaxstatus `json:"faxStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Muted: u.Muted, + + Confined: u.Confined, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Group: u.Group, + + Ani: u.Ani, + + Dnis: u.Dnis, + + DocumentId: u.DocumentId, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + ConsultParticipantId: u.ConsultParticipantId, + + FaxStatus: u.FaxStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopiccallmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicconversationroutingdata.go b/platformclientv2/conversationcalleventtopicconversationroutingdata.go index 82ed9a701..4c2c1e83c 100644 --- a/platformclientv2/conversationcalleventtopicconversationroutingdata.go +++ b/platformclientv2/conversationcalleventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationcalleventtopicconversationroutingdata struct { } +func (u *Conversationcalleventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationcalleventtopicurireference `json:"queue,omitempty"` + + Language *Conversationcalleventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationcalleventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationcalleventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicdetail.go b/platformclientv2/conversationcalleventtopicdetail.go index f4104e598..fdec9036b 100644 --- a/platformclientv2/conversationcalleventtopicdetail.go +++ b/platformclientv2/conversationcalleventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationcalleventtopicdetail struct { } +func (u *Conversationcalleventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicerrorbody.go b/platformclientv2/conversationcalleventtopicerrorbody.go index 786ced611..d7085a92a 100644 --- a/platformclientv2/conversationcalleventtopicerrorbody.go +++ b/platformclientv2/conversationcalleventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationcalleventtopicerrorbody struct { } +func (u *Conversationcalleventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationcalleventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationcalleventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicfaxstatus.go b/platformclientv2/conversationcalleventtopicfaxstatus.go index 81d4069cb..bda19b913 100644 --- a/platformclientv2/conversationcalleventtopicfaxstatus.go +++ b/platformclientv2/conversationcalleventtopicfaxstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Conversationcalleventtopicfaxstatus struct { } +func (u *Conversationcalleventtopicfaxstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicfaxstatus + + + + return json.Marshal(&struct { + Direction *string `json:"direction,omitempty"` + + ExpectedPages *int `json:"expectedPages,omitempty"` + + ActivePage *int `json:"activePage,omitempty"` + + LinesTransmitted *int `json:"linesTransmitted,omitempty"` + + BytesTransmitted *int `json:"bytesTransmitted,omitempty"` + + DataRate *int `json:"dataRate,omitempty"` + + PageErrors *int `json:"pageErrors,omitempty"` + + LineErrors *int `json:"lineErrors,omitempty"` + *Alias + }{ + Direction: u.Direction, + + ExpectedPages: u.ExpectedPages, + + ActivePage: u.ActivePage, + + LinesTransmitted: u.LinesTransmitted, + + BytesTransmitted: u.BytesTransmitted, + + DataRate: u.DataRate, + + PageErrors: u.PageErrors, + + LineErrors: u.LineErrors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicfaxstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicjourneyaction.go b/platformclientv2/conversationcalleventtopicjourneyaction.go index d997e4090..0f381ad69 100644 --- a/platformclientv2/conversationcalleventtopicjourneyaction.go +++ b/platformclientv2/conversationcalleventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcalleventtopicjourneyaction struct { } +func (u *Conversationcalleventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationcalleventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicjourneyactionmap.go b/platformclientv2/conversationcalleventtopicjourneyactionmap.go index bff700ce5..8c31158d1 100644 --- a/platformclientv2/conversationcalleventtopicjourneyactionmap.go +++ b/platformclientv2/conversationcalleventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcalleventtopicjourneyactionmap struct { } +func (u *Conversationcalleventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicjourneycontext.go b/platformclientv2/conversationcalleventtopicjourneycontext.go index 6720ec398..4457370f9 100644 --- a/platformclientv2/conversationcalleventtopicjourneycontext.go +++ b/platformclientv2/conversationcalleventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationcalleventtopicjourneycontext struct { } +func (u *Conversationcalleventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationcalleventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationcalleventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationcalleventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicjourneycustomer.go b/platformclientv2/conversationcalleventtopicjourneycustomer.go index f03c8dbd5..85ca19285 100644 --- a/platformclientv2/conversationcalleventtopicjourneycustomer.go +++ b/platformclientv2/conversationcalleventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcalleventtopicjourneycustomer struct { } +func (u *Conversationcalleventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicjourneycustomersession.go b/platformclientv2/conversationcalleventtopicjourneycustomersession.go index daf661665..fb19f1808 100644 --- a/platformclientv2/conversationcalleventtopicjourneycustomersession.go +++ b/platformclientv2/conversationcalleventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcalleventtopicjourneycustomersession struct { } +func (u *Conversationcalleventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicscoredagent.go b/platformclientv2/conversationcalleventtopicscoredagent.go index a19bf8f47..4f0790bf2 100644 --- a/platformclientv2/conversationcalleventtopicscoredagent.go +++ b/platformclientv2/conversationcalleventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcalleventtopicscoredagent struct { } +func (u *Conversationcalleventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationcalleventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicurireference.go b/platformclientv2/conversationcalleventtopicurireference.go index 7a8b2d535..f803e5da3 100644 --- a/platformclientv2/conversationcalleventtopicurireference.go +++ b/platformclientv2/conversationcalleventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcalleventtopicurireference struct { } +func (u *Conversationcalleventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcalleventtopicwrapup.go b/platformclientv2/conversationcalleventtopicwrapup.go index f6c946653..ce1ad0d1f 100644 --- a/platformclientv2/conversationcalleventtopicwrapup.go +++ b/platformclientv2/conversationcalleventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationcalleventtopicwrapup struct { } +func (u *Conversationcalleventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcalleventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcalleventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchat.go b/platformclientv2/conversationchat.go index b57821f5b..99a562522 100644 --- a/platformclientv2/conversationchat.go +++ b/platformclientv2/conversationchat.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -89,6 +90,130 @@ type Conversationchat struct { } +func (u *Conversationchat) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchat + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Held *bool `json:"held,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + RoomId: u.RoomId, + + RecordingId: u.RecordingId, + + Segments: u.Segments, + + Held: u.Held, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + AvatarImageUrl: u.AvatarImageUrl, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchat) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicchatconversation.go b/platformclientv2/conversationchateventtopicchatconversation.go index f24af3383..0b3277287 100644 --- a/platformclientv2/conversationchateventtopicchatconversation.go +++ b/platformclientv2/conversationchateventtopicchatconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationchateventtopicchatconversation struct { } +func (u *Conversationchateventtopicchatconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicchatconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationchateventtopicchatmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicchatconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicchatmediaparticipant.go b/platformclientv2/conversationchateventtopicchatmediaparticipant.go index aa05307b7..3bb11e0a8 100644 --- a/platformclientv2/conversationchateventtopicchatmediaparticipant.go +++ b/platformclientv2/conversationchateventtopicchatmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -153,6 +154,210 @@ type Conversationchateventtopicchatmediaparticipant struct { } +func (u *Conversationchateventtopicchatmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicchatmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationchateventtopicurireference `json:"user,omitempty"` + + Queue *Conversationchateventtopicurireference `json:"queue,omitempty"` + + Team *Conversationchateventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationchateventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationchateventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationchateventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationchateventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationchateventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationchateventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationchateventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + RoomId: u.RoomId, + + AvatarImageUrl: u.AvatarImageUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicchatmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicconversationroutingdata.go b/platformclientv2/conversationchateventtopicconversationroutingdata.go index 0e2dec6a4..cc23f7a24 100644 --- a/platformclientv2/conversationchateventtopicconversationroutingdata.go +++ b/platformclientv2/conversationchateventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationchateventtopicconversationroutingdata struct { } +func (u *Conversationchateventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationchateventtopicurireference `json:"queue,omitempty"` + + Language *Conversationchateventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationchateventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationchateventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicdetail.go b/platformclientv2/conversationchateventtopicdetail.go index 8e52b5798..1e5f39137 100644 --- a/platformclientv2/conversationchateventtopicdetail.go +++ b/platformclientv2/conversationchateventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationchateventtopicdetail struct { } +func (u *Conversationchateventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicerrorbody.go b/platformclientv2/conversationchateventtopicerrorbody.go index 9c74809d1..549e915af 100644 --- a/platformclientv2/conversationchateventtopicerrorbody.go +++ b/platformclientv2/conversationchateventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationchateventtopicerrorbody struct { } +func (u *Conversationchateventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationchateventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationchateventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicjourneyaction.go b/platformclientv2/conversationchateventtopicjourneyaction.go index c71d6527e..7f1c9f960 100644 --- a/platformclientv2/conversationchateventtopicjourneyaction.go +++ b/platformclientv2/conversationchateventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationchateventtopicjourneyaction struct { } +func (u *Conversationchateventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationchateventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicjourneyactionmap.go b/platformclientv2/conversationchateventtopicjourneyactionmap.go index 3edfae646..64aca7877 100644 --- a/platformclientv2/conversationchateventtopicjourneyactionmap.go +++ b/platformclientv2/conversationchateventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationchateventtopicjourneyactionmap struct { } +func (u *Conversationchateventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicjourneycontext.go b/platformclientv2/conversationchateventtopicjourneycontext.go index 4d8b93a6d..4f66c5902 100644 --- a/platformclientv2/conversationchateventtopicjourneycontext.go +++ b/platformclientv2/conversationchateventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationchateventtopicjourneycontext struct { } +func (u *Conversationchateventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationchateventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationchateventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationchateventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicjourneycustomer.go b/platformclientv2/conversationchateventtopicjourneycustomer.go index 81edcb848..9d750193f 100644 --- a/platformclientv2/conversationchateventtopicjourneycustomer.go +++ b/platformclientv2/conversationchateventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationchateventtopicjourneycustomer struct { } +func (u *Conversationchateventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicjourneycustomersession.go b/platformclientv2/conversationchateventtopicjourneycustomersession.go index db09ef94c..d31ab6a18 100644 --- a/platformclientv2/conversationchateventtopicjourneycustomersession.go +++ b/platformclientv2/conversationchateventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationchateventtopicjourneycustomersession struct { } +func (u *Conversationchateventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicscoredagent.go b/platformclientv2/conversationchateventtopicscoredagent.go index a593584ff..0d280f002 100644 --- a/platformclientv2/conversationchateventtopicscoredagent.go +++ b/platformclientv2/conversationchateventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationchateventtopicscoredagent struct { } +func (u *Conversationchateventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationchateventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicurireference.go b/platformclientv2/conversationchateventtopicurireference.go index a01123b88..9734ab727 100644 --- a/platformclientv2/conversationchateventtopicurireference.go +++ b/platformclientv2/conversationchateventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationchateventtopicurireference struct { } +func (u *Conversationchateventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationchateventtopicwrapup.go b/platformclientv2/conversationchateventtopicwrapup.go index fcae098b8..a0be933e3 100644 --- a/platformclientv2/conversationchateventtopicwrapup.go +++ b/platformclientv2/conversationchateventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationchateventtopicwrapup struct { } +func (u *Conversationchateventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationchateventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationchateventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopiccobrowseconversation.go b/platformclientv2/conversationcobrowseeventtopiccobrowseconversation.go index a90ad1894..d1c566da8 100644 --- a/platformclientv2/conversationcobrowseeventtopiccobrowseconversation.go +++ b/platformclientv2/conversationcobrowseeventtopiccobrowseconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationcobrowseeventtopiccobrowseconversation struct { } +func (u *Conversationcobrowseeventtopiccobrowseconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopiccobrowseconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationcobrowseeventtopiccobrowsemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopiccobrowseconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopiccobrowsemediaparticipant.go b/platformclientv2/conversationcobrowseeventtopiccobrowsemediaparticipant.go index f3335800b..cdd751efa 100644 --- a/platformclientv2/conversationcobrowseeventtopiccobrowsemediaparticipant.go +++ b/platformclientv2/conversationcobrowseeventtopiccobrowsemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -165,6 +166,230 @@ type Conversationcobrowseeventtopiccobrowsemediaparticipant struct { } +func (u *Conversationcobrowseeventtopiccobrowsemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopiccobrowsemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationcobrowseeventtopicurireference `json:"user,omitempty"` + + Queue *Conversationcobrowseeventtopicurireference `json:"queue,omitempty"` + + Team *Conversationcobrowseeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationcobrowseeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationcobrowseeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationcobrowseeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationcobrowseeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationcobrowseeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationcobrowseeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationcobrowseeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + ViewerUrl: u.ViewerUrl, + + ProviderEventTime: ProviderEventTime, + + Controlling: u.Controlling, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopiccobrowsemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicconversationroutingdata.go b/platformclientv2/conversationcobrowseeventtopicconversationroutingdata.go index dbb228624..84a685305 100644 --- a/platformclientv2/conversationcobrowseeventtopicconversationroutingdata.go +++ b/platformclientv2/conversationcobrowseeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationcobrowseeventtopicconversationroutingdata struct { } +func (u *Conversationcobrowseeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationcobrowseeventtopicurireference `json:"queue,omitempty"` + + Language *Conversationcobrowseeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationcobrowseeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationcobrowseeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicdetail.go b/platformclientv2/conversationcobrowseeventtopicdetail.go index c1adc3593..3c417d70d 100644 --- a/platformclientv2/conversationcobrowseeventtopicdetail.go +++ b/platformclientv2/conversationcobrowseeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationcobrowseeventtopicdetail struct { } +func (u *Conversationcobrowseeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicerrorbody.go b/platformclientv2/conversationcobrowseeventtopicerrorbody.go index 878c661ce..64702f071 100644 --- a/platformclientv2/conversationcobrowseeventtopicerrorbody.go +++ b/platformclientv2/conversationcobrowseeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationcobrowseeventtopicerrorbody struct { } +func (u *Conversationcobrowseeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationcobrowseeventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationcobrowseeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicjourneyaction.go b/platformclientv2/conversationcobrowseeventtopicjourneyaction.go index 088944caa..3a0b9d607 100644 --- a/platformclientv2/conversationcobrowseeventtopicjourneyaction.go +++ b/platformclientv2/conversationcobrowseeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcobrowseeventtopicjourneyaction struct { } +func (u *Conversationcobrowseeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationcobrowseeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicjourneyactionmap.go b/platformclientv2/conversationcobrowseeventtopicjourneyactionmap.go index e0eaef6b5..80fb6d38e 100644 --- a/platformclientv2/conversationcobrowseeventtopicjourneyactionmap.go +++ b/platformclientv2/conversationcobrowseeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcobrowseeventtopicjourneyactionmap struct { } +func (u *Conversationcobrowseeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicjourneycontext.go b/platformclientv2/conversationcobrowseeventtopicjourneycontext.go index a45a79c54..50a70d6b0 100644 --- a/platformclientv2/conversationcobrowseeventtopicjourneycontext.go +++ b/platformclientv2/conversationcobrowseeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationcobrowseeventtopicjourneycontext struct { } +func (u *Conversationcobrowseeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationcobrowseeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationcobrowseeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationcobrowseeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicjourneycustomer.go b/platformclientv2/conversationcobrowseeventtopicjourneycustomer.go index e0167185a..a434d0701 100644 --- a/platformclientv2/conversationcobrowseeventtopicjourneycustomer.go +++ b/platformclientv2/conversationcobrowseeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcobrowseeventtopicjourneycustomer struct { } +func (u *Conversationcobrowseeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicjourneycustomersession.go b/platformclientv2/conversationcobrowseeventtopicjourneycustomersession.go index 1a5a8c884..b3fdb423d 100644 --- a/platformclientv2/conversationcobrowseeventtopicjourneycustomersession.go +++ b/platformclientv2/conversationcobrowseeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcobrowseeventtopicjourneycustomersession struct { } +func (u *Conversationcobrowseeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicscoredagent.go b/platformclientv2/conversationcobrowseeventtopicscoredagent.go index ad82c6c62..375fb8fc6 100644 --- a/platformclientv2/conversationcobrowseeventtopicscoredagent.go +++ b/platformclientv2/conversationcobrowseeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcobrowseeventtopicscoredagent struct { } +func (u *Conversationcobrowseeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationcobrowseeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicurireference.go b/platformclientv2/conversationcobrowseeventtopicurireference.go index b3d1b5ceb..9820dd166 100644 --- a/platformclientv2/conversationcobrowseeventtopicurireference.go +++ b/platformclientv2/conversationcobrowseeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationcobrowseeventtopicurireference struct { } +func (u *Conversationcobrowseeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcobrowseeventtopicwrapup.go b/platformclientv2/conversationcobrowseeventtopicwrapup.go index 906a3b80f..c17873758 100644 --- a/platformclientv2/conversationcobrowseeventtopicwrapup.go +++ b/platformclientv2/conversationcobrowseeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationcobrowseeventtopicwrapup struct { } +func (u *Conversationcobrowseeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcobrowseeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcobrowseeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcontentattachment.go b/platformclientv2/conversationcontentattachment.go index a851c9144..6f04b8ea4 100644 --- a/platformclientv2/conversationcontentattachment.go +++ b/platformclientv2/conversationcontentattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Conversationcontentattachment struct { } +func (u *Conversationcontentattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcontentattachment + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + Url *string `json:"url,omitempty"` + + Mime *string `json:"mime,omitempty"` + + Text *string `json:"text,omitempty"` + + Sha256 *string `json:"sha256,omitempty"` + + Filename *string `json:"filename,omitempty"` + *Alias + }{ + Id: u.Id, + + MediaType: u.MediaType, + + Url: u.Url, + + Mime: u.Mime, + + Text: u.Text, + + Sha256: u.Sha256, + + Filename: u.Filename, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcontentattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcontentbuttonresponse.go b/platformclientv2/conversationcontentbuttonresponse.go index 9d615abd2..3f3d7b925 100644 --- a/platformclientv2/conversationcontentbuttonresponse.go +++ b/platformclientv2/conversationcontentbuttonresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationcontentbuttonresponse struct { } +func (u *Conversationcontentbuttonresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcontentbuttonresponse + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Payload *string `json:"payload,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Text: u.Text, + + Payload: u.Payload, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcontentbuttonresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcontentnotificationtemplate.go b/platformclientv2/conversationcontentnotificationtemplate.go index f9f07e525..4644188ce 100644 --- a/platformclientv2/conversationcontentnotificationtemplate.go +++ b/platformclientv2/conversationcontentnotificationtemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationcontentnotificationtemplate struct { } +func (u *Conversationcontentnotificationtemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcontentnotificationtemplate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Language *string `json:"language,omitempty"` + + Header *Conversationnotificationtemplateheader `json:"header,omitempty"` + + Body *Conversationnotificationtemplatebody `json:"body,omitempty"` + + Footer *Conversationnotificationtemplatefooter `json:"footer,omitempty"` + *Alias + }{ + Id: u.Id, + + Language: u.Language, + + Header: u.Header, + + Body: u.Body, + + Footer: u.Footer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcontentnotificationtemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationcontentquickreply.go b/platformclientv2/conversationcontentquickreply.go index 6870f9af4..5b9a2395d 100644 --- a/platformclientv2/conversationcontentquickreply.go +++ b/platformclientv2/conversationcontentquickreply.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationcontentquickreply struct { } +func (u *Conversationcontentquickreply) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationcontentquickreply + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Payload *string `json:"payload,omitempty"` + + Image *string `json:"image,omitempty"` + + Action *string `json:"action,omitempty"` + *Alias + }{ + Text: u.Text, + + Payload: u.Payload, + + Image: u.Image, + + Action: u.Action, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationcontentquickreply) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationdeletionprotectionquery.go b/platformclientv2/conversationdeletionprotectionquery.go index 6dfdf5b28..5085cbc45 100644 --- a/platformclientv2/conversationdeletionprotectionquery.go +++ b/platformclientv2/conversationdeletionprotectionquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Conversationdeletionprotectionquery struct { } +func (u *Conversationdeletionprotectionquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationdeletionprotectionquery + + + + return json.Marshal(&struct { + ConversationIds *[]string `json:"conversationIds,omitempty"` + *Alias + }{ + ConversationIds: u.ConversationIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationdeletionprotectionquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationdetailqueryclause.go b/platformclientv2/conversationdetailqueryclause.go index 204a115ce..bdc6a7ad3 100644 --- a/platformclientv2/conversationdetailqueryclause.go +++ b/platformclientv2/conversationdetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationdetailqueryclause struct { } +func (u *Conversationdetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationdetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Conversationdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationdetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationdetailqueryfilter.go b/platformclientv2/conversationdetailqueryfilter.go index d6efdc6bd..c1fc50d9a 100644 --- a/platformclientv2/conversationdetailqueryfilter.go +++ b/platformclientv2/conversationdetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationdetailqueryfilter struct { } +func (u *Conversationdetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationdetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Conversationdetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Conversationdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationdetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationdetailquerypredicate.go b/platformclientv2/conversationdetailquerypredicate.go index 51a5b8cf6..f7d3c9702 100644 --- a/platformclientv2/conversationdetailquerypredicate.go +++ b/platformclientv2/conversationdetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationdetailquerypredicate struct { } +func (u *Conversationdetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationdetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Metric *string `json:"metric,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Metric: u.Metric, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationdetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go b/platformclientv2/conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go index bb70c030e..1f7850efc 100644 --- a/platformclientv2/conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go +++ b/platformclientv2/conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification type Conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification struct { } +func (u *Conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationdetailsdatalakeavailabilitytopicdataavailabilitychangenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationdivisionmembership.go b/platformclientv2/conversationdivisionmembership.go index 6fa2ccb66..1c4ef6aa3 100644 --- a/platformclientv2/conversationdivisionmembership.go +++ b/platformclientv2/conversationdivisionmembership.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationdivisionmembership struct { } +func (u *Conversationdivisionmembership) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationdivisionmembership + + + + return json.Marshal(&struct { + Division *Domainentityref `json:"division,omitempty"` + + Entities *[]Domainentityref `json:"entities,omitempty"` + *Alias + }{ + Division: u.Division, + + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationdivisionmembership) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicattachment.go b/platformclientv2/conversationemaileventtopicattachment.go index 974cd53af..e25af5dac 100644 --- a/platformclientv2/conversationemaileventtopicattachment.go +++ b/platformclientv2/conversationemaileventtopicattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationemaileventtopicattachment struct { } +func (u *Conversationemaileventtopicattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicattachment + + + + return json.Marshal(&struct { + AttachmentId *string `json:"attachmentId,omitempty"` + + Name *string `json:"name,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + AttachmentId: u.AttachmentId, + + Name: u.Name, + + ContentUri: u.ContentUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicconversationroutingdata.go b/platformclientv2/conversationemaileventtopicconversationroutingdata.go index b8deb4f71..dea0cb571 100644 --- a/platformclientv2/conversationemaileventtopicconversationroutingdata.go +++ b/platformclientv2/conversationemaileventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationemaileventtopicconversationroutingdata struct { } +func (u *Conversationemaileventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationemaileventtopicurireference `json:"queue,omitempty"` + + Language *Conversationemaileventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationemaileventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationemaileventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicdetail.go b/platformclientv2/conversationemaileventtopicdetail.go index 6a107e13b..5125395be 100644 --- a/platformclientv2/conversationemaileventtopicdetail.go +++ b/platformclientv2/conversationemaileventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationemaileventtopicdetail struct { } +func (u *Conversationemaileventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicemailconversation.go b/platformclientv2/conversationemaileventtopicemailconversation.go index a4f9d2ede..d46439562 100644 --- a/platformclientv2/conversationemaileventtopicemailconversation.go +++ b/platformclientv2/conversationemaileventtopicemailconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationemaileventtopicemailconversation struct { } +func (u *Conversationemaileventtopicemailconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicemailconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationemaileventtopicemailmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicemailconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicemailmediaparticipant.go b/platformclientv2/conversationemaileventtopicemailmediaparticipant.go index 683ddc9d6..4e9b718cd 100644 --- a/platformclientv2/conversationemaileventtopicemailmediaparticipant.go +++ b/platformclientv2/conversationemaileventtopicemailmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -169,6 +170,226 @@ type Conversationemaileventtopicemailmediaparticipant struct { } +func (u *Conversationemaileventtopicemailmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicemailmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationemaileventtopicurireference `json:"user,omitempty"` + + Queue *Conversationemaileventtopicurireference `json:"queue,omitempty"` + + Team *Conversationemaileventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationemaileventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationemaileventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationemaileventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationemaileventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationemaileventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationemaileventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationemaileventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Subject *string `json:"subject,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + DraftAttachments *[]Conversationemaileventtopicattachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Subject: u.Subject, + + MessagesSent: u.MessagesSent, + + AutoGenerated: u.AutoGenerated, + + MessageId: u.MessageId, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicemailmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicerrorbody.go b/platformclientv2/conversationemaileventtopicerrorbody.go index c85872afa..0b35c8f83 100644 --- a/platformclientv2/conversationemaileventtopicerrorbody.go +++ b/platformclientv2/conversationemaileventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationemaileventtopicerrorbody struct { } +func (u *Conversationemaileventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationemaileventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationemaileventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicjourneyaction.go b/platformclientv2/conversationemaileventtopicjourneyaction.go index 8c84d2b4e..5f16990ed 100644 --- a/platformclientv2/conversationemaileventtopicjourneyaction.go +++ b/platformclientv2/conversationemaileventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationemaileventtopicjourneyaction struct { } +func (u *Conversationemaileventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationemaileventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicjourneyactionmap.go b/platformclientv2/conversationemaileventtopicjourneyactionmap.go index e1636fdf4..b6bb16edf 100644 --- a/platformclientv2/conversationemaileventtopicjourneyactionmap.go +++ b/platformclientv2/conversationemaileventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationemaileventtopicjourneyactionmap struct { } +func (u *Conversationemaileventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicjourneycontext.go b/platformclientv2/conversationemaileventtopicjourneycontext.go index d8f79da4c..3ba7c0d57 100644 --- a/platformclientv2/conversationemaileventtopicjourneycontext.go +++ b/platformclientv2/conversationemaileventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationemaileventtopicjourneycontext struct { } +func (u *Conversationemaileventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationemaileventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationemaileventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationemaileventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicjourneycustomer.go b/platformclientv2/conversationemaileventtopicjourneycustomer.go index cf155d681..de557085a 100644 --- a/platformclientv2/conversationemaileventtopicjourneycustomer.go +++ b/platformclientv2/conversationemaileventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationemaileventtopicjourneycustomer struct { } +func (u *Conversationemaileventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicjourneycustomersession.go b/platformclientv2/conversationemaileventtopicjourneycustomersession.go index 8b7103a51..db4d3217a 100644 --- a/platformclientv2/conversationemaileventtopicjourneycustomersession.go +++ b/platformclientv2/conversationemaileventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationemaileventtopicjourneycustomersession struct { } +func (u *Conversationemaileventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicscoredagent.go b/platformclientv2/conversationemaileventtopicscoredagent.go index 28a5f9f7f..07da37cdf 100644 --- a/platformclientv2/conversationemaileventtopicscoredagent.go +++ b/platformclientv2/conversationemaileventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationemaileventtopicscoredagent struct { } +func (u *Conversationemaileventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationemaileventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicurireference.go b/platformclientv2/conversationemaileventtopicurireference.go index f38179175..1a8a5a5fc 100644 --- a/platformclientv2/conversationemaileventtopicurireference.go +++ b/platformclientv2/conversationemaileventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationemaileventtopicurireference struct { } +func (u *Conversationemaileventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationemaileventtopicwrapup.go b/platformclientv2/conversationemaileventtopicwrapup.go index 3b447bd44..de0727bc2 100644 --- a/platformclientv2/conversationemaileventtopicwrapup.go +++ b/platformclientv2/conversationemaileventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationemaileventtopicwrapup struct { } +func (u *Conversationemaileventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationemaileventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationemaileventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationentitylisting.go b/platformclientv2/conversationentitylisting.go index ad963907e..e9831cbf8 100644 --- a/platformclientv2/conversationentitylisting.go +++ b/platformclientv2/conversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationentitylisting struct { } +func (u *Conversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Conversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicaddress.go b/platformclientv2/conversationeventtopicaddress.go index 15844c2b7..f211460b8 100644 --- a/platformclientv2/conversationeventtopicaddress.go +++ b/platformclientv2/conversationeventtopicaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationeventtopicaddress struct { } +func (u *Conversationeventtopicaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicaddress + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + NameRaw *string `json:"nameRaw,omitempty"` + + AddressNormalized *string `json:"addressNormalized,omitempty"` + + AddressRaw *string `json:"addressRaw,omitempty"` + + AddressDisplayable *string `json:"addressDisplayable,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Name: u.Name, + + NameRaw: u.NameRaw, + + AddressNormalized: u.AddressNormalized, + + AddressRaw: u.AddressRaw, + + AddressDisplayable: u.AddressDisplayable, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicaftercallwork.go b/platformclientv2/conversationeventtopicaftercallwork.go index 83e51b32f..3560da4e6 100644 --- a/platformclientv2/conversationeventtopicaftercallwork.go +++ b/platformclientv2/conversationeventtopicaftercallwork.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Conversationeventtopicaftercallwork struct { } +func (u *Conversationeventtopicaftercallwork) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicaftercallwork + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + *Alias + }{ + State: u.State, + + StartTime: StartTime, + + EndTime: EndTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicaftercallwork) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicattachment.go b/platformclientv2/conversationeventtopicattachment.go index 192fb0bd7..58b2a5c0a 100644 --- a/platformclientv2/conversationeventtopicattachment.go +++ b/platformclientv2/conversationeventtopicattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationeventtopicattachment struct { } +func (u *Conversationeventtopicattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicattachment + + + + return json.Marshal(&struct { + AttachmentId *string `json:"attachmentId,omitempty"` + + Name *string `json:"name,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + AttachmentId: u.AttachmentId, + + Name: u.Name, + + ContentUri: u.ContentUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopiccall.go b/platformclientv2/conversationeventtopiccall.go index 00c68a2ad..fc0f1826f 100644 --- a/platformclientv2/conversationeventtopiccall.go +++ b/platformclientv2/conversationeventtopiccall.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,150 @@ type Conversationeventtopiccall struct { } +func (u *Conversationeventtopiccall) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopiccall + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Conversationeventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + Self *Conversationeventtopicaddress `json:"self,omitempty"` + + Other *Conversationeventtopicaddress `json:"other,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + DisconnectReasons *[]Conversationeventtopicdisconnectreason `json:"disconnectReasons,omitempty"` + + FaxStatus *Conversationeventtopicfaxstatus `json:"faxStatus,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Muted: u.Muted, + + Confined: u.Confined, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + Direction: u.Direction, + + DocumentId: u.DocumentId, + + Self: u.Self, + + Other: u.Other, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + DisconnectReasons: u.DisconnectReasons, + + FaxStatus: u.FaxStatus, + + UuiData: u.UuiData, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AgentAssistantId: u.AgentAssistantId, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopiccall) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopiccallback.go b/platformclientv2/conversationeventtopiccallback.go index 1eb7e0a0c..4e6b045ed 100644 --- a/platformclientv2/conversationeventtopiccallback.go +++ b/platformclientv2/conversationeventtopiccallback.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,154 @@ type Conversationeventtopiccallback struct { } +func (u *Conversationeventtopiccallback) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopiccallback + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DialerPreview *Conversationeventtopicdialerpreview `json:"dialerPreview,omitempty"` + + Voicemail *Conversationeventtopicvoicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + Provider *string `json:"provider,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Direction: u.Direction, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DialerPreview: u.DialerPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ExternalCampaign: u.ExternalCampaign, + + SkipEnabled: u.SkipEnabled, + + Provider: u.Provider, + + TimeoutSeconds: u.TimeoutSeconds, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopiccallback) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicchat.go b/platformclientv2/conversationeventtopicchat.go index d3822c2f6..9423875b1 100644 --- a/platformclientv2/conversationeventtopicchat.go +++ b/platformclientv2/conversationeventtopicchat.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Conversationeventtopicchat struct { } +func (u *Conversationeventtopicchat) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicchat + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + JourneyContext *Conversationeventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + RoomId: u.RoomId, + + AvatarImageUrl: u.AvatarImageUrl, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicchat) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopiccobrowse.go b/platformclientv2/conversationeventtopiccobrowse.go index 871405ecf..d88e8aea4 100644 --- a/platformclientv2/conversationeventtopiccobrowse.go +++ b/platformclientv2/conversationeventtopiccobrowse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Conversationeventtopiccobrowse struct { } +func (u *Conversationeventtopiccobrowse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopiccobrowse + + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Id *string `json:"id,omitempty"` + + Self *Conversationeventtopicaddress `json:"self,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + DisconnectType: u.DisconnectType, + + Id: u.Id, + + Self: u.Self, + + RoomId: u.RoomId, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + Controlling: u.Controlling, + + ViewerUrl: u.ViewerUrl, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ProviderEventTime: ProviderEventTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopiccobrowse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicconversation.go b/platformclientv2/conversationeventtopicconversation.go index d4c33fa77..e42a58216 100644 --- a/platformclientv2/conversationeventtopicconversation.go +++ b/platformclientv2/conversationeventtopicconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationeventtopicconversation struct { } +func (u *Conversationeventtopicconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + + Participants *[]Conversationeventtopicparticipant `json:"participants,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Address *string `json:"address,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + *Alias + }{ + Id: u.Id, + + MaxParticipants: u.MaxParticipants, + + Participants: u.Participants, + + RecordingState: u.RecordingState, + + Address: u.Address, + + ExternalTag: u.ExternalTag, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicconversationroutingdata.go b/platformclientv2/conversationeventtopicconversationroutingdata.go index f8a9db869..a592997e0 100644 --- a/platformclientv2/conversationeventtopicconversationroutingdata.go +++ b/platformclientv2/conversationeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationeventtopicconversationroutingdata struct { } +func (u *Conversationeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationeventtopicurireference `json:"queue,omitempty"` + + Language *Conversationeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicdialerpreview.go b/platformclientv2/conversationeventtopicdialerpreview.go index a9922be98..2e77f121d 100644 --- a/platformclientv2/conversationeventtopicdialerpreview.go +++ b/platformclientv2/conversationeventtopicdialerpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Conversationeventtopicdialerpreview struct { } +func (u *Conversationeventtopicdialerpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicdialerpreview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + CampaignId *string `json:"campaignId,omitempty"` + + PhoneNumberColumns *[]Conversationeventtopicphonenumbercolumn `json:"phoneNumberColumns,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactId: u.ContactId, + + ContactListId: u.ContactListId, + + CampaignId: u.CampaignId, + + PhoneNumberColumns: u.PhoneNumberColumns, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicdialerpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicdisconnectreason.go b/platformclientv2/conversationeventtopicdisconnectreason.go index d06ca9d6c..aa1fb9f2c 100644 --- a/platformclientv2/conversationeventtopicdisconnectreason.go +++ b/platformclientv2/conversationeventtopicdisconnectreason.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationeventtopicdisconnectreason struct { } +func (u *Conversationeventtopicdisconnectreason) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicdisconnectreason + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Code *int `json:"code,omitempty"` + + Phrase *string `json:"phrase,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Code: u.Code, + + Phrase: u.Phrase, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicdisconnectreason) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicemail.go b/platformclientv2/conversationeventtopicemail.go index 083a552ab..a9407fb97 100644 --- a/platformclientv2/conversationeventtopicemail.go +++ b/platformclientv2/conversationeventtopicemail.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -97,6 +98,130 @@ type Conversationeventtopicemail struct { } +func (u *Conversationeventtopicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicemail + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + Subject *string `json:"subject,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + ErrorInfo *Conversationeventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DraftAttachments *[]Conversationeventtopicattachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + AutoGenerated: u.AutoGenerated, + + Subject: u.Subject, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + MessagesSent: u.MessagesSent, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + MessageId: u.MessageId, + + Direction: u.Direction, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicerrordetails.go b/platformclientv2/conversationeventtopicerrordetails.go index 81dfa6a48..ca51d926b 100644 --- a/platformclientv2/conversationeventtopicerrordetails.go +++ b/platformclientv2/conversationeventtopicerrordetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Conversationeventtopicerrordetails struct { } +func (u *Conversationeventtopicerrordetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicerrordetails + + + + return json.Marshal(&struct { + Status *int `json:"status,omitempty"` + + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Uri *string `json:"uri,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Status: u.Status, + + Code: u.Code, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Uri: u.Uri, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicerrordetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicfaxstatus.go b/platformclientv2/conversationeventtopicfaxstatus.go index 7905e5f0d..4264ed43a 100644 --- a/platformclientv2/conversationeventtopicfaxstatus.go +++ b/platformclientv2/conversationeventtopicfaxstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Conversationeventtopicfaxstatus struct { } +func (u *Conversationeventtopicfaxstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicfaxstatus + + + + return json.Marshal(&struct { + Direction *string `json:"direction,omitempty"` + + ExpectedPages *int `json:"expectedPages,omitempty"` + + ActivePage *int `json:"activePage,omitempty"` + + LinesTransmitted *int `json:"linesTransmitted,omitempty"` + + BytesTransmitted *int `json:"bytesTransmitted,omitempty"` + + BaudRate *int `json:"baudRate,omitempty"` + + PageErrors *int `json:"pageErrors,omitempty"` + + LineErrors *int `json:"lineErrors,omitempty"` + *Alias + }{ + Direction: u.Direction, + + ExpectedPages: u.ExpectedPages, + + ActivePage: u.ActivePage, + + LinesTransmitted: u.LinesTransmitted, + + BytesTransmitted: u.BytesTransmitted, + + BaudRate: u.BaudRate, + + PageErrors: u.PageErrors, + + LineErrors: u.LineErrors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicfaxstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicjourneyaction.go b/platformclientv2/conversationeventtopicjourneyaction.go index 303626de1..acbec8a5c 100644 --- a/platformclientv2/conversationeventtopicjourneyaction.go +++ b/platformclientv2/conversationeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicjourneyaction struct { } +func (u *Conversationeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicjourneyactionmap.go b/platformclientv2/conversationeventtopicjourneyactionmap.go index 2cdf6382c..69ef18f74 100644 --- a/platformclientv2/conversationeventtopicjourneyactionmap.go +++ b/platformclientv2/conversationeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicjourneyactionmap struct { } +func (u *Conversationeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicjourneycontext.go b/platformclientv2/conversationeventtopicjourneycontext.go index 2ef22901a..146de5de7 100644 --- a/platformclientv2/conversationeventtopicjourneycontext.go +++ b/platformclientv2/conversationeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationeventtopicjourneycontext struct { } +func (u *Conversationeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicjourneycustomer.go b/platformclientv2/conversationeventtopicjourneycustomer.go index 982ede590..3908d2ab6 100644 --- a/platformclientv2/conversationeventtopicjourneycustomer.go +++ b/platformclientv2/conversationeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicjourneycustomer struct { } +func (u *Conversationeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicjourneycustomersession.go b/platformclientv2/conversationeventtopicjourneycustomersession.go index 4f31b9aa0..3a56fe52e 100644 --- a/platformclientv2/conversationeventtopicjourneycustomersession.go +++ b/platformclientv2/conversationeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicjourneycustomersession struct { } +func (u *Conversationeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicmessage.go b/platformclientv2/conversationeventtopicmessage.go index c661c4135..fe6daf676 100644 --- a/platformclientv2/conversationeventtopicmessage.go +++ b/platformclientv2/conversationeventtopicmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -101,6 +102,134 @@ type Conversationeventtopicmessage struct { } +func (u *Conversationeventtopicmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicmessage + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Conversationeventtopicerrordetails `json:"errorInfo,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + ToAddress *Conversationeventtopicaddress `json:"toAddress,omitempty"` + + FromAddress *Conversationeventtopicaddress `json:"fromAddress,omitempty"` + + Messages *[]Conversationeventtopicmessagedetails `json:"messages,omitempty"` + + MessagesTranscriptUri *string `json:"messagesTranscriptUri,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + + JourneyContext *Conversationeventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + ToAddress: u.ToAddress, + + FromAddress: u.FromAddress, + + Messages: u.Messages, + + MessagesTranscriptUri: u.MessagesTranscriptUri, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicmessagedetails.go b/platformclientv2/conversationeventtopicmessagedetails.go index 0a7266e71..4f626f103 100644 --- a/platformclientv2/conversationeventtopicmessagedetails.go +++ b/platformclientv2/conversationeventtopicmessagedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationeventtopicmessagedetails struct { } +func (u *Conversationeventtopicmessagedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicmessagedetails + + + MessageTime := new(string) + if u.MessageTime != nil { + + *MessageTime = timeutil.Strftime(u.MessageTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + MessageTime = nil + } + + + return json.Marshal(&struct { + MessageId *string `json:"messageId,omitempty"` + + MessageTime *string `json:"messageTime,omitempty"` + + MessageStatus *string `json:"messageStatus,omitempty"` + + MessageSegmentCount *int `json:"messageSegmentCount,omitempty"` + + Media *[]Conversationeventtopicmessagemedia `json:"media,omitempty"` + + Stickers *[]Conversationeventtopicmessagesticker `json:"stickers,omitempty"` + *Alias + }{ + MessageId: u.MessageId, + + MessageTime: MessageTime, + + MessageStatus: u.MessageStatus, + + MessageSegmentCount: u.MessageSegmentCount, + + Media: u.Media, + + Stickers: u.Stickers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicmessagedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicmessagemedia.go b/platformclientv2/conversationeventtopicmessagemedia.go index 49b6273db..527d27de4 100644 --- a/platformclientv2/conversationeventtopicmessagemedia.go +++ b/platformclientv2/conversationeventtopicmessagemedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationeventtopicmessagemedia struct { } +func (u *Conversationeventtopicmessagemedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicmessagemedia + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicmessagemedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicmessagesticker.go b/platformclientv2/conversationeventtopicmessagesticker.go index 9af95d50c..00fa02680 100644 --- a/platformclientv2/conversationeventtopicmessagesticker.go +++ b/platformclientv2/conversationeventtopicmessagesticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicmessagesticker struct { } +func (u *Conversationeventtopicmessagesticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicmessagesticker + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicmessagesticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicparticipant.go b/platformclientv2/conversationeventtopicparticipant.go index fe658d46c..da9cd2115 100644 --- a/platformclientv2/conversationeventtopicparticipant.go +++ b/platformclientv2/conversationeventtopicparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -157,6 +158,198 @@ type Conversationeventtopicparticipant struct { } +func (u *Conversationeventtopicparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicparticipant + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + UserId *string `json:"userId,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + Name *string `json:"name,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + Address *string `json:"address,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupExpected *bool `json:"wrapupExpected,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + ConversationRoutingData *Conversationeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + Calls *[]Conversationeventtopiccall `json:"calls,omitempty"` + + Callbacks *[]Conversationeventtopiccallback `json:"callbacks,omitempty"` + + Chats *[]Conversationeventtopicchat `json:"chats,omitempty"` + + Cobrowsesessions *[]Conversationeventtopiccobrowse `json:"cobrowsesessions,omitempty"` + + Emails *[]Conversationeventtopicemail `json:"emails,omitempty"` + + Messages *[]Conversationeventtopicmessage `json:"messages,omitempty"` + + Screenshares *[]Conversationeventtopicscreenshare `json:"screenshares,omitempty"` + + SocialExpressions *[]Conversationeventtopicsocialexpression `json:"socialExpressions,omitempty"` + + Videos *[]Conversationeventtopicvideo `json:"videos,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + UserId: u.UserId, + + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + Name: u.Name, + + QueueId: u.QueueId, + + GroupId: u.GroupId, + + TeamId: u.TeamId, + + Purpose: u.Purpose, + + ConsultParticipantId: u.ConsultParticipantId, + + Address: u.Address, + + WrapupRequired: u.WrapupRequired, + + WrapupExpected: u.WrapupExpected, + + WrapupPrompt: u.WrapupPrompt, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + Wrapup: u.Wrapup, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + ConversationRoutingData: u.ConversationRoutingData, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + Attributes: u.Attributes, + + Calls: u.Calls, + + Callbacks: u.Callbacks, + + Chats: u.Chats, + + Cobrowsesessions: u.Cobrowsesessions, + + Emails: u.Emails, + + Messages: u.Messages, + + Screenshares: u.Screenshares, + + SocialExpressions: u.SocialExpressions, + + Videos: u.Videos, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicphonenumbercolumn.go b/platformclientv2/conversationeventtopicphonenumbercolumn.go index 1cdd0f1c4..06a924a5b 100644 --- a/platformclientv2/conversationeventtopicphonenumbercolumn.go +++ b/platformclientv2/conversationeventtopicphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationeventtopicphonenumbercolumn struct { } +func (u *Conversationeventtopicphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicscoredagent.go b/platformclientv2/conversationeventtopicscoredagent.go index 4165446de..96f5e328b 100644 --- a/platformclientv2/conversationeventtopicscoredagent.go +++ b/platformclientv2/conversationeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicscoredagent struct { } +func (u *Conversationeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicscreenshare.go b/platformclientv2/conversationeventtopicscreenshare.go index 19ddd1656..0861cba49 100644 --- a/platformclientv2/conversationeventtopicscreenshare.go +++ b/platformclientv2/conversationeventtopicscreenshare.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Conversationeventtopicscreenshare struct { } +func (u *Conversationeventtopicscreenshare) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicscreenshare + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Conversationeventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + Sharing *bool `json:"sharing,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + Sharing: u.Sharing, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicscreenshare) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicsocialexpression.go b/platformclientv2/conversationeventtopicsocialexpression.go index 2ef6eb106..73dff705d 100644 --- a/platformclientv2/conversationeventtopicsocialexpression.go +++ b/platformclientv2/conversationeventtopicsocialexpression.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Conversationeventtopicsocialexpression struct { } +func (u *Conversationeventtopicsocialexpression) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicsocialexpression + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + SocialMediaId *string `json:"socialMediaId,omitempty"` + + SocialMediaHub *string `json:"socialMediaHub,omitempty"` + + SocialUserName *string `json:"socialUserName,omitempty"` + + PreviewText *string `json:"previewText,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Held *bool `json:"held,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + SocialMediaId: u.SocialMediaId, + + SocialMediaHub: u.SocialMediaHub, + + SocialUserName: u.SocialUserName, + + PreviewText: u.PreviewText, + + RecordingId: u.RecordingId, + + Held: u.Held, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicsocialexpression) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicurireference.go b/platformclientv2/conversationeventtopicurireference.go index 0a9674a0e..a2c623c5c 100644 --- a/platformclientv2/conversationeventtopicurireference.go +++ b/platformclientv2/conversationeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicurireference struct { } +func (u *Conversationeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicvideo.go b/platformclientv2/conversationeventtopicvideo.go index d6e4966b2..41d535dff 100644 --- a/platformclientv2/conversationeventtopicvideo.go +++ b/platformclientv2/conversationeventtopicvideo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Conversationeventtopicvideo struct { } +func (u *Conversationeventtopicvideo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicvideo + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Conversationeventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + AudioMuted *bool `json:"audioMuted,omitempty"` + + VideoMuted *bool `json:"videoMuted,omitempty"` + + SharingScreen *bool `json:"sharingScreen,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Msids *[]string `json:"msids,omitempty"` + + Wrapup *Conversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Conversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + AudioMuted: u.AudioMuted, + + VideoMuted: u.VideoMuted, + + SharingScreen: u.SharingScreen, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Msids: u.Msids, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicvideo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicvoicemail.go b/platformclientv2/conversationeventtopicvoicemail.go index 979908027..bdb722ec1 100644 --- a/platformclientv2/conversationeventtopicvoicemail.go +++ b/platformclientv2/conversationeventtopicvoicemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationeventtopicvoicemail struct { } +func (u *Conversationeventtopicvoicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicvoicemail + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + UploadStatus: u.UploadStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicvoicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationeventtopicwrapup.go b/platformclientv2/conversationeventtopicwrapup.go index 9e660ba82..4432d60ec 100644 --- a/platformclientv2/conversationeventtopicwrapup.go +++ b/platformclientv2/conversationeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationeventtopicwrapup struct { } +func (u *Conversationeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessagecontent.go b/platformclientv2/conversationmessagecontent.go index d22a97720..3b0808b4d 100644 --- a/platformclientv2/conversationmessagecontent.go +++ b/platformclientv2/conversationmessagecontent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationmessagecontent struct { } +func (u *Conversationmessagecontent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessagecontent + + + + return json.Marshal(&struct { + ContentType *string `json:"contentType,omitempty"` + + Attachment *Conversationcontentattachment `json:"attachment,omitempty"` + + QuickReply *Conversationcontentquickreply `json:"quickReply,omitempty"` + + Template *Conversationcontentnotificationtemplate `json:"template,omitempty"` + + ButtonResponse *Conversationcontentbuttonresponse `json:"buttonResponse,omitempty"` + *Alias + }{ + ContentType: u.ContentType, + + Attachment: u.Attachment, + + QuickReply: u.QuickReply, + + Template: u.Template, + + ButtonResponse: u.ButtonResponse, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessagecontent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicconversationroutingdata.go b/platformclientv2/conversationmessageeventtopicconversationroutingdata.go index c68aeda0b..c90b55fb6 100644 --- a/platformclientv2/conversationmessageeventtopicconversationroutingdata.go +++ b/platformclientv2/conversationmessageeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationmessageeventtopicconversationroutingdata struct { } +func (u *Conversationmessageeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationmessageeventtopicurireference `json:"queue,omitempty"` + + Language *Conversationmessageeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationmessageeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationmessageeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicdetail.go b/platformclientv2/conversationmessageeventtopicdetail.go index 75c91a721..d6e8898c9 100644 --- a/platformclientv2/conversationmessageeventtopicdetail.go +++ b/platformclientv2/conversationmessageeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationmessageeventtopicdetail struct { } +func (u *Conversationmessageeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicerrorbody.go b/platformclientv2/conversationmessageeventtopicerrorbody.go index 071f362a0..7a032cce1 100644 --- a/platformclientv2/conversationmessageeventtopicerrorbody.go +++ b/platformclientv2/conversationmessageeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationmessageeventtopicerrorbody struct { } +func (u *Conversationmessageeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationmessageeventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationmessageeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicjourneyaction.go b/platformclientv2/conversationmessageeventtopicjourneyaction.go index 2fb687170..b515edf37 100644 --- a/platformclientv2/conversationmessageeventtopicjourneyaction.go +++ b/platformclientv2/conversationmessageeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationmessageeventtopicjourneyaction struct { } +func (u *Conversationmessageeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationmessageeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicjourneyactionmap.go b/platformclientv2/conversationmessageeventtopicjourneyactionmap.go index ba7f0f52c..d9e7576ee 100644 --- a/platformclientv2/conversationmessageeventtopicjourneyactionmap.go +++ b/platformclientv2/conversationmessageeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationmessageeventtopicjourneyactionmap struct { } +func (u *Conversationmessageeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicjourneycontext.go b/platformclientv2/conversationmessageeventtopicjourneycontext.go index b4604ab68..295da9682 100644 --- a/platformclientv2/conversationmessageeventtopicjourneycontext.go +++ b/platformclientv2/conversationmessageeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationmessageeventtopicjourneycontext struct { } +func (u *Conversationmessageeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationmessageeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationmessageeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationmessageeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicjourneycustomer.go b/platformclientv2/conversationmessageeventtopicjourneycustomer.go index a36e40d44..7e638b1df 100644 --- a/platformclientv2/conversationmessageeventtopicjourneycustomer.go +++ b/platformclientv2/conversationmessageeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationmessageeventtopicjourneycustomer struct { } +func (u *Conversationmessageeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicjourneycustomersession.go b/platformclientv2/conversationmessageeventtopicjourneycustomersession.go index 128219b44..439e9dfb4 100644 --- a/platformclientv2/conversationmessageeventtopicjourneycustomersession.go +++ b/platformclientv2/conversationmessageeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationmessageeventtopicjourneycustomersession struct { } +func (u *Conversationmessageeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicmessageconversation.go b/platformclientv2/conversationmessageeventtopicmessageconversation.go index aa4f468c9..da04f8fb5 100644 --- a/platformclientv2/conversationmessageeventtopicmessageconversation.go +++ b/platformclientv2/conversationmessageeventtopicmessageconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationmessageeventtopicmessageconversation struct { } +func (u *Conversationmessageeventtopicmessageconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicmessageconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationmessageeventtopicmessagemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicmessageconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicmessagedetails.go b/platformclientv2/conversationmessageeventtopicmessagedetails.go index a03065112..0a4b58c8a 100644 --- a/platformclientv2/conversationmessageeventtopicmessagedetails.go +++ b/platformclientv2/conversationmessageeventtopicmessagedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationmessageeventtopicmessagedetails struct { } +func (u *Conversationmessageeventtopicmessagedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicmessagedetails + + + MessageTime := new(string) + if u.MessageTime != nil { + + *MessageTime = timeutil.Strftime(u.MessageTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + MessageTime = nil + } + + + return json.Marshal(&struct { + Message *Conversationmessageeventtopicurireference `json:"message,omitempty"` + + MessageTime *string `json:"messageTime,omitempty"` + + MessageSegmentCount *int `json:"messageSegmentCount,omitempty"` + + MessageStatus *string `json:"messageStatus,omitempty"` + + Media *[]Conversationmessageeventtopicmessagemedia `json:"media,omitempty"` + + Stickers *[]Conversationmessageeventtopicmessagesticker `json:"stickers,omitempty"` + *Alias + }{ + Message: u.Message, + + MessageTime: MessageTime, + + MessageSegmentCount: u.MessageSegmentCount, + + MessageStatus: u.MessageStatus, + + Media: u.Media, + + Stickers: u.Stickers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicmessagedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicmessagemedia.go b/platformclientv2/conversationmessageeventtopicmessagemedia.go index 2b6904b7d..c66498681 100644 --- a/platformclientv2/conversationmessageeventtopicmessagemedia.go +++ b/platformclientv2/conversationmessageeventtopicmessagemedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationmessageeventtopicmessagemedia struct { } +func (u *Conversationmessageeventtopicmessagemedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicmessagemedia + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicmessagemedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicmessagemediaparticipant.go b/platformclientv2/conversationmessageeventtopicmessagemediaparticipant.go index 24ea2c733..3b866633f 100644 --- a/platformclientv2/conversationmessageeventtopicmessagemediaparticipant.go +++ b/platformclientv2/conversationmessageeventtopicmessagemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -161,6 +162,218 @@ type Conversationmessageeventtopicmessagemediaparticipant struct { } +func (u *Conversationmessageeventtopicmessagemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicmessagemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationmessageeventtopicurireference `json:"user,omitempty"` + + Queue *Conversationmessageeventtopicurireference `json:"queue,omitempty"` + + Team *Conversationmessageeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationmessageeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationmessageeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationmessageeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationmessageeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationmessageeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationmessageeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationmessageeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Messages *[]Conversationmessageeventtopicmessagedetails `json:"messages,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Messages: u.Messages, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicmessagemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicmessagesticker.go b/platformclientv2/conversationmessageeventtopicmessagesticker.go index daf7361a0..ee82dad11 100644 --- a/platformclientv2/conversationmessageeventtopicmessagesticker.go +++ b/platformclientv2/conversationmessageeventtopicmessagesticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationmessageeventtopicmessagesticker struct { } +func (u *Conversationmessageeventtopicmessagesticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicmessagesticker + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicmessagesticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicscoredagent.go b/platformclientv2/conversationmessageeventtopicscoredagent.go index 986ef57d3..81ae5d082 100644 --- a/platformclientv2/conversationmessageeventtopicscoredagent.go +++ b/platformclientv2/conversationmessageeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationmessageeventtopicscoredagent struct { } +func (u *Conversationmessageeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationmessageeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicurireference.go b/platformclientv2/conversationmessageeventtopicurireference.go index 62576c605..0b076d913 100644 --- a/platformclientv2/conversationmessageeventtopicurireference.go +++ b/platformclientv2/conversationmessageeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationmessageeventtopicurireference struct { } +func (u *Conversationmessageeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessageeventtopicwrapup.go b/platformclientv2/conversationmessageeventtopicwrapup.go index d81cda0ce..0ab79980c 100644 --- a/platformclientv2/conversationmessageeventtopicwrapup.go +++ b/platformclientv2/conversationmessageeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationmessageeventtopicwrapup struct { } +func (u *Conversationmessageeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessageeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessageeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessagingchannel.go b/platformclientv2/conversationmessagingchannel.go index 029d903d6..47103d5a8 100644 --- a/platformclientv2/conversationmessagingchannel.go +++ b/platformclientv2/conversationmessagingchannel.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,74 @@ type Conversationmessagingchannel struct { } +func (u *Conversationmessagingchannel) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessagingchannel + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateDeleted := new(string) + if u.DateDeleted != nil { + + *DateDeleted = timeutil.Strftime(u.DateDeleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateDeleted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Platform *string `json:"platform,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + To *Conversationmessagingtorecipient `json:"to,omitempty"` + + From *Conversationmessagingfromrecipient `json:"from,omitempty"` + + Time *string `json:"time,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + DateDeleted *string `json:"dateDeleted,omitempty"` + *Alias + }{ + Id: u.Id, + + Platform: u.Platform, + + MessageId: u.MessageId, + + To: u.To, + + From: u.From, + + Time: Time, + + DateModified: DateModified, + + DateDeleted: DateDeleted, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessagingchannel) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessagingfromrecipient.go b/platformclientv2/conversationmessagingfromrecipient.go index 2aca77025..69171371d 100644 --- a/platformclientv2/conversationmessagingfromrecipient.go +++ b/platformclientv2/conversationmessagingfromrecipient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Conversationmessagingfromrecipient struct { } +func (u *Conversationmessagingfromrecipient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessagingfromrecipient + + + + return json.Marshal(&struct { + Nickname *string `json:"nickname,omitempty"` + + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + + Image *string `json:"image,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Email *string `json:"email,omitempty"` + *Alias + }{ + Nickname: u.Nickname, + + Id: u.Id, + + IdType: u.IdType, + + Image: u.Image, + + FirstName: u.FirstName, + + LastName: u.LastName, + + Email: u.Email, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessagingfromrecipient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmessagingtorecipient.go b/platformclientv2/conversationmessagingtorecipient.go index 5bd7bb5e2..fa53b4793 100644 --- a/platformclientv2/conversationmessagingtorecipient.go +++ b/platformclientv2/conversationmessagingtorecipient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Conversationmessagingtorecipient struct { } +func (u *Conversationmessagingtorecipient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmessagingtorecipient + + + + return json.Marshal(&struct { + Nickname *string `json:"nickname,omitempty"` + + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + + Image *string `json:"image,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Email *string `json:"email,omitempty"` + *Alias + }{ + Nickname: u.Nickname, + + Id: u.Id, + + IdType: u.IdType, + + Image: u.Image, + + FirstName: u.FirstName, + + LastName: u.LastName, + + Email: u.Email, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmessagingtorecipient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationmetrics.go b/platformclientv2/conversationmetrics.go index 46acb3c5b..a7c484641 100644 --- a/platformclientv2/conversationmetrics.go +++ b/platformclientv2/conversationmetrics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationmetrics struct { } +func (u *Conversationmetrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationmetrics + + + + return json.Marshal(&struct { + Conversation *Addressableentityref `json:"conversation,omitempty"` + + SentimentScore *float64 `json:"sentimentScore,omitempty"` + + SentimentTrend *float64 `json:"sentimentTrend,omitempty"` + *Alias + }{ + Conversation: u.Conversation, + + SentimentScore: u.SentimentScore, + + SentimentTrend: u.SentimentTrend, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationmetrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationnormalizedmessage.go b/platformclientv2/conversationnormalizedmessage.go index 7e0eb67b9..da0b3f974 100644 --- a/platformclientv2/conversationnormalizedmessage.go +++ b/platformclientv2/conversationnormalizedmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Conversationnormalizedmessage struct { } +func (u *Conversationnormalizedmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationnormalizedmessage + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Channel *Conversationmessagingchannel `json:"channel,omitempty"` + + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Content *[]Conversationmessagecontent `json:"content,omitempty"` + + Status *string `json:"status,omitempty"` + + Reasons *[]Conversationreason `json:"reasons,omitempty"` + + OriginatingEntity *string `json:"originatingEntity,omitempty"` + + IsFinalReceipt *bool `json:"isFinalReceipt,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Metadata *map[string]string `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + Channel: u.Channel, + + VarType: u.VarType, + + Text: u.Text, + + Content: u.Content, + + Status: u.Status, + + Reasons: u.Reasons, + + OriginatingEntity: u.OriginatingEntity, + + IsFinalReceipt: u.IsFinalReceipt, + + Direction: u.Direction, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationnormalizedmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationnotificationtemplatebody.go b/platformclientv2/conversationnotificationtemplatebody.go index 1c63e2450..59d8b5f7f 100644 --- a/platformclientv2/conversationnotificationtemplatebody.go +++ b/platformclientv2/conversationnotificationtemplatebody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationnotificationtemplatebody struct { } +func (u *Conversationnotificationtemplatebody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationnotificationtemplatebody + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Parameters *[]Conversationnotificationtemplateparameter `json:"parameters,omitempty"` + *Alias + }{ + Text: u.Text, + + Parameters: u.Parameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationnotificationtemplatebody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationnotificationtemplatefooter.go b/platformclientv2/conversationnotificationtemplatefooter.go index 1a2906a48..3e4019b21 100644 --- a/platformclientv2/conversationnotificationtemplatefooter.go +++ b/platformclientv2/conversationnotificationtemplatefooter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Conversationnotificationtemplatefooter struct { } +func (u *Conversationnotificationtemplatefooter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationnotificationtemplatefooter + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + *Alias + }{ + Text: u.Text, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationnotificationtemplatefooter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationnotificationtemplateheader.go b/platformclientv2/conversationnotificationtemplateheader.go index 5e12dbb4a..7d299c7f1 100644 --- a/platformclientv2/conversationnotificationtemplateheader.go +++ b/platformclientv2/conversationnotificationtemplateheader.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationnotificationtemplateheader struct { } +func (u *Conversationnotificationtemplateheader) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationnotificationtemplateheader + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Media *Conversationcontentattachment `json:"media,omitempty"` + + Parameters *[]Conversationnotificationtemplateparameter `json:"parameters,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Text: u.Text, + + Media: u.Media, + + Parameters: u.Parameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationnotificationtemplateheader) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationnotificationtemplateparameter.go b/platformclientv2/conversationnotificationtemplateparameter.go index 17b5fc9a8..e01959a08 100644 --- a/platformclientv2/conversationnotificationtemplateparameter.go +++ b/platformclientv2/conversationnotificationtemplateparameter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationnotificationtemplateparameter struct { } +func (u *Conversationnotificationtemplateparameter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationnotificationtemplateparameter + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Text *string `json:"text,omitempty"` + *Alias + }{ + Name: u.Name, + + Text: u.Text, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationnotificationtemplateparameter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationproperties.go b/platformclientv2/conversationproperties.go index c4844044f..083d67ba1 100644 --- a/platformclientv2/conversationproperties.go +++ b/platformclientv2/conversationproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Conversationproperties struct { } +func (u *Conversationproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationproperties + + + + return json.Marshal(&struct { + IsWaiting *bool `json:"isWaiting,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + IsAcd *bool `json:"isAcd,omitempty"` + + IsPreferred *bool `json:"isPreferred,omitempty"` + + IsScreenshare *bool `json:"isScreenshare,omitempty"` + + IsCobrowse *bool `json:"isCobrowse,omitempty"` + + IsVoicemail *bool `json:"isVoicemail,omitempty"` + + IsFlagged *bool `json:"isFlagged,omitempty"` + + IsMonitored *bool `json:"isMonitored,omitempty"` + + FilterWrapUpNotes *bool `json:"filterWrapUpNotes,omitempty"` + + MatchAll *bool `json:"matchAll,omitempty"` + *Alias + }{ + IsWaiting: u.IsWaiting, + + IsActive: u.IsActive, + + IsAcd: u.IsAcd, + + IsPreferred: u.IsPreferred, + + IsScreenshare: u.IsScreenshare, + + IsCobrowse: u.IsCobrowse, + + IsVoicemail: u.IsVoicemail, + + IsFlagged: u.IsFlagged, + + IsMonitored: u.IsMonitored, + + FilterWrapUpNotes: u.FilterWrapUpNotes, + + MatchAll: u.MatchAll, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationquery.go b/platformclientv2/conversationquery.go index 71a99dae6..274234ef2 100644 --- a/platformclientv2/conversationquery.go +++ b/platformclientv2/conversationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationquery struct { } +func (u *Conversationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationquery + + + + return json.Marshal(&struct { + ConversationFilters *[]Conversationdetailqueryfilter `json:"conversationFilters,omitempty"` + + SegmentFilters *[]Segmentdetailqueryfilter `json:"segmentFilters,omitempty"` + + EvaluationFilters *[]Evaluationdetailqueryfilter `json:"evaluationFilters,omitempty"` + + SurveyFilters *[]Surveydetailqueryfilter `json:"surveyFilters,omitempty"` + + ResolutionFilters *[]Resolutiondetailqueryfilter `json:"resolutionFilters,omitempty"` + + Order *string `json:"order,omitempty"` + + OrderBy *string `json:"orderBy,omitempty"` + + Interval *string `json:"interval,omitempty"` + + Aggregations *[]Analyticsqueryaggregation `json:"aggregations,omitempty"` + + Paging *Pagingspec `json:"paging,omitempty"` + *Alias + }{ + ConversationFilters: u.ConversationFilters, + + SegmentFilters: u.SegmentFilters, + + EvaluationFilters: u.EvaluationFilters, + + SurveyFilters: u.SurveyFilters, + + ResolutionFilters: u.ResolutionFilters, + + Order: u.Order, + + OrderBy: u.OrderBy, + + Interval: u.Interval, + + Aggregations: u.Aggregations, + + Paging: u.Paging, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationreason.go b/platformclientv2/conversationreason.go index 44f2fafff..c0a5ba79f 100644 --- a/platformclientv2/conversationreason.go +++ b/platformclientv2/conversationreason.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationreason struct { } +func (u *Conversationreason) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationreason + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationreason) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationreference.go b/platformclientv2/conversationreference.go index 598e4de38..9e2df319d 100644 --- a/platformclientv2/conversationreference.go +++ b/platformclientv2/conversationreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationreference struct { } +func (u *Conversationreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationroutingdata.go b/platformclientv2/conversationroutingdata.go index e682b31f8..2e4f745ec 100644 --- a/platformclientv2/conversationroutingdata.go +++ b/platformclientv2/conversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationroutingdata struct { } +func (u *Conversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationroutingdata + + + + return json.Marshal(&struct { + Queue *Addressableentityref `json:"queue,omitempty"` + + Language *Addressableentityref `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Addressableentityref `json:"skills,omitempty"` + + ScoredAgents *[]Scoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicconversationroutingdata.go b/platformclientv2/conversationscreenshareeventtopicconversationroutingdata.go index 512d94b04..14eb521e5 100644 --- a/platformclientv2/conversationscreenshareeventtopicconversationroutingdata.go +++ b/platformclientv2/conversationscreenshareeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationscreenshareeventtopicconversationroutingdata struct { } +func (u *Conversationscreenshareeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationscreenshareeventtopicurireference `json:"queue,omitempty"` + + Language *Conversationscreenshareeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationscreenshareeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationscreenshareeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicdetail.go b/platformclientv2/conversationscreenshareeventtopicdetail.go index 969bb6927..3dfad9c8e 100644 --- a/platformclientv2/conversationscreenshareeventtopicdetail.go +++ b/platformclientv2/conversationscreenshareeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationscreenshareeventtopicdetail struct { } +func (u *Conversationscreenshareeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicerrorbody.go b/platformclientv2/conversationscreenshareeventtopicerrorbody.go index 00f264d5a..f741b9450 100644 --- a/platformclientv2/conversationscreenshareeventtopicerrorbody.go +++ b/platformclientv2/conversationscreenshareeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationscreenshareeventtopicerrorbody struct { } +func (u *Conversationscreenshareeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationscreenshareeventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationscreenshareeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicjourneyaction.go b/platformclientv2/conversationscreenshareeventtopicjourneyaction.go index 9c04344b1..88c0d19cb 100644 --- a/platformclientv2/conversationscreenshareeventtopicjourneyaction.go +++ b/platformclientv2/conversationscreenshareeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationscreenshareeventtopicjourneyaction struct { } +func (u *Conversationscreenshareeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationscreenshareeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicjourneyactionmap.go b/platformclientv2/conversationscreenshareeventtopicjourneyactionmap.go index f7298657e..053a43e30 100644 --- a/platformclientv2/conversationscreenshareeventtopicjourneyactionmap.go +++ b/platformclientv2/conversationscreenshareeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationscreenshareeventtopicjourneyactionmap struct { } +func (u *Conversationscreenshareeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicjourneycontext.go b/platformclientv2/conversationscreenshareeventtopicjourneycontext.go index 3211756ab..3f2a78cc6 100644 --- a/platformclientv2/conversationscreenshareeventtopicjourneycontext.go +++ b/platformclientv2/conversationscreenshareeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationscreenshareeventtopicjourneycontext struct { } +func (u *Conversationscreenshareeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationscreenshareeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationscreenshareeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationscreenshareeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicjourneycustomer.go b/platformclientv2/conversationscreenshareeventtopicjourneycustomer.go index fc52ccf09..a73018aff 100644 --- a/platformclientv2/conversationscreenshareeventtopicjourneycustomer.go +++ b/platformclientv2/conversationscreenshareeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationscreenshareeventtopicjourneycustomer struct { } +func (u *Conversationscreenshareeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicjourneycustomersession.go b/platformclientv2/conversationscreenshareeventtopicjourneycustomersession.go index 71c4346b4..04ee035a5 100644 --- a/platformclientv2/conversationscreenshareeventtopicjourneycustomersession.go +++ b/platformclientv2/conversationscreenshareeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationscreenshareeventtopicjourneycustomersession struct { } +func (u *Conversationscreenshareeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicscoredagent.go b/platformclientv2/conversationscreenshareeventtopicscoredagent.go index d84e1690b..bd7bd5faf 100644 --- a/platformclientv2/conversationscreenshareeventtopicscoredagent.go +++ b/platformclientv2/conversationscreenshareeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationscreenshareeventtopicscoredagent struct { } +func (u *Conversationscreenshareeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationscreenshareeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicscreenshareconversation.go b/platformclientv2/conversationscreenshareeventtopicscreenshareconversation.go index 3aed68788..6ff34d1f5 100644 --- a/platformclientv2/conversationscreenshareeventtopicscreenshareconversation.go +++ b/platformclientv2/conversationscreenshareeventtopicscreenshareconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationscreenshareeventtopicscreenshareconversation struct { } +func (u *Conversationscreenshareeventtopicscreenshareconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicscreenshareconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationscreenshareeventtopicscreensharemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicscreenshareconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicscreensharemediaparticipant.go b/platformclientv2/conversationscreenshareeventtopicscreensharemediaparticipant.go index c93d53149..fdce1accf 100644 --- a/platformclientv2/conversationscreenshareeventtopicscreensharemediaparticipant.go +++ b/platformclientv2/conversationscreenshareeventtopicscreensharemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -157,6 +158,214 @@ type Conversationscreenshareeventtopicscreensharemediaparticipant struct { } +func (u *Conversationscreenshareeventtopicscreensharemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicscreensharemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationscreenshareeventtopicurireference `json:"user,omitempty"` + + Queue *Conversationscreenshareeventtopicurireference `json:"queue,omitempty"` + + Team *Conversationscreenshareeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationscreenshareeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationscreenshareeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationscreenshareeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationscreenshareeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationscreenshareeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationscreenshareeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationscreenshareeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Context *string `json:"context,omitempty"` + + PeerCount *int `json:"peerCount,omitempty"` + + Sharing *bool `json:"sharing,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Context: u.Context, + + PeerCount: u.PeerCount, + + Sharing: u.Sharing, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicscreensharemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicurireference.go b/platformclientv2/conversationscreenshareeventtopicurireference.go index 33ca52233..ade543b07 100644 --- a/platformclientv2/conversationscreenshareeventtopicurireference.go +++ b/platformclientv2/conversationscreenshareeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationscreenshareeventtopicurireference struct { } +func (u *Conversationscreenshareeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationscreenshareeventtopicwrapup.go b/platformclientv2/conversationscreenshareeventtopicwrapup.go index bb30cb08f..6a96aa6eb 100644 --- a/platformclientv2/conversationscreenshareeventtopicwrapup.go +++ b/platformclientv2/conversationscreenshareeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationscreenshareeventtopicwrapup struct { } +func (u *Conversationscreenshareeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationscreenshareeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationscreenshareeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicconversationroutingdata.go b/platformclientv2/conversationsocialexpressioneventtopicconversationroutingdata.go index 2c793359b..e418d0be9 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicconversationroutingdata.go +++ b/platformclientv2/conversationsocialexpressioneventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationsocialexpressioneventtopicconversationroutingdata struct { } +func (u *Conversationsocialexpressioneventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationsocialexpressioneventtopicurireference `json:"queue,omitempty"` + + Language *Conversationsocialexpressioneventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationsocialexpressioneventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationsocialexpressioneventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicdetail.go b/platformclientv2/conversationsocialexpressioneventtopicdetail.go index 1f958047e..0404216bc 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicdetail.go +++ b/platformclientv2/conversationsocialexpressioneventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationsocialexpressioneventtopicdetail struct { } +func (u *Conversationsocialexpressioneventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicerrorbody.go b/platformclientv2/conversationsocialexpressioneventtopicerrorbody.go index 8638d8c6e..0dff3c010 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicerrorbody.go +++ b/platformclientv2/conversationsocialexpressioneventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationsocialexpressioneventtopicerrorbody struct { } +func (u *Conversationsocialexpressioneventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationsocialexpressioneventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationsocialexpressioneventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicjourneyaction.go b/platformclientv2/conversationsocialexpressioneventtopicjourneyaction.go index a990d679f..a6b2dbd85 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicjourneyaction.go +++ b/platformclientv2/conversationsocialexpressioneventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationsocialexpressioneventtopicjourneyaction struct { } +func (u *Conversationsocialexpressioneventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationsocialexpressioneventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicjourneyactionmap.go b/platformclientv2/conversationsocialexpressioneventtopicjourneyactionmap.go index c4f9ff029..119142b3e 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicjourneyactionmap.go +++ b/platformclientv2/conversationsocialexpressioneventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationsocialexpressioneventtopicjourneyactionmap struct { } +func (u *Conversationsocialexpressioneventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicjourneycontext.go b/platformclientv2/conversationsocialexpressioneventtopicjourneycontext.go index 612659eab..6cfb1ca19 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicjourneycontext.go +++ b/platformclientv2/conversationsocialexpressioneventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationsocialexpressioneventtopicjourneycontext struct { } +func (u *Conversationsocialexpressioneventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationsocialexpressioneventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationsocialexpressioneventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationsocialexpressioneventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicjourneycustomer.go b/platformclientv2/conversationsocialexpressioneventtopicjourneycustomer.go index 5f95ad1ba..a9a82244d 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicjourneycustomer.go +++ b/platformclientv2/conversationsocialexpressioneventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationsocialexpressioneventtopicjourneycustomer struct { } +func (u *Conversationsocialexpressioneventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicjourneycustomersession.go b/platformclientv2/conversationsocialexpressioneventtopicjourneycustomersession.go index e3cca0c96..3a9104c05 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicjourneycustomersession.go +++ b/platformclientv2/conversationsocialexpressioneventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationsocialexpressioneventtopicjourneycustomersession struct { } +func (u *Conversationsocialexpressioneventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicscoredagent.go b/platformclientv2/conversationsocialexpressioneventtopicscoredagent.go index 2646e37d5..de3ee13ec 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicscoredagent.go +++ b/platformclientv2/conversationsocialexpressioneventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationsocialexpressioneventtopicscoredagent struct { } +func (u *Conversationsocialexpressioneventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationsocialexpressioneventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicsocialconversation.go b/platformclientv2/conversationsocialexpressioneventtopicsocialconversation.go index 15b0393fc..0bc3ceccc 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicsocialconversation.go +++ b/platformclientv2/conversationsocialexpressioneventtopicsocialconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationsocialexpressioneventtopicsocialconversation struct { } +func (u *Conversationsocialexpressioneventtopicsocialconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicsocialconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationsocialexpressioneventtopicsocialmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicsocialconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicsocialmediaparticipant.go b/platformclientv2/conversationsocialexpressioneventtopicsocialmediaparticipant.go index 95f21374d..96199040a 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicsocialmediaparticipant.go +++ b/platformclientv2/conversationsocialexpressioneventtopicsocialmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -161,6 +162,218 @@ type Conversationsocialexpressioneventtopicsocialmediaparticipant struct { } +func (u *Conversationsocialexpressioneventtopicsocialmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicsocialmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationsocialexpressioneventtopicurireference `json:"user,omitempty"` + + Queue *Conversationsocialexpressioneventtopicurireference `json:"queue,omitempty"` + + Team *Conversationsocialexpressioneventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationsocialexpressioneventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationsocialexpressioneventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationsocialexpressioneventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationsocialexpressioneventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationsocialexpressioneventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationsocialexpressioneventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + SocialMediaId *string `json:"socialMediaId,omitempty"` + + SocialMediaHub *string `json:"socialMediaHub,omitempty"` + + SocialUserName *string `json:"socialUserName,omitempty"` + + PreviewText *string `json:"previewText,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + SocialMediaId: u.SocialMediaId, + + SocialMediaHub: u.SocialMediaHub, + + SocialUserName: u.SocialUserName, + + PreviewText: u.PreviewText, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicsocialmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicurireference.go b/platformclientv2/conversationsocialexpressioneventtopicurireference.go index 43baef376..84d5ed9db 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicurireference.go +++ b/platformclientv2/conversationsocialexpressioneventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationsocialexpressioneventtopicurireference struct { } +func (u *Conversationsocialexpressioneventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationsocialexpressioneventtopicwrapup.go b/platformclientv2/conversationsocialexpressioneventtopicwrapup.go index 6eb328f54..ebbdc443d 100644 --- a/platformclientv2/conversationsocialexpressioneventtopicwrapup.go +++ b/platformclientv2/conversationsocialexpressioneventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationsocialexpressioneventtopicwrapup struct { } +func (u *Conversationsocialexpressioneventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationsocialexpressioneventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationsocialexpressioneventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationthreadingwindow.go b/platformclientv2/conversationthreadingwindow.go index b32b63589..7211cc81b 100644 --- a/platformclientv2/conversationthreadingwindow.go +++ b/platformclientv2/conversationthreadingwindow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationthreadingwindow struct { } +func (u *Conversationthreadingwindow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationthreadingwindow + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Settings *[]Conversationthreadingwindowsetting `json:"settings,omitempty"` + + DefaultTimeoutMinutes *int `json:"defaultTimeoutMinutes,omitempty"` + *Alias + }{ + Id: u.Id, + + Settings: u.Settings, + + DefaultTimeoutMinutes: u.DefaultTimeoutMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationthreadingwindow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationthreadingwindowsetting.go b/platformclientv2/conversationthreadingwindowsetting.go index b519def32..baa799c55 100644 --- a/platformclientv2/conversationthreadingwindowsetting.go +++ b/platformclientv2/conversationthreadingwindowsetting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationthreadingwindowsetting struct { } +func (u *Conversationthreadingwindowsetting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationthreadingwindowsetting + + + + return json.Marshal(&struct { + MessengerType *string `json:"messengerType,omitempty"` + + TimeoutInMinutes *int `json:"timeoutInMinutes,omitempty"` + *Alias + }{ + MessengerType: u.MessengerType, + + TimeoutInMinutes: u.TimeoutInMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationthreadingwindowsetting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationuser.go b/platformclientv2/conversationuser.go index 9e036bd38..2a2e30385 100644 --- a/platformclientv2/conversationuser.go +++ b/platformclientv2/conversationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Conversationuser struct { } +func (u *Conversationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicconversationroutingdata.go b/platformclientv2/conversationvideoeventtopicconversationroutingdata.go index e720c1bd6..d58d2648d 100644 --- a/platformclientv2/conversationvideoeventtopicconversationroutingdata.go +++ b/platformclientv2/conversationvideoeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Conversationvideoeventtopicconversationroutingdata struct { } +func (u *Conversationvideoeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Conversationvideoeventtopicurireference `json:"queue,omitempty"` + + Language *Conversationvideoeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Conversationvideoeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Conversationvideoeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicdetail.go b/platformclientv2/conversationvideoeventtopicdetail.go index 1bad37128..f87a28895 100644 --- a/platformclientv2/conversationvideoeventtopicdetail.go +++ b/platformclientv2/conversationvideoeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationvideoeventtopicdetail struct { } +func (u *Conversationvideoeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicerrorbody.go b/platformclientv2/conversationvideoeventtopicerrorbody.go index 7e723a602..5204f2d4b 100644 --- a/platformclientv2/conversationvideoeventtopicerrorbody.go +++ b/platformclientv2/conversationvideoeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Conversationvideoeventtopicerrorbody struct { } +func (u *Conversationvideoeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Conversationvideoeventtopicdetail `json:"details,omitempty"` + + Errors *[]Conversationvideoeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicjourneyaction.go b/platformclientv2/conversationvideoeventtopicjourneyaction.go index 4e025fc32..e596b712a 100644 --- a/platformclientv2/conversationvideoeventtopicjourneyaction.go +++ b/platformclientv2/conversationvideoeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationvideoeventtopicjourneyaction struct { } +func (u *Conversationvideoeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Conversationvideoeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicjourneyactionmap.go b/platformclientv2/conversationvideoeventtopicjourneyactionmap.go index 09416a817..aad01a7dc 100644 --- a/platformclientv2/conversationvideoeventtopicjourneyactionmap.go +++ b/platformclientv2/conversationvideoeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationvideoeventtopicjourneyactionmap struct { } +func (u *Conversationvideoeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicjourneycontext.go b/platformclientv2/conversationvideoeventtopicjourneycontext.go index 1aa25521e..7d1277ab9 100644 --- a/platformclientv2/conversationvideoeventtopicjourneycontext.go +++ b/platformclientv2/conversationvideoeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Conversationvideoeventtopicjourneycontext struct { } +func (u *Conversationvideoeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Conversationvideoeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Conversationvideoeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Conversationvideoeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicjourneycustomer.go b/platformclientv2/conversationvideoeventtopicjourneycustomer.go index 8d7613ef8..4b0828350 100644 --- a/platformclientv2/conversationvideoeventtopicjourneycustomer.go +++ b/platformclientv2/conversationvideoeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationvideoeventtopicjourneycustomer struct { } +func (u *Conversationvideoeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicjourneycustomersession.go b/platformclientv2/conversationvideoeventtopicjourneycustomersession.go index b6df9561a..a4434c47a 100644 --- a/platformclientv2/conversationvideoeventtopicjourneycustomersession.go +++ b/platformclientv2/conversationvideoeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationvideoeventtopicjourneycustomersession struct { } +func (u *Conversationvideoeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicscoredagent.go b/platformclientv2/conversationvideoeventtopicscoredagent.go index 12d13d862..1d8e64392 100644 --- a/platformclientv2/conversationvideoeventtopicscoredagent.go +++ b/platformclientv2/conversationvideoeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationvideoeventtopicscoredagent struct { } +func (u *Conversationvideoeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Conversationvideoeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicurireference.go b/platformclientv2/conversationvideoeventtopicurireference.go index d6df32115..561fb5d52 100644 --- a/platformclientv2/conversationvideoeventtopicurireference.go +++ b/platformclientv2/conversationvideoeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Conversationvideoeventtopicurireference struct { } +func (u *Conversationvideoeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicvideoconversation.go b/platformclientv2/conversationvideoeventtopicvideoconversation.go index 772b6f735..811ae150c 100644 --- a/platformclientv2/conversationvideoeventtopicvideoconversation.go +++ b/platformclientv2/conversationvideoeventtopicvideoconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Conversationvideoeventtopicvideoconversation struct { } +func (u *Conversationvideoeventtopicvideoconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicvideoconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Conversationvideoeventtopicvideomediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicvideoconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicvideomediaparticipant.go b/platformclientv2/conversationvideoeventtopicvideomediaparticipant.go index 4fd0ad7b3..a61f703c2 100644 --- a/platformclientv2/conversationvideoeventtopicvideomediaparticipant.go +++ b/platformclientv2/conversationvideoeventtopicvideomediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -169,6 +170,226 @@ type Conversationvideoeventtopicvideomediaparticipant struct { } +func (u *Conversationvideoeventtopicvideomediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicvideomediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Conversationvideoeventtopicurireference `json:"user,omitempty"` + + Queue *Conversationvideoeventtopicurireference `json:"queue,omitempty"` + + Team *Conversationvideoeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Conversationvideoeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Conversationvideoeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Conversationvideoeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Conversationvideoeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Conversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationvideoeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Conversationvideoeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + AudioMuted *bool `json:"audioMuted,omitempty"` + + VideoMuted *bool `json:"videoMuted,omitempty"` + + SharingScreen *bool `json:"sharingScreen,omitempty"` + + PeerCount *int `json:"peerCount,omitempty"` + + Context *string `json:"context,omitempty"` + + Msids *[]string `json:"msids,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + AudioMuted: u.AudioMuted, + + VideoMuted: u.VideoMuted, + + SharingScreen: u.SharingScreen, + + PeerCount: u.PeerCount, + + Context: u.Context, + + Msids: u.Msids, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicvideomediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/conversationvideoeventtopicwrapup.go b/platformclientv2/conversationvideoeventtopicwrapup.go index bc45cd6bf..8707d9c26 100644 --- a/platformclientv2/conversationvideoeventtopicwrapup.go +++ b/platformclientv2/conversationvideoeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Conversationvideoeventtopicwrapup struct { } +func (u *Conversationvideoeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Conversationvideoeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Conversationvideoeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/copyattachmentsrequest.go b/platformclientv2/copyattachmentsrequest.go index 305f20c70..a762dc8a5 100644 --- a/platformclientv2/copyattachmentsrequest.go +++ b/platformclientv2/copyattachmentsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Copyattachmentsrequest struct { } +func (u *Copyattachmentsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Copyattachmentsrequest + + + + return json.Marshal(&struct { + SourceMessage *Domainentityref `json:"sourceMessage,omitempty"` + + Attachments *[]Attachment `json:"attachments,omitempty"` + *Alias + }{ + SourceMessage: u.SourceMessage, + + Attachments: u.Attachments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Copyattachmentsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/copybuforecastrequest.go b/platformclientv2/copybuforecastrequest.go index 95e9e42c5..f49c93b2c 100644 --- a/platformclientv2/copybuforecastrequest.go +++ b/platformclientv2/copybuforecastrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,33 @@ type Copybuforecastrequest struct { } +func (u *Copybuforecastrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Copybuforecastrequest + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Description *string `json:"description,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + *Alias + }{ + Description: u.Description, + + WeekDate: WeekDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Copybuforecastrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/copyvoicemailmessage.go b/platformclientv2/copyvoicemailmessage.go index c93993d67..e9e65c27e 100644 --- a/platformclientv2/copyvoicemailmessage.go +++ b/platformclientv2/copyvoicemailmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Copyvoicemailmessage struct { } +func (u *Copyvoicemailmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Copyvoicemailmessage + + + + return json.Marshal(&struct { + VoicemailMessageId *string `json:"voicemailMessageId,omitempty"` + + UserId *string `json:"userId,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + *Alias + }{ + VoicemailMessageId: u.VoicemailMessageId, + + UserId: u.UserId, + + GroupId: u.GroupId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Copyvoicemailmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/copyworkplan.go b/platformclientv2/copyworkplan.go index 01e9238c1..4b4bfb0ea 100644 --- a/platformclientv2/copyworkplan.go +++ b/platformclientv2/copyworkplan.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Copyworkplan struct { } +func (u *Copyworkplan) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Copyworkplan + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Copyworkplan) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/copyworkplanrotationrequest.go b/platformclientv2/copyworkplanrotationrequest.go index 5546be51c..8cd03b1aa 100644 --- a/platformclientv2/copyworkplanrotationrequest.go +++ b/platformclientv2/copyworkplanrotationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Copyworkplanrotationrequest struct { } +func (u *Copyworkplanrotationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Copyworkplanrotationrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Copyworkplanrotationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coretype.go b/platformclientv2/coretype.go index 185a705df..007c320b5 100644 --- a/platformclientv2/coretype.go +++ b/platformclientv2/coretype.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Coretype struct { } +func (u *Coretype) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coretype + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + Schema *Schema `json:"schema,omitempty"` + + Current *bool `json:"current,omitempty"` + + ValidationFields *[]string `json:"validationFields,omitempty"` + + ValidationLimits *Validationlimits `json:"validationLimits,omitempty"` + + ItemValidationFields *[]string `json:"itemValidationFields,omitempty"` + + ItemValidationLimits *Itemvalidationlimits `json:"itemValidationLimits,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + DateCreated: DateCreated, + + Schema: u.Schema, + + Current: u.Current, + + ValidationFields: u.ValidationFields, + + ValidationLimits: u.ValidationLimits, + + ItemValidationFields: u.ItemValidationFields, + + ItemValidationLimits: u.ItemValidationLimits, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coretype) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coretypelisting.go b/platformclientv2/coretypelisting.go index 0a0ff93f7..cb86aec96 100644 --- a/platformclientv2/coretypelisting.go +++ b/platformclientv2/coretypelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Coretypelisting struct { } +func (u *Coretypelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coretypelisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Coretype `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coretypelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/coversheet.go b/platformclientv2/coversheet.go index 7a92ae280..0f2fbd9cd 100644 --- a/platformclientv2/coversheet.go +++ b/platformclientv2/coversheet.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Coversheet struct { } +func (u *Coversheet) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Coversheet + + + + return json.Marshal(&struct { + Notes *string `json:"notes,omitempty"` + + Locale *string `json:"locale,omitempty"` + *Alias + }{ + Notes: u.Notes, + + Locale: u.Locale, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Coversheet) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createactivitycoderequest.go b/platformclientv2/createactivitycoderequest.go index 2a49ca042..59e5c16c7 100644 --- a/platformclientv2/createactivitycoderequest.go +++ b/platformclientv2/createactivitycoderequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Createactivitycoderequest struct { } +func (u *Createactivitycoderequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createactivitycoderequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Category *string `json:"category,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + CountsAsWorkTime *bool `json:"countsAsWorkTime,omitempty"` + + AgentTimeOffSelectable *bool `json:"agentTimeOffSelectable,omitempty"` + *Alias + }{ + Name: u.Name, + + Category: u.Category, + + LengthInMinutes: u.LengthInMinutes, + + CountsAsPaidTime: u.CountsAsPaidTime, + + CountsAsWorkTime: u.CountsAsWorkTime, + + AgentTimeOffSelectable: u.AgentTimeOffSelectable, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createactivitycoderequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createadmintimeoffrequest.go b/platformclientv2/createadmintimeoffrequest.go index 2dae905b4..c73c6d111 100644 --- a/platformclientv2/createadmintimeoffrequest.go +++ b/platformclientv2/createadmintimeoffrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,46 @@ type Createadmintimeoffrequest struct { } +func (u *Createadmintimeoffrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createadmintimeoffrequest + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + Users *[]Userreference `json:"users,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Notes *string `json:"notes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + + PartialDayStartDateTimes *[]time.Time `json:"partialDayStartDateTimes,omitempty"` + + DailyDurationMinutes *int `json:"dailyDurationMinutes,omitempty"` + *Alias + }{ + Status: u.Status, + + Users: u.Users, + + ActivityCodeId: u.ActivityCodeId, + + Notes: u.Notes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + DailyDurationMinutes: u.DailyDurationMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createadmintimeoffrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createagenttimeoffrequest.go b/platformclientv2/createagenttimeoffrequest.go index d54aa403c..593a53cfb 100644 --- a/platformclientv2/createagenttimeoffrequest.go +++ b/platformclientv2/createagenttimeoffrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,38 @@ type Createagenttimeoffrequest struct { } +func (u *Createagenttimeoffrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createagenttimeoffrequest + + + + return json.Marshal(&struct { + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Notes *string `json:"notes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + + PartialDayStartDateTimes *[]time.Time `json:"partialDayStartDateTimes,omitempty"` + + DailyDurationMinutes *int `json:"dailyDurationMinutes,omitempty"` + *Alias + }{ + ActivityCodeId: u.ActivityCodeId, + + Notes: u.Notes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + DailyDurationMinutes: u.DailyDurationMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createagenttimeoffrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createbenefitassessmentjobrequest.go b/platformclientv2/createbenefitassessmentjobrequest.go index fc2dc021c..829caeec1 100644 --- a/platformclientv2/createbenefitassessmentjobrequest.go +++ b/platformclientv2/createbenefitassessmentjobrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Createbenefitassessmentjobrequest struct { } +func (u *Createbenefitassessmentjobrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createbenefitassessmentjobrequest + + + + return json.Marshal(&struct { + DivisionIds *[]string `json:"divisionIds,omitempty"` + *Alias + }{ + DivisionIds: u.DivisionIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createbenefitassessmentjobrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createbenefitassessmentrequest.go b/platformclientv2/createbenefitassessmentrequest.go index 5257e613a..443f6593f 100644 --- a/platformclientv2/createbenefitassessmentrequest.go +++ b/platformclientv2/createbenefitassessmentrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Createbenefitassessmentrequest struct { } +func (u *Createbenefitassessmentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createbenefitassessmentrequest + + + + return json.Marshal(&struct { + QueueIds *[]string `json:"queueIds,omitempty"` + *Alias + }{ + QueueIds: u.QueueIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createbenefitassessmentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createbusinessunitrequest.go b/platformclientv2/createbusinessunitrequest.go index 2c3dd1f24..85be5f5b3 100644 --- a/platformclientv2/createbusinessunitrequest.go +++ b/platformclientv2/createbusinessunitrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Createbusinessunitrequest struct { } +func (u *Createbusinessunitrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createbusinessunitrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + DivisionId *string `json:"divisionId,omitempty"` + + Settings *Createbusinessunitsettings `json:"settings,omitempty"` + *Alias + }{ + Name: u.Name, + + DivisionId: u.DivisionId, + + Settings: u.Settings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createbusinessunitrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createbusinessunitsettings.go b/platformclientv2/createbusinessunitsettings.go index 52bcd0601..b3b59a0a8 100644 --- a/platformclientv2/createbusinessunitsettings.go +++ b/platformclientv2/createbusinessunitsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Createbusinessunitsettings struct { } +func (u *Createbusinessunitsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createbusinessunitsettings + + + + return json.Marshal(&struct { + StartDayOfWeek *string `json:"startDayOfWeek,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + ShortTermForecasting *Bushorttermforecastingsettings `json:"shortTermForecasting,omitempty"` + *Alias + }{ + StartDayOfWeek: u.StartDayOfWeek, + + TimeZone: u.TimeZone, + + ShortTermForecasting: u.ShortTermForecasting, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createbusinessunitsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createcallbackcommand.go b/platformclientv2/createcallbackcommand.go index c94a4cf71..5e9d21514 100644 --- a/platformclientv2/createcallbackcommand.go +++ b/platformclientv2/createcallbackcommand.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Createcallbackcommand struct { } +func (u *Createcallbackcommand) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createcallbackcommand + + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + ScriptId *string `json:"scriptId,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + RoutingData *Routingdata `json:"routingData,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + ValidateCallbackNumbers *bool `json:"validateCallbackNumbers,omitempty"` + + Data *map[string]string `json:"data,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + *Alias + }{ + ScriptId: u.ScriptId, + + QueueId: u.QueueId, + + RoutingData: u.RoutingData, + + CallbackUserName: u.CallbackUserName, + + CallbackNumbers: u.CallbackNumbers, + + CallbackScheduledTime: CallbackScheduledTime, + + CountryCode: u.CountryCode, + + ValidateCallbackNumbers: u.ValidateCallbackNumbers, + + Data: u.Data, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createcallbackcommand) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createcallbackonconversationcommand.go b/platformclientv2/createcallbackonconversationcommand.go index e9743667a..c7449f990 100644 --- a/platformclientv2/createcallbackonconversationcommand.go +++ b/platformclientv2/createcallbackonconversationcommand.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Createcallbackonconversationcommand struct { } +func (u *Createcallbackonconversationcommand) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createcallbackonconversationcommand + + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + ScriptId *string `json:"scriptId,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + RoutingData *Routingdata `json:"routingData,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + ValidateCallbackNumbers *bool `json:"validateCallbackNumbers,omitempty"` + + Data *map[string]string `json:"data,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + *Alias + }{ + ScriptId: u.ScriptId, + + QueueId: u.QueueId, + + RoutingData: u.RoutingData, + + CallbackUserName: u.CallbackUserName, + + CallbackNumbers: u.CallbackNumbers, + + CallbackScheduledTime: CallbackScheduledTime, + + CountryCode: u.CountryCode, + + ValidateCallbackNumbers: u.ValidateCallbackNumbers, + + Data: u.Data, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createcallbackonconversationcommand) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createcallbackresponse.go b/platformclientv2/createcallbackresponse.go index 9c28cbec3..09e08bce0 100644 --- a/platformclientv2/createcallbackresponse.go +++ b/platformclientv2/createcallbackresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Createcallbackresponse struct { } +func (u *Createcallbackresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createcallbackresponse + + + + return json.Marshal(&struct { + Conversation *Domainentityref `json:"conversation,omitempty"` + + CallbackIdentifiers *[]Callbackidentifier `json:"callbackIdentifiers,omitempty"` + *Alias + }{ + Conversation: u.Conversation, + + CallbackIdentifiers: u.CallbackIdentifiers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createcallbackresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createcallrequest.go b/platformclientv2/createcallrequest.go index e6ae4e566..5b1a52554 100644 --- a/platformclientv2/createcallrequest.go +++ b/platformclientv2/createcallrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Createcallrequest struct { } +func (u *Createcallrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createcallrequest + + + + return json.Marshal(&struct { + PhoneNumber *string `json:"phoneNumber,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + + CallFromQueueId *string `json:"callFromQueueId,omitempty"` + + CallQueueId *string `json:"callQueueId,omitempty"` + + CallUserId *string `json:"callUserId,omitempty"` + + Priority *int `json:"priority,omitempty"` + + LanguageId *string `json:"languageId,omitempty"` + + RoutingSkillsIds *[]string `json:"routingSkillsIds,omitempty"` + + ConversationIds *[]string `json:"conversationIds,omitempty"` + + Participants *[]Destination `json:"participants,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + *Alias + }{ + PhoneNumber: u.PhoneNumber, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + + CallFromQueueId: u.CallFromQueueId, + + CallQueueId: u.CallQueueId, + + CallUserId: u.CallUserId, + + Priority: u.Priority, + + LanguageId: u.LanguageId, + + RoutingSkillsIds: u.RoutingSkillsIds, + + ConversationIds: u.ConversationIds, + + Participants: u.Participants, + + UuiData: u.UuiData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createcallrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createcallresponse.go b/platformclientv2/createcallresponse.go index 8feaea648..f3e42e091 100644 --- a/platformclientv2/createcallresponse.go +++ b/platformclientv2/createcallresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Createcallresponse struct { } +func (u *Createcallresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createcallresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createcallresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createcoachingappointmentrequest.go b/platformclientv2/createcoachingappointmentrequest.go index 4860cd7ca..03b23b2a0 100644 --- a/platformclientv2/createcoachingappointmentrequest.go +++ b/platformclientv2/createcoachingappointmentrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Createcoachingappointmentrequest struct { } +func (u *Createcoachingappointmentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createcoachingappointmentrequest + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + FacilitatorId *string `json:"facilitatorId,omitempty"` + + AttendeeIds *[]string `json:"attendeeIds,omitempty"` + + ConversationIds *[]string `json:"conversationIds,omitempty"` + + DocumentIds *[]string `json:"documentIds,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + DateStart: DateStart, + + LengthInMinutes: u.LengthInMinutes, + + FacilitatorId: u.FacilitatorId, + + AttendeeIds: u.AttendeeIds, + + ConversationIds: u.ConversationIds, + + DocumentIds: u.DocumentIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createcoachingappointmentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createemailrequest.go b/platformclientv2/createemailrequest.go index 22bb7ed19..da158a512 100644 --- a/platformclientv2/createemailrequest.go +++ b/platformclientv2/createemailrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -68,6 +69,78 @@ type Createemailrequest struct { } +func (u *Createemailrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createemailrequest + + + + return json.Marshal(&struct { + QueueId *string `json:"queueId,omitempty"` + + FlowId *string `json:"flowId,omitempty"` + + Provider *string `json:"provider,omitempty"` + + SkillIds *[]string `json:"skillIds,omitempty"` + + LanguageId *string `json:"languageId,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ToAddress *string `json:"toAddress,omitempty"` + + ToName *string `json:"toName,omitempty"` + + FromAddress *string `json:"fromAddress,omitempty"` + + FromName *string `json:"fromName,omitempty"` + + Subject *string `json:"subject,omitempty"` + + Direction *string `json:"direction,omitempty"` + + HtmlBody *string `json:"htmlBody,omitempty"` + + TextBody *string `json:"textBody,omitempty"` + *Alias + }{ + QueueId: u.QueueId, + + FlowId: u.FlowId, + + Provider: u.Provider, + + SkillIds: u.SkillIds, + + LanguageId: u.LanguageId, + + Priority: u.Priority, + + Attributes: u.Attributes, + + ToAddress: u.ToAddress, + + ToName: u.ToName, + + FromAddress: u.FromAddress, + + FromName: u.FromName, + + Subject: u.Subject, + + Direction: u.Direction, + + HtmlBody: u.HtmlBody, + + TextBody: u.TextBody, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createemailrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createintegrationrequest.go b/platformclientv2/createintegrationrequest.go index f7aa44f5a..ad1fba9e4 100644 --- a/platformclientv2/createintegrationrequest.go +++ b/platformclientv2/createintegrationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Createintegrationrequest struct { } +func (u *Createintegrationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createintegrationrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + IntegrationType *Integrationtype `json:"integrationType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + IntegrationType: u.IntegrationType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createintegrationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createmanagementunitapirequest.go b/platformclientv2/createmanagementunitapirequest.go index ab1599136..22635bc75 100644 --- a/platformclientv2/createmanagementunitapirequest.go +++ b/platformclientv2/createmanagementunitapirequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Createmanagementunitapirequest struct { } +func (u *Createmanagementunitapirequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createmanagementunitapirequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + StartDayOfWeek *string `json:"startDayOfWeek,omitempty"` + + Settings *Createmanagementunitsettingsrequest `json:"settings,omitempty"` + + DivisionId *string `json:"divisionId,omitempty"` + + BusinessUnitId *string `json:"businessUnitId,omitempty"` + *Alias + }{ + Name: u.Name, + + TimeZone: u.TimeZone, + + StartDayOfWeek: u.StartDayOfWeek, + + Settings: u.Settings, + + DivisionId: u.DivisionId, + + BusinessUnitId: u.BusinessUnitId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createmanagementunitapirequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createmanagementunitsettingsrequest.go b/platformclientv2/createmanagementunitsettingsrequest.go index b8064b863..af0e6e8a2 100644 --- a/platformclientv2/createmanagementunitsettingsrequest.go +++ b/platformclientv2/createmanagementunitsettingsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Createmanagementunitsettingsrequest struct { } +func (u *Createmanagementunitsettingsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createmanagementunitsettingsrequest + + + + return json.Marshal(&struct { + Adherence *Adherencesettings `json:"adherence,omitempty"` + + ShortTermForecasting *Shorttermforecastingsettings `json:"shortTermForecasting,omitempty"` + + TimeOff *Timeoffrequestsettings `json:"timeOff,omitempty"` + + Scheduling *Schedulingsettingsrequest `json:"scheduling,omitempty"` + + ShiftTrading *Shifttradesettings `json:"shiftTrading,omitempty"` + *Alias + }{ + Adherence: u.Adherence, + + ShortTermForecasting: u.ShortTermForecasting, + + TimeOff: u.TimeOff, + + Scheduling: u.Scheduling, + + ShiftTrading: u.ShiftTrading, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createmanagementunitsettingsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createoutboundmessagingconversationrequest.go b/platformclientv2/createoutboundmessagingconversationrequest.go index a990064ea..7aba7d430 100644 --- a/platformclientv2/createoutboundmessagingconversationrequest.go +++ b/platformclientv2/createoutboundmessagingconversationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Createoutboundmessagingconversationrequest struct { } +func (u *Createoutboundmessagingconversationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createoutboundmessagingconversationrequest + + + + return json.Marshal(&struct { + QueueId *string `json:"queueId,omitempty"` + + ToAddress *string `json:"toAddress,omitempty"` + + ToAddressMessengerType *string `json:"toAddressMessengerType,omitempty"` + + UseExistingConversation *bool `json:"useExistingConversation,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + *Alias + }{ + QueueId: u.QueueId, + + ToAddress: u.ToAddress, + + ToAddressMessengerType: u.ToAddressMessengerType, + + UseExistingConversation: u.UseExistingConversation, + + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createoutboundmessagingconversationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createplanninggrouprequest.go b/platformclientv2/createplanninggrouprequest.go index 809c73326..aed34261e 100644 --- a/platformclientv2/createplanninggrouprequest.go +++ b/platformclientv2/createplanninggrouprequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Createplanninggrouprequest struct { } +func (u *Createplanninggrouprequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createplanninggrouprequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + RoutePaths *[]Routepathrequest `json:"routePaths,omitempty"` + + ServiceGoalTemplateId *string `json:"serviceGoalTemplateId,omitempty"` + *Alias + }{ + Name: u.Name, + + RoutePaths: u.RoutePaths, + + ServiceGoalTemplateId: u.ServiceGoalTemplateId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createplanninggrouprequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createpredictorrequest.go b/platformclientv2/createpredictorrequest.go index 1ef2b5080..46fe2d9c2 100644 --- a/platformclientv2/createpredictorrequest.go +++ b/platformclientv2/createpredictorrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Createpredictorrequest struct { } +func (u *Createpredictorrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createpredictorrequest + + + + return json.Marshal(&struct { + QueueIds *[]string `json:"queueIds,omitempty"` + + Kpi *string `json:"kpi,omitempty"` + + RoutingTimeoutSeconds *int `json:"routingTimeoutSeconds,omitempty"` + + Schedule *Predictorschedule `json:"schedule,omitempty"` + + WorkloadBalancingConfig *Predictorworkloadbalancing `json:"workloadBalancingConfig,omitempty"` + *Alias + }{ + QueueIds: u.QueueIds, + + Kpi: u.Kpi, + + RoutingTimeoutSeconds: u.RoutingTimeoutSeconds, + + Schedule: u.Schedule, + + WorkloadBalancingConfig: u.WorkloadBalancingConfig, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createpredictorrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createqueuerequest.go b/platformclientv2/createqueuerequest.go index 3d1e2b3c1..ae91a8f37 100644 --- a/platformclientv2/createqueuerequest.go +++ b/platformclientv2/createqueuerequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,142 @@ type Createqueuerequest struct { } +func (u *Createqueuerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createqueuerequest + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + JoinedMemberCount *int `json:"joinedMemberCount,omitempty"` + + MediaSettings *map[string]Mediasetting `json:"mediaSettings,omitempty"` + + RoutingRules *[]Routingrule `json:"routingRules,omitempty"` + + Bullseye *Bullseye `json:"bullseye,omitempty"` + + AcwSettings *Acwsettings `json:"acwSettings,omitempty"` + + SkillEvaluationMethod *string `json:"skillEvaluationMethod,omitempty"` + + QueueFlow *Domainentityref `json:"queueFlow,omitempty"` + + WhisperPrompt *Domainentityref `json:"whisperPrompt,omitempty"` + + AutoAnswerOnly *bool `json:"autoAnswerOnly,omitempty"` + + EnableTranscription *bool `json:"enableTranscription,omitempty"` + + EnableManualAssignment *bool `json:"enableManualAssignment,omitempty"` + + CallingPartyName *string `json:"callingPartyName,omitempty"` + + CallingPartyNumber *string `json:"callingPartyNumber,omitempty"` + + DefaultScripts *map[string]Script `json:"defaultScripts,omitempty"` + + OutboundMessagingAddresses *Queuemessagingaddresses `json:"outboundMessagingAddresses,omitempty"` + + OutboundEmailAddress *Queueemailaddress `json:"outboundEmailAddress,omitempty"` + + SourceQueueId *string `json:"sourceQueueId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + MemberCount: u.MemberCount, + + JoinedMemberCount: u.JoinedMemberCount, + + MediaSettings: u.MediaSettings, + + RoutingRules: u.RoutingRules, + + Bullseye: u.Bullseye, + + AcwSettings: u.AcwSettings, + + SkillEvaluationMethod: u.SkillEvaluationMethod, + + QueueFlow: u.QueueFlow, + + WhisperPrompt: u.WhisperPrompt, + + AutoAnswerOnly: u.AutoAnswerOnly, + + EnableTranscription: u.EnableTranscription, + + EnableManualAssignment: u.EnableManualAssignment, + + CallingPartyName: u.CallingPartyName, + + CallingPartyNumber: u.CallingPartyNumber, + + DefaultScripts: u.DefaultScripts, + + OutboundMessagingAddresses: u.OutboundMessagingAddresses, + + OutboundEmailAddress: u.OutboundEmailAddress, + + SourceQueueId: u.SourceQueueId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createqueuerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createsecuresession.go b/platformclientv2/createsecuresession.go index b4f70bb29..3fed35d25 100644 --- a/platformclientv2/createsecuresession.go +++ b/platformclientv2/createsecuresession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Createsecuresession struct { } +func (u *Createsecuresession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createsecuresession + + + + return json.Marshal(&struct { + SourceParticipantId *string `json:"sourceParticipantId,omitempty"` + + FlowId *string `json:"flowId,omitempty"` + + UserData *string `json:"userData,omitempty"` + + Disconnect *bool `json:"disconnect,omitempty"` + *Alias + }{ + SourceParticipantId: u.SourceParticipantId, + + FlowId: u.FlowId, + + UserData: u.UserData, + + Disconnect: u.Disconnect, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createsecuresession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createservicegoaltemplate.go b/platformclientv2/createservicegoaltemplate.go index cd16ee216..8773d7ee7 100644 --- a/platformclientv2/createservicegoaltemplate.go +++ b/platformclientv2/createservicegoaltemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Createservicegoaltemplate struct { } +func (u *Createservicegoaltemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createservicegoaltemplate + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + ServiceLevel *Buservicelevel `json:"serviceLevel,omitempty"` + + AverageSpeedOfAnswer *Buaveragespeedofanswer `json:"averageSpeedOfAnswer,omitempty"` + + AbandonRate *Buabandonrate `json:"abandonRate,omitempty"` + *Alias + }{ + Name: u.Name, + + ServiceLevel: u.ServiceLevel, + + AverageSpeedOfAnswer: u.AverageSpeedOfAnswer, + + AbandonRate: u.AbandonRate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createservicegoaltemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createsharerequest.go b/platformclientv2/createsharerequest.go index baa3e9b0e..dee7d2314 100644 --- a/platformclientv2/createsharerequest.go +++ b/platformclientv2/createsharerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Createsharerequest struct { } +func (u *Createsharerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createsharerequest + + + + return json.Marshal(&struct { + SharedEntityType *string `json:"sharedEntityType,omitempty"` + + SharedEntity *Sharedentity `json:"sharedEntity,omitempty"` + + MemberType *string `json:"memberType,omitempty"` + + Member *Sharedentity `json:"member,omitempty"` + + Members *[]Createsharerequestmember `json:"members,omitempty"` + *Alias + }{ + SharedEntityType: u.SharedEntityType, + + SharedEntity: u.SharedEntity, + + MemberType: u.MemberType, + + Member: u.Member, + + Members: u.Members, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createsharerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createsharerequestmember.go b/platformclientv2/createsharerequestmember.go index 51ca62904..43b3d272b 100644 --- a/platformclientv2/createsharerequestmember.go +++ b/platformclientv2/createsharerequestmember.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Createsharerequestmember struct { } +func (u *Createsharerequestmember) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createsharerequestmember + + + + return json.Marshal(&struct { + MemberType *string `json:"memberType,omitempty"` + + Member *Memberentity `json:"member,omitempty"` + *Alias + }{ + MemberType: u.MemberType, + + Member: u.Member, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createsharerequestmember) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createshareresponse.go b/platformclientv2/createshareresponse.go index 009fd7136..658ce39d3 100644 --- a/platformclientv2/createshareresponse.go +++ b/platformclientv2/createshareresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Createshareresponse struct { } +func (u *Createshareresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createshareresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SharedEntityType *string `json:"sharedEntityType,omitempty"` + + SharedEntity *Domainentityref `json:"sharedEntity,omitempty"` + + MemberType *string `json:"memberType,omitempty"` + + Member *Domainentityref `json:"member,omitempty"` + + SharedBy *Domainentityref `json:"sharedBy,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + Succeeded *[]Share `json:"succeeded,omitempty"` + + Failed *[]Share `json:"failed,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SharedEntityType: u.SharedEntityType, + + SharedEntity: u.SharedEntity, + + MemberType: u.MemberType, + + Member: u.Member, + + SharedBy: u.SharedBy, + + Workspace: u.Workspace, + + Succeeded: u.Succeeded, + + Failed: u.Failed, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createshareresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createuser.go b/platformclientv2/createuser.go index ed6ad49fe..f0a4814e6 100644 --- a/platformclientv2/createuser.go +++ b/platformclientv2/createuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Createuser struct { } +func (u *Createuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createuser + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Department *string `json:"department,omitempty"` + + Email *string `json:"email,omitempty"` + + Addresses *[]Contact `json:"addresses,omitempty"` + + Title *string `json:"title,omitempty"` + + Password *string `json:"password,omitempty"` + + DivisionId *string `json:"divisionId,omitempty"` + + State *string `json:"state,omitempty"` + *Alias + }{ + Name: u.Name, + + Department: u.Department, + + Email: u.Email, + + Addresses: u.Addresses, + + Title: u.Title, + + Password: u.Password, + + DivisionId: u.DivisionId, + + State: u.State, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createwebchatconversationrequest.go b/platformclientv2/createwebchatconversationrequest.go index 75b5787dc..ddaeca2ec 100644 --- a/platformclientv2/createwebchatconversationrequest.go +++ b/platformclientv2/createwebchatconversationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Createwebchatconversationrequest struct { } +func (u *Createwebchatconversationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createwebchatconversationrequest + + + + return json.Marshal(&struct { + OrganizationId *string `json:"organizationId,omitempty"` + + DeploymentId *string `json:"deploymentId,omitempty"` + + RoutingTarget *Webchatroutingtarget `json:"routingTarget,omitempty"` + + MemberInfo *Guestmemberinfo `json:"memberInfo,omitempty"` + + MemberAuthToken *string `json:"memberAuthToken,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + *Alias + }{ + OrganizationId: u.OrganizationId, + + DeploymentId: u.DeploymentId, + + RoutingTarget: u.RoutingTarget, + + MemberInfo: u.MemberInfo, + + MemberAuthToken: u.MemberAuthToken, + + JourneyContext: u.JourneyContext, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createwebchatconversationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createwebchatconversationresponse.go b/platformclientv2/createwebchatconversationresponse.go index 40b37ceaf..1ae45cff2 100644 --- a/platformclientv2/createwebchatconversationresponse.go +++ b/platformclientv2/createwebchatconversationresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Createwebchatconversationresponse struct { } +func (u *Createwebchatconversationresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createwebchatconversationresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Jwt *string `json:"jwt,omitempty"` + + EventStreamUri *string `json:"eventStreamUri,omitempty"` + + Member *Webchatmemberinfo `json:"member,omitempty"` + *Alias + }{ + Id: u.Id, + + Jwt: u.Jwt, + + EventStreamUri: u.EventStreamUri, + + Member: u.Member, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createwebchatconversationresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createwebchatmessagerequest.go b/platformclientv2/createwebchatmessagerequest.go index 5adc5708d..9fc754181 100644 --- a/platformclientv2/createwebchatmessagerequest.go +++ b/platformclientv2/createwebchatmessagerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Createwebchatmessagerequest struct { } +func (u *Createwebchatmessagerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createwebchatmessagerequest + + + + return json.Marshal(&struct { + Body *string `json:"body,omitempty"` + + BodyType *string `json:"bodyType,omitempty"` + *Alias + }{ + Body: u.Body, + + BodyType: u.BodyType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createwebchatmessagerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createwebchatrequest.go b/platformclientv2/createwebchatrequest.go index f8971419d..bf004ac0f 100644 --- a/platformclientv2/createwebchatrequest.go +++ b/platformclientv2/createwebchatrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Createwebchatrequest struct { } +func (u *Createwebchatrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createwebchatrequest + + + + return json.Marshal(&struct { + QueueId *string `json:"queueId,omitempty"` + + Provider *string `json:"provider,omitempty"` + + SkillIds *[]string `json:"skillIds,omitempty"` + + LanguageId *string `json:"languageId,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + CustomerName *string `json:"customerName,omitempty"` + *Alias + }{ + QueueId: u.QueueId, + + Provider: u.Provider, + + SkillIds: u.SkillIds, + + LanguageId: u.LanguageId, + + Priority: u.Priority, + + Attributes: u.Attributes, + + CustomerName: u.CustomerName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createwebchatrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createworkplan.go b/platformclientv2/createworkplan.go index b6e50df34..6132b72a3 100644 --- a/platformclientv2/createworkplan.go +++ b/platformclientv2/createworkplan.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -120,6 +121,130 @@ type Createworkplan struct { } +func (u *Createworkplan) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createworkplan + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + ConstrainWeeklyPaidTime *bool `json:"constrainWeeklyPaidTime,omitempty"` + + FlexibleWeeklyPaidTime *bool `json:"flexibleWeeklyPaidTime,omitempty"` + + WeeklyExactPaidMinutes *int `json:"weeklyExactPaidMinutes,omitempty"` + + WeeklyMinimumPaidMinutes *int `json:"weeklyMinimumPaidMinutes,omitempty"` + + WeeklyMaximumPaidMinutes *int `json:"weeklyMaximumPaidMinutes,omitempty"` + + ConstrainPaidTimeGranularity *bool `json:"constrainPaidTimeGranularity,omitempty"` + + PaidTimeGranularityMinutes *int `json:"paidTimeGranularityMinutes,omitempty"` + + ConstrainMinimumTimeBetweenShifts *bool `json:"constrainMinimumTimeBetweenShifts,omitempty"` + + MinimumTimeBetweenShiftsMinutes *int `json:"minimumTimeBetweenShiftsMinutes,omitempty"` + + MaximumDays *int `json:"maximumDays,omitempty"` + + MinimumConsecutiveNonWorkingMinutesPerWeek *int `json:"minimumConsecutiveNonWorkingMinutesPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingWeekends *bool `json:"constrainMaximumConsecutiveWorkingWeekends,omitempty"` + + MaximumConsecutiveWorkingWeekends *int `json:"maximumConsecutiveWorkingWeekends,omitempty"` + + MinimumWorkingDaysPerWeek *int `json:"minimumWorkingDaysPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingDays *bool `json:"constrainMaximumConsecutiveWorkingDays,omitempty"` + + MaximumConsecutiveWorkingDays *int `json:"maximumConsecutiveWorkingDays,omitempty"` + + MinimumShiftStartDistanceMinutes *int `json:"minimumShiftStartDistanceMinutes,omitempty"` + + MinimumDaysOffPerPlanningPeriod *int `json:"minimumDaysOffPerPlanningPeriod,omitempty"` + + MaximumDaysOffPerPlanningPeriod *int `json:"maximumDaysOffPerPlanningPeriod,omitempty"` + + MinimumPaidMinutesPerPlanningPeriod *int `json:"minimumPaidMinutesPerPlanningPeriod,omitempty"` + + MaximumPaidMinutesPerPlanningPeriod *int `json:"maximumPaidMinutesPerPlanningPeriod,omitempty"` + + OptionalDays *Setwrapperdayofweek `json:"optionalDays,omitempty"` + + ShiftStartVarianceType *string `json:"shiftStartVarianceType,omitempty"` + + ShiftStartVariances *Listwrappershiftstartvariance `json:"shiftStartVariances,omitempty"` + + Shifts *[]Createworkplanshift `json:"shifts,omitempty"` + + Agents *[]Userreference `json:"agents,omitempty"` + *Alias + }{ + Name: u.Name, + + Enabled: u.Enabled, + + ConstrainWeeklyPaidTime: u.ConstrainWeeklyPaidTime, + + FlexibleWeeklyPaidTime: u.FlexibleWeeklyPaidTime, + + WeeklyExactPaidMinutes: u.WeeklyExactPaidMinutes, + + WeeklyMinimumPaidMinutes: u.WeeklyMinimumPaidMinutes, + + WeeklyMaximumPaidMinutes: u.WeeklyMaximumPaidMinutes, + + ConstrainPaidTimeGranularity: u.ConstrainPaidTimeGranularity, + + PaidTimeGranularityMinutes: u.PaidTimeGranularityMinutes, + + ConstrainMinimumTimeBetweenShifts: u.ConstrainMinimumTimeBetweenShifts, + + MinimumTimeBetweenShiftsMinutes: u.MinimumTimeBetweenShiftsMinutes, + + MaximumDays: u.MaximumDays, + + MinimumConsecutiveNonWorkingMinutesPerWeek: u.MinimumConsecutiveNonWorkingMinutesPerWeek, + + ConstrainMaximumConsecutiveWorkingWeekends: u.ConstrainMaximumConsecutiveWorkingWeekends, + + MaximumConsecutiveWorkingWeekends: u.MaximumConsecutiveWorkingWeekends, + + MinimumWorkingDaysPerWeek: u.MinimumWorkingDaysPerWeek, + + ConstrainMaximumConsecutiveWorkingDays: u.ConstrainMaximumConsecutiveWorkingDays, + + MaximumConsecutiveWorkingDays: u.MaximumConsecutiveWorkingDays, + + MinimumShiftStartDistanceMinutes: u.MinimumShiftStartDistanceMinutes, + + MinimumDaysOffPerPlanningPeriod: u.MinimumDaysOffPerPlanningPeriod, + + MaximumDaysOffPerPlanningPeriod: u.MaximumDaysOffPerPlanningPeriod, + + MinimumPaidMinutesPerPlanningPeriod: u.MinimumPaidMinutesPerPlanningPeriod, + + MaximumPaidMinutesPerPlanningPeriod: u.MaximumPaidMinutesPerPlanningPeriod, + + OptionalDays: u.OptionalDays, + + ShiftStartVarianceType: u.ShiftStartVarianceType, + + ShiftStartVariances: u.ShiftStartVariances, + + Shifts: u.Shifts, + + Agents: u.Agents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createworkplan) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createworkplanactivity.go b/platformclientv2/createworkplanactivity.go index a4a62c6ad..4ab880330 100644 --- a/platformclientv2/createworkplanactivity.go +++ b/platformclientv2/createworkplanactivity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -60,6 +61,70 @@ type Createworkplanactivity struct { } +func (u *Createworkplanactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createworkplanactivity + + + + return json.Marshal(&struct { + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Description *string `json:"description,omitempty"` + + LengthMinutes *int `json:"lengthMinutes,omitempty"` + + StartTimeIsRelativeToShiftStart *bool `json:"startTimeIsRelativeToShiftStart,omitempty"` + + FlexibleStartTime *bool `json:"flexibleStartTime,omitempty"` + + EarliestStartTimeMinutes *int `json:"earliestStartTimeMinutes,omitempty"` + + LatestStartTimeMinutes *int `json:"latestStartTimeMinutes,omitempty"` + + ExactStartTimeMinutes *int `json:"exactStartTimeMinutes,omitempty"` + + StartTimeIncrementMinutes *int `json:"startTimeIncrementMinutes,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + CountsAsContiguousWorkTime *bool `json:"countsAsContiguousWorkTime,omitempty"` + + MinimumLengthFromShiftStartMinutes *int `json:"minimumLengthFromShiftStartMinutes,omitempty"` + + MinimumLengthFromShiftEndMinutes *int `json:"minimumLengthFromShiftEndMinutes,omitempty"` + *Alias + }{ + ActivityCodeId: u.ActivityCodeId, + + Description: u.Description, + + LengthMinutes: u.LengthMinutes, + + StartTimeIsRelativeToShiftStart: u.StartTimeIsRelativeToShiftStart, + + FlexibleStartTime: u.FlexibleStartTime, + + EarliestStartTimeMinutes: u.EarliestStartTimeMinutes, + + LatestStartTimeMinutes: u.LatestStartTimeMinutes, + + ExactStartTimeMinutes: u.ExactStartTimeMinutes, + + StartTimeIncrementMinutes: u.StartTimeIncrementMinutes, + + CountsAsPaidTime: u.CountsAsPaidTime, + + CountsAsContiguousWorkTime: u.CountsAsContiguousWorkTime, + + MinimumLengthFromShiftStartMinutes: u.MinimumLengthFromShiftStartMinutes, + + MinimumLengthFromShiftEndMinutes: u.MinimumLengthFromShiftEndMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createworkplanactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/createworkplanshift.go b/platformclientv2/createworkplanshift.go index 88de537ee..3238dc058 100644 --- a/platformclientv2/createworkplanshift.go +++ b/platformclientv2/createworkplanshift.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -88,6 +89,98 @@ type Createworkplanshift struct { } +func (u *Createworkplanshift) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Createworkplanshift + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Days *Setwrapperdayofweek `json:"days,omitempty"` + + FlexibleStartTime *bool `json:"flexibleStartTime,omitempty"` + + ExactStartTimeMinutesFromMidnight *int `json:"exactStartTimeMinutesFromMidnight,omitempty"` + + EarliestStartTimeMinutesFromMidnight *int `json:"earliestStartTimeMinutesFromMidnight,omitempty"` + + LatestStartTimeMinutesFromMidnight *int `json:"latestStartTimeMinutesFromMidnight,omitempty"` + + ConstrainStopTime *bool `json:"constrainStopTime,omitempty"` + + ConstrainLatestStopTime *bool `json:"constrainLatestStopTime,omitempty"` + + LatestStopTimeMinutesFromMidnight *int `json:"latestStopTimeMinutesFromMidnight,omitempty"` + + ConstrainEarliestStopTime *bool `json:"constrainEarliestStopTime,omitempty"` + + EarliestStopTimeMinutesFromMidnight *int `json:"earliestStopTimeMinutesFromMidnight,omitempty"` + + StartIncrementMinutes *int `json:"startIncrementMinutes,omitempty"` + + FlexiblePaidTime *bool `json:"flexiblePaidTime,omitempty"` + + ExactPaidTimeMinutes *int `json:"exactPaidTimeMinutes,omitempty"` + + MinimumPaidTimeMinutes *int `json:"minimumPaidTimeMinutes,omitempty"` + + MaximumPaidTimeMinutes *int `json:"maximumPaidTimeMinutes,omitempty"` + + ConstrainContiguousWorkTime *bool `json:"constrainContiguousWorkTime,omitempty"` + + MinimumContiguousWorkTimeMinutes *int `json:"minimumContiguousWorkTimeMinutes,omitempty"` + + MaximumContiguousWorkTimeMinutes *int `json:"maximumContiguousWorkTimeMinutes,omitempty"` + + Activities *[]Createworkplanactivity `json:"activities,omitempty"` + *Alias + }{ + Name: u.Name, + + Days: u.Days, + + FlexibleStartTime: u.FlexibleStartTime, + + ExactStartTimeMinutesFromMidnight: u.ExactStartTimeMinutesFromMidnight, + + EarliestStartTimeMinutesFromMidnight: u.EarliestStartTimeMinutesFromMidnight, + + LatestStartTimeMinutesFromMidnight: u.LatestStartTimeMinutesFromMidnight, + + ConstrainStopTime: u.ConstrainStopTime, + + ConstrainLatestStopTime: u.ConstrainLatestStopTime, + + LatestStopTimeMinutesFromMidnight: u.LatestStopTimeMinutesFromMidnight, + + ConstrainEarliestStopTime: u.ConstrainEarliestStopTime, + + EarliestStopTimeMinutesFromMidnight: u.EarliestStopTimeMinutesFromMidnight, + + StartIncrementMinutes: u.StartIncrementMinutes, + + FlexiblePaidTime: u.FlexiblePaidTime, + + ExactPaidTimeMinutes: u.ExactPaidTimeMinutes, + + MinimumPaidTimeMinutes: u.MinimumPaidTimeMinutes, + + MaximumPaidTimeMinutes: u.MaximumPaidTimeMinutes, + + ConstrainContiguousWorkTime: u.ConstrainContiguousWorkTime, + + MinimumContiguousWorkTimeMinutes: u.MinimumContiguousWorkTimeMinutes, + + MaximumContiguousWorkTimeMinutes: u.MaximumContiguousWorkTimeMinutes, + + Activities: u.Activities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Createworkplanshift) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/credential.go b/platformclientv2/credential.go index 70deb1fc4..5532fcaf7 100644 --- a/platformclientv2/credential.go +++ b/platformclientv2/credential.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Credential struct { } +func (u *Credential) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Credential + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *Credentialtype `json:"type,omitempty"` + + CredentialFields *map[string]string `json:"credentialFields,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + CredentialFields: u.CredentialFields, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Credential) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/credentialinfo.go b/platformclientv2/credentialinfo.go index 4f6006002..66a5792cc 100644 --- a/platformclientv2/credentialinfo.go +++ b/platformclientv2/credentialinfo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,58 @@ type Credentialinfo struct { } +func (u *Credentialinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Credentialinfo + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + VarType *Credentialtype `json:"type,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + + VarType: u.VarType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Credentialinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/credentialinfolisting.go b/platformclientv2/credentialinfolisting.go index 17d544e0b..b019b27a7 100644 --- a/platformclientv2/credentialinfolisting.go +++ b/platformclientv2/credentialinfolisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Credentialinfolisting struct { } +func (u *Credentialinfolisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Credentialinfolisting + + + + return json.Marshal(&struct { + Entities *[]Credentialinfo `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Credentialinfolisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/credentialspecification.go b/platformclientv2/credentialspecification.go index 34b37adcc..10b403891 100644 --- a/platformclientv2/credentialspecification.go +++ b/platformclientv2/credentialspecification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Credentialspecification struct { } +func (u *Credentialspecification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Credentialspecification + + + + return json.Marshal(&struct { + Required *bool `json:"required,omitempty"` + + Title *string `json:"title,omitempty"` + + CredentialTypes *[]string `json:"credentialTypes,omitempty"` + *Alias + }{ + Required: u.Required, + + Title: u.Title, + + CredentialTypes: u.CredentialTypes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Credentialspecification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/credentialtype.go b/platformclientv2/credentialtype.go index 075afff39..3652ef03f 100644 --- a/platformclientv2/credentialtype.go +++ b/platformclientv2/credentialtype.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Credentialtype struct { } +func (u *Credentialtype) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Credentialtype + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Properties *interface{} `json:"properties,omitempty"` + + DisplayOrder *[]string `json:"displayOrder,omitempty"` + + Required *[]string `json:"required,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Properties: u.Properties, + + DisplayOrder: u.DisplayOrder, + + Required: u.Required, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Credentialtype) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/credentialtypelisting.go b/platformclientv2/credentialtypelisting.go index 64a675cc6..66ecaa65b 100644 --- a/platformclientv2/credentialtypelisting.go +++ b/platformclientv2/credentialtypelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Credentialtypelisting struct { } +func (u *Credentialtypelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Credentialtypelisting + + + + return json.Marshal(&struct { + Entities *[]Credentialtype `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Credentialtypelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/criteria.go b/platformclientv2/criteria.go index 22cd8b88d..6cf95aab9 100644 --- a/platformclientv2/criteria.go +++ b/platformclientv2/criteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Criteria struct { } +func (u *Criteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Criteria + + + + return json.Marshal(&struct { + Key *string `json:"key,omitempty"` + + Values *[]string `json:"values,omitempty"` + + ShouldIgnoreCase *bool `json:"shouldIgnoreCase,omitempty"` + + Operator *string `json:"operator,omitempty"` + *Alias + }{ + Key: u.Key, + + Values: u.Values, + + ShouldIgnoreCase: u.ShouldIgnoreCase, + + Operator: u.Operator, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Criteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformcallmediapolicy.go b/platformclientv2/crossplatformcallmediapolicy.go index fbc7e627a..df30dbbcd 100644 --- a/platformclientv2/crossplatformcallmediapolicy.go +++ b/platformclientv2/crossplatformcallmediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Crossplatformcallmediapolicy struct { } +func (u *Crossplatformcallmediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformcallmediapolicy + + + + return json.Marshal(&struct { + Actions *Crossplatformpolicyactions `json:"actions,omitempty"` + + Conditions *Callmediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformcallmediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformchatmediapolicy.go b/platformclientv2/crossplatformchatmediapolicy.go index ba3797941..5cf641dfa 100644 --- a/platformclientv2/crossplatformchatmediapolicy.go +++ b/platformclientv2/crossplatformchatmediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Crossplatformchatmediapolicy struct { } +func (u *Crossplatformchatmediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformchatmediapolicy + + + + return json.Marshal(&struct { + Actions *Crossplatformpolicyactions `json:"actions,omitempty"` + + Conditions *Chatmediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformchatmediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformemailmediapolicy.go b/platformclientv2/crossplatformemailmediapolicy.go index 0788b5bdf..c450b1191 100644 --- a/platformclientv2/crossplatformemailmediapolicy.go +++ b/platformclientv2/crossplatformemailmediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Crossplatformemailmediapolicy struct { } +func (u *Crossplatformemailmediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformemailmediapolicy + + + + return json.Marshal(&struct { + Actions *Crossplatformpolicyactions `json:"actions,omitempty"` + + Conditions *Emailmediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformemailmediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformmediapolicies.go b/platformclientv2/crossplatformmediapolicies.go index b20581f76..7a2f36491 100644 --- a/platformclientv2/crossplatformmediapolicies.go +++ b/platformclientv2/crossplatformmediapolicies.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Crossplatformmediapolicies struct { } +func (u *Crossplatformmediapolicies) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformmediapolicies + + + + return json.Marshal(&struct { + CallPolicy *Crossplatformcallmediapolicy `json:"callPolicy,omitempty"` + + ChatPolicy *Crossplatformchatmediapolicy `json:"chatPolicy,omitempty"` + + EmailPolicy *Crossplatformemailmediapolicy `json:"emailPolicy,omitempty"` + + MessagePolicy *Crossplatformmessagemediapolicy `json:"messagePolicy,omitempty"` + *Alias + }{ + CallPolicy: u.CallPolicy, + + ChatPolicy: u.ChatPolicy, + + EmailPolicy: u.EmailPolicy, + + MessagePolicy: u.MessagePolicy, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformmediapolicies) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformmessagemediapolicy.go b/platformclientv2/crossplatformmessagemediapolicy.go index 8f68ca5e0..722a2f42e 100644 --- a/platformclientv2/crossplatformmessagemediapolicy.go +++ b/platformclientv2/crossplatformmessagemediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Crossplatformmessagemediapolicy struct { } +func (u *Crossplatformmessagemediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformmessagemediapolicy + + + + return json.Marshal(&struct { + Actions *Crossplatformpolicyactions `json:"actions,omitempty"` + + Conditions *Messagemediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformmessagemediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformpolicy.go b/platformclientv2/crossplatformpolicy.go index d52abbc80..7252a0c77 100644 --- a/platformclientv2/crossplatformpolicy.go +++ b/platformclientv2/crossplatformpolicy.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Crossplatformpolicy struct { } +func (u *Crossplatformpolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformpolicy + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + Order *int `json:"order,omitempty"` + + Description *string `json:"description,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + MediaPolicies *Crossplatformmediapolicies `json:"mediaPolicies,omitempty"` + + Conditions *Policyconditions `json:"conditions,omitempty"` + + Actions *Crossplatformpolicyactions `json:"actions,omitempty"` + + PolicyErrors *Policyerrors `json:"policyErrors,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ModifiedDate: ModifiedDate, + + CreatedDate: CreatedDate, + + Order: u.Order, + + Description: u.Description, + + Enabled: u.Enabled, + + MediaPolicies: u.MediaPolicies, + + Conditions: u.Conditions, + + Actions: u.Actions, + + PolicyErrors: u.PolicyErrors, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformpolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformpolicyactions.go b/platformclientv2/crossplatformpolicyactions.go index ad2b36cc9..84ea534f5 100644 --- a/platformclientv2/crossplatformpolicyactions.go +++ b/platformclientv2/crossplatformpolicyactions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Crossplatformpolicyactions struct { } +func (u *Crossplatformpolicyactions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformpolicyactions + + + + return json.Marshal(&struct { + RetainRecording *bool `json:"retainRecording,omitempty"` + + DeleteRecording *bool `json:"deleteRecording,omitempty"` + + AlwaysDelete *bool `json:"alwaysDelete,omitempty"` + + AssignEvaluations *[]Evaluationassignment `json:"assignEvaluations,omitempty"` + + AssignMeteredEvaluations *[]Meteredevaluationassignment `json:"assignMeteredEvaluations,omitempty"` + + AssignMeteredAssignmentByAgent *[]Meteredassignmentbyagent `json:"assignMeteredAssignmentByAgent,omitempty"` + + AssignCalibrations *[]Calibrationassignment `json:"assignCalibrations,omitempty"` + + RetentionDuration *Retentionduration `json:"retentionDuration,omitempty"` + + MediaTranscriptions *[]Mediatranscription `json:"mediaTranscriptions,omitempty"` + + IntegrationExport *Integrationexport `json:"integrationExport,omitempty"` + *Alias + }{ + RetainRecording: u.RetainRecording, + + DeleteRecording: u.DeleteRecording, + + AlwaysDelete: u.AlwaysDelete, + + AssignEvaluations: u.AssignEvaluations, + + AssignMeteredEvaluations: u.AssignMeteredEvaluations, + + AssignMeteredAssignmentByAgent: u.AssignMeteredAssignmentByAgent, + + AssignCalibrations: u.AssignCalibrations, + + RetentionDuration: u.RetentionDuration, + + MediaTranscriptions: u.MediaTranscriptions, + + IntegrationExport: u.IntegrationExport, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformpolicyactions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformpolicycreate.go b/platformclientv2/crossplatformpolicycreate.go index e6ebf8f0b..f82c21f25 100644 --- a/platformclientv2/crossplatformpolicycreate.go +++ b/platformclientv2/crossplatformpolicycreate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Crossplatformpolicycreate struct { } +func (u *Crossplatformpolicycreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformpolicycreate + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + Order *int `json:"order,omitempty"` + + Description *string `json:"description,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + MediaPolicies *Crossplatformmediapolicies `json:"mediaPolicies,omitempty"` + + Conditions *Policyconditions `json:"conditions,omitempty"` + + Actions *Crossplatformpolicyactions `json:"actions,omitempty"` + + PolicyErrors *Policyerrors `json:"policyErrors,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ModifiedDate: ModifiedDate, + + CreatedDate: CreatedDate, + + Order: u.Order, + + Description: u.Description, + + Enabled: u.Enabled, + + MediaPolicies: u.MediaPolicies, + + Conditions: u.Conditions, + + Actions: u.Actions, + + PolicyErrors: u.PolicyErrors, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformpolicycreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/crossplatformpolicyupdate.go b/platformclientv2/crossplatformpolicyupdate.go index 211a4b6fe..0dcc230d7 100644 --- a/platformclientv2/crossplatformpolicyupdate.go +++ b/platformclientv2/crossplatformpolicyupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Crossplatformpolicyupdate struct { } +func (u *Crossplatformpolicyupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Crossplatformpolicyupdate + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Crossplatformpolicyupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ctabuttonstyleproperties.go b/platformclientv2/ctabuttonstyleproperties.go index 83d3135ef..dc374cd2a 100644 --- a/platformclientv2/ctabuttonstyleproperties.go +++ b/platformclientv2/ctabuttonstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Ctabuttonstyleproperties struct { } +func (u *Ctabuttonstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ctabuttonstyleproperties + + + + return json.Marshal(&struct { + Color *string `json:"color,omitempty"` + + Font *string `json:"font,omitempty"` + + FontSize *string `json:"fontSize,omitempty"` + + TextAlign *string `json:"textAlign,omitempty"` + + BackgroundColor *string `json:"backgroundColor,omitempty"` + *Alias + }{ + Color: u.Color, + + Font: u.Font, + + FontSize: u.FontSize, + + TextAlign: u.TextAlign, + + BackgroundColor: u.BackgroundColor, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ctabuttonstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/currentuserschedulerequestbody.go b/platformclientv2/currentuserschedulerequestbody.go index baa96e697..fce3c5ae1 100644 --- a/platformclientv2/currentuserschedulerequestbody.go +++ b/platformclientv2/currentuserschedulerequestbody.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Currentuserschedulerequestbody struct { } +func (u *Currentuserschedulerequestbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Currentuserschedulerequestbody + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + LoadFullWeeks *bool `json:"loadFullWeeks,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + LoadFullWeeks: u.LoadFullWeeks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Currentuserschedulerequestbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cursorcontactlisting.go b/platformclientv2/cursorcontactlisting.go index 61e776990..db18f5ada 100644 --- a/platformclientv2/cursorcontactlisting.go +++ b/platformclientv2/cursorcontactlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Cursorcontactlisting struct { } +func (u *Cursorcontactlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cursorcontactlisting + + + + return json.Marshal(&struct { + Entities *[]Externalcontact `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cursorcontactlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cursornotelisting.go b/platformclientv2/cursornotelisting.go index cddc04428..ca06c4dd7 100644 --- a/platformclientv2/cursornotelisting.go +++ b/platformclientv2/cursornotelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Cursornotelisting struct { } +func (u *Cursornotelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cursornotelisting + + + + return json.Marshal(&struct { + Entities *[]Note `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cursornotelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cursororganizationlisting.go b/platformclientv2/cursororganizationlisting.go index 3c8cdebda..8fc61bf9e 100644 --- a/platformclientv2/cursororganizationlisting.go +++ b/platformclientv2/cursororganizationlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Cursororganizationlisting struct { } +func (u *Cursororganizationlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cursororganizationlisting + + + + return json.Marshal(&struct { + Entities *[]Externalorganization `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cursororganizationlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cursorrelationshiplisting.go b/platformclientv2/cursorrelationshiplisting.go index ff45c1b54..1736e5c04 100644 --- a/platformclientv2/cursorrelationshiplisting.go +++ b/platformclientv2/cursorrelationshiplisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Cursorrelationshiplisting struct { } +func (u *Cursorrelationshiplisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cursorrelationshiplisting + + + + return json.Marshal(&struct { + Entities *[]Relationship `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cursorrelationshiplisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/cursors.go b/platformclientv2/cursors.go index 961d55751..662a545f8 100644 --- a/platformclientv2/cursors.go +++ b/platformclientv2/cursors.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Cursors struct { } +func (u *Cursors) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Cursors + + + + return json.Marshal(&struct { + Before *string `json:"before,omitempty"` + + After *string `json:"after,omitempty"` + *Alias + }{ + Before: u.Before, + + After: u.After, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Cursors) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/customerinteractioncenter.go b/platformclientv2/customerinteractioncenter.go index efeabb36c..f62c58d04 100644 --- a/platformclientv2/customerinteractioncenter.go +++ b/platformclientv2/customerinteractioncenter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Customerinteractioncenter struct { } +func (u *Customerinteractioncenter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Customerinteractioncenter + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Customerinteractioncenter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dataactionconditionpredicate.go b/platformclientv2/dataactionconditionpredicate.go index 2f681e7bd..2bda83e0a 100644 --- a/platformclientv2/dataactionconditionpredicate.go +++ b/platformclientv2/dataactionconditionpredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Dataactionconditionpredicate type Dataactionconditionpredicate struct { } +func (u *Dataactionconditionpredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dataactionconditionpredicate + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dataactionconditionpredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dataavailabilityresponse.go b/platformclientv2/dataavailabilityresponse.go index 6a21aa9aa..4a62692e1 100644 --- a/platformclientv2/dataavailabilityresponse.go +++ b/platformclientv2/dataavailabilityresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -13,6 +14,30 @@ type Dataavailabilityresponse struct { } +func (u *Dataavailabilityresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dataavailabilityresponse + + + DataAvailabilityDate := new(string) + if u.DataAvailabilityDate != nil { + + *DataAvailabilityDate = timeutil.Strftime(u.DataAvailabilityDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DataAvailabilityDate = nil + } + + + return json.Marshal(&struct { + DataAvailabilityDate *string `json:"dataAvailabilityDate,omitempty"` + *Alias + }{ + DataAvailabilityDate: DataAvailabilityDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dataavailabilityresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dataschema.go b/platformclientv2/dataschema.go index 8765ef612..af6858877 100644 --- a/platformclientv2/dataschema.go +++ b/platformclientv2/dataschema.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,62 @@ type Dataschema struct { } +func (u *Dataschema) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dataschema + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + AppliesTo *[]string `json:"appliesTo,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + JsonSchema *Jsonschemadocument `json:"jsonSchema,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + AppliesTo: u.AppliesTo, + + Enabled: u.Enabled, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + JsonSchema: u.JsonSchema, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dataschema) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dataschemalisting.go b/platformclientv2/dataschemalisting.go index 8fcae9775..51901ff28 100644 --- a/platformclientv2/dataschemalisting.go +++ b/platformclientv2/dataschemalisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dataschemalisting struct { } +func (u *Dataschemalisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dataschemalisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Dataschema `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dataschemalisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/datatable.go b/platformclientv2/datatable.go index 35c8f7f5e..713518fce 100644 --- a/platformclientv2/datatable.go +++ b/platformclientv2/datatable.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Datatable struct { } +func (u *Datatable) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Datatable + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + Schema *Jsonschemadocument `json:"schema,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + Schema: u.Schema, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Datatable) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/datatableexportjob.go b/platformclientv2/datatableexportjob.go index 835d7e74a..04576fe78 100644 --- a/platformclientv2/datatableexportjob.go +++ b/platformclientv2/datatableexportjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Datatableexportjob struct { } +func (u *Datatableexportjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Datatableexportjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Owner *Addressableentityref `json:"owner,omitempty"` + + Status *string `json:"status,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + DownloadURI *string `json:"downloadURI,omitempty"` + + ErrorInformation *Errorbody `json:"errorInformation,omitempty"` + + CountRecordsProcessed *int `json:"countRecordsProcessed,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Owner: u.Owner, + + Status: u.Status, + + DateCreated: DateCreated, + + DateCompleted: DateCompleted, + + DownloadURI: u.DownloadURI, + + ErrorInformation: u.ErrorInformation, + + CountRecordsProcessed: u.CountRecordsProcessed, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Datatableexportjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/datatableimportentitylisting.go b/platformclientv2/datatableimportentitylisting.go index b003fb5ab..8a94e8499 100644 --- a/platformclientv2/datatableimportentitylisting.go +++ b/platformclientv2/datatableimportentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Datatableimportentitylisting struct { } +func (u *Datatableimportentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Datatableimportentitylisting + + + + return json.Marshal(&struct { + Entities *[]Datatableimportjob `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Datatableimportentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/datatableimportjob.go b/platformclientv2/datatableimportjob.go index 7c6e748db..b6df321d3 100644 --- a/platformclientv2/datatableimportjob.go +++ b/platformclientv2/datatableimportjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Datatableimportjob struct { } +func (u *Datatableimportjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Datatableimportjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Owner *Addressableentityref `json:"owner,omitempty"` + + Status *string `json:"status,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + UploadURI *string `json:"uploadURI,omitempty"` + + ImportMode *string `json:"importMode,omitempty"` + + ErrorInformation *Errorbody `json:"errorInformation,omitempty"` + + CountRecordsUpdated *int `json:"countRecordsUpdated,omitempty"` + + CountRecordsDeleted *int `json:"countRecordsDeleted,omitempty"` + + CountRecordsFailed *int `json:"countRecordsFailed,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Owner: u.Owner, + + Status: u.Status, + + DateCreated: DateCreated, + + DateCompleted: DateCompleted, + + UploadURI: u.UploadURI, + + ImportMode: u.ImportMode, + + ErrorInformation: u.ErrorInformation, + + CountRecordsUpdated: u.CountRecordsUpdated, + + CountRecordsDeleted: u.CountRecordsDeleted, + + CountRecordsFailed: u.CountRecordsFailed, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Datatableimportjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/datatablerowentitylisting.go b/platformclientv2/datatablerowentitylisting.go index 5cda74bd5..4b4c5bd31 100644 --- a/platformclientv2/datatablerowentitylisting.go +++ b/platformclientv2/datatablerowentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Datatablerowentitylisting struct { } +func (u *Datatablerowentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Datatablerowentitylisting + + + + return json.Marshal(&struct { + Entities *[]map[string]interface{} `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Datatablerowentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/datatablesdomainentitylisting.go b/platformclientv2/datatablesdomainentitylisting.go index ed98929b8..d59a80e58 100644 --- a/platformclientv2/datatablesdomainentitylisting.go +++ b/platformclientv2/datatablesdomainentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Datatablesdomainentitylisting struct { } +func (u *Datatablesdomainentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Datatablesdomainentitylisting + + + + return json.Marshal(&struct { + Entities *[]Datatable `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Datatablesdomainentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/daterange.go b/platformclientv2/daterange.go index 889623942..d560cad7d 100644 --- a/platformclientv2/daterange.go +++ b/platformclientv2/daterange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Daterange struct { } +func (u *Daterange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Daterange + + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + *Alias + }{ + StartDate: u.StartDate, + + EndDate: u.EndDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Daterange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/daterangewithoptionalend.go b/platformclientv2/daterangewithoptionalend.go index 32532245c..cb88f9781 100644 --- a/platformclientv2/daterangewithoptionalend.go +++ b/platformclientv2/daterangewithoptionalend.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,40 @@ type Daterangewithoptionalend struct { } +func (u *Daterangewithoptionalend) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Daterangewithoptionalend + + + StartBusinessUnitDate := new(string) + if u.StartBusinessUnitDate != nil { + *StartBusinessUnitDate = timeutil.Strftime(u.StartBusinessUnitDate, "%Y-%m-%d") + } else { + StartBusinessUnitDate = nil + } + + EndBusinessUnitDate := new(string) + if u.EndBusinessUnitDate != nil { + *EndBusinessUnitDate = timeutil.Strftime(u.EndBusinessUnitDate, "%Y-%m-%d") + } else { + EndBusinessUnitDate = nil + } + + + return json.Marshal(&struct { + StartBusinessUnitDate *string `json:"startBusinessUnitDate,omitempty"` + + EndBusinessUnitDate *string `json:"endBusinessUnitDate,omitempty"` + *Alias + }{ + StartBusinessUnitDate: StartBusinessUnitDate, + + EndBusinessUnitDate: EndBusinessUnitDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Daterangewithoptionalend) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/defaultgreetinglist.go b/platformclientv2/defaultgreetinglist.go index 31401c488..5c30a70ef 100644 --- a/platformclientv2/defaultgreetinglist.go +++ b/platformclientv2/defaultgreetinglist.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Defaultgreetinglist struct { } +func (u *Defaultgreetinglist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Defaultgreetinglist + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Owner *Greetingowner `json:"owner,omitempty"` + + OwnerType *string `json:"ownerType,omitempty"` + + Greetings *map[string]Greeting `json:"greetings,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Owner: u.Owner, + + OwnerType: u.OwnerType, + + Greetings: u.Greetings, + + CreatedDate: CreatedDate, + + CreatedBy: u.CreatedBy, + + ModifiedDate: ModifiedDate, + + ModifiedBy: u.ModifiedBy, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Defaultgreetinglist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/defaultobjective.go b/platformclientv2/defaultobjective.go index fb086a6f6..1324f8fd3 100644 --- a/platformclientv2/defaultobjective.go +++ b/platformclientv2/defaultobjective.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Defaultobjective struct { } +func (u *Defaultobjective) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Defaultobjective + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + TemplateId *string `json:"templateId,omitempty"` + + Zones *[]Objectivezone `json:"zones,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + *Alias + }{ + Id: u.Id, + + TemplateId: u.TemplateId, + + Zones: u.Zones, + + Enabled: u.Enabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Defaultobjective) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/deletableuserreference.go b/platformclientv2/deletableuserreference.go index c53afc67a..7a458238d 100644 --- a/platformclientv2/deletableuserreference.go +++ b/platformclientv2/deletableuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Deletableuserreference struct { } +func (u *Deletableuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Deletableuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Delete *bool `json:"delete,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Delete: u.Delete, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Deletableuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/deleteretention.go b/platformclientv2/deleteretention.go index 6411986c6..896b16502 100644 --- a/platformclientv2/deleteretention.go +++ b/platformclientv2/deleteretention.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Deleteretention struct { } +func (u *Deleteretention) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Deleteretention + + + + return json.Marshal(&struct { + Days *int `json:"days,omitempty"` + *Alias + }{ + Days: u.Days, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Deleteretention) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dependency.go b/platformclientv2/dependency.go index ddb274e2f..de3674b4a 100644 --- a/platformclientv2/dependency.go +++ b/platformclientv2/dependency.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Dependency struct { } +func (u *Dependency) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dependency + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *string `json:"version,omitempty"` + + VarType *string `json:"type,omitempty"` + + Deleted *bool `json:"deleted,omitempty"` + + Updated *bool `json:"updated,omitempty"` + + StateUnknown *bool `json:"stateUnknown,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + VarType: u.VarType, + + Deleted: u.Deleted, + + Updated: u.Updated, + + StateUnknown: u.StateUnknown, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dependency) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dependencyobject.go b/platformclientv2/dependencyobject.go index 7331eee8f..a6812a020 100644 --- a/platformclientv2/dependencyobject.go +++ b/platformclientv2/dependencyobject.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dependencyobject struct { } +func (u *Dependencyobject) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dependencyobject + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *string `json:"version,omitempty"` + + VarType *string `json:"type,omitempty"` + + Deleted *bool `json:"deleted,omitempty"` + + Updated *bool `json:"updated,omitempty"` + + StateUnknown *bool `json:"stateUnknown,omitempty"` + + ConsumedResources *[]Dependency `json:"consumedResources,omitempty"` + + ConsumingResources *[]Dependency `json:"consumingResources,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + VarType: u.VarType, + + Deleted: u.Deleted, + + Updated: u.Updated, + + StateUnknown: u.StateUnknown, + + ConsumedResources: u.ConsumedResources, + + ConsumingResources: u.ConsumingResources, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dependencyobject) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dependencyobjectentitylisting.go b/platformclientv2/dependencyobjectentitylisting.go index a107fbaa4..0a0a5ec3b 100644 --- a/platformclientv2/dependencyobjectentitylisting.go +++ b/platformclientv2/dependencyobjectentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dependencyobjectentitylisting struct { } +func (u *Dependencyobjectentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dependencyobjectentitylisting + + + + return json.Marshal(&struct { + Entities *[]Dependencyobject `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dependencyobjectentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dependencystatus.go b/platformclientv2/dependencystatus.go index 187b02b51..396c26da0 100644 --- a/platformclientv2/dependencystatus.go +++ b/platformclientv2/dependencystatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Dependencystatus struct { } +func (u *Dependencystatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dependencystatus + + + DateStarted := new(string) + if u.DateStarted != nil { + + *DateStarted = timeutil.Strftime(u.DateStarted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStarted = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + User *User `json:"user,omitempty"` + + Client *Domainentityref `json:"client,omitempty"` + + BuildId *string `json:"buildId,omitempty"` + + DateStarted *string `json:"dateStarted,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + Status *string `json:"status,omitempty"` + + FailedObjects *[]Failedobject `json:"failedObjects,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + User: u.User, + + Client: u.Client, + + BuildId: u.BuildId, + + DateStarted: DateStarted, + + DateCompleted: DateCompleted, + + Status: u.Status, + + FailedObjects: u.FailedObjects, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dependencystatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dependencytype.go b/platformclientv2/dependencytype.go index 31a50f6d6..87ff17649 100644 --- a/platformclientv2/dependencytype.go +++ b/platformclientv2/dependencytype.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dependencytype struct { } +func (u *Dependencytype) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dependencytype + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Versioned *bool `json:"versioned,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Versioned: u.Versioned, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dependencytype) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dependencytypeentitylisting.go b/platformclientv2/dependencytypeentitylisting.go index 0d08cdf22..faf2684ce 100644 --- a/platformclientv2/dependencytypeentitylisting.go +++ b/platformclientv2/dependencytypeentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dependencytypeentitylisting struct { } +func (u *Dependencytypeentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dependencytypeentitylisting + + + + return json.Marshal(&struct { + Entities *[]Dependencytype `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dependencytypeentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/destination.go b/platformclientv2/destination.go index 556c4eb06..17afab7d4 100644 --- a/platformclientv2/destination.go +++ b/platformclientv2/destination.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Destination struct { } +func (u *Destination) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Destination + + + + return json.Marshal(&struct { + Address *string `json:"address,omitempty"` + + Name *string `json:"name,omitempty"` + + UserId *string `json:"userId,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + *Alias + }{ + Address: u.Address, + + Name: u.Name, + + UserId: u.UserId, + + QueueId: u.QueueId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Destination) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/detail.go b/platformclientv2/detail.go index 9e0686385..238f1a211 100644 --- a/platformclientv2/detail.go +++ b/platformclientv2/detail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Detail struct { } +func (u *Detail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Detail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Detail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/detecteddialogact.go b/platformclientv2/detecteddialogact.go index 75b36c806..0509c95e6 100644 --- a/platformclientv2/detecteddialogact.go +++ b/platformclientv2/detecteddialogact.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Detecteddialogact struct { } +func (u *Detecteddialogact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Detecteddialogact + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Probability *float64 `json:"probability,omitempty"` + *Alias + }{ + Name: u.Name, + + Probability: u.Probability, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Detecteddialogact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/detectedintent.go b/platformclientv2/detectedintent.go index bd70d5f30..8b820b705 100644 --- a/platformclientv2/detectedintent.go +++ b/platformclientv2/detectedintent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Detectedintent struct { } +func (u *Detectedintent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Detectedintent + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Probability *float64 `json:"probability,omitempty"` + + Entities *[]Detectednamedentity `json:"entities,omitempty"` + *Alias + }{ + Name: u.Name, + + Probability: u.Probability, + + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Detectedintent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/detectednamedentity.go b/platformclientv2/detectednamedentity.go index 00540cb3b..6e06c0e49 100644 --- a/platformclientv2/detectednamedentity.go +++ b/platformclientv2/detectednamedentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Detectednamedentity struct { } +func (u *Detectednamedentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Detectednamedentity + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + + Probability *float64 `json:"probability,omitempty"` + + Value *Detectednamedentityvalue `json:"value,omitempty"` + *Alias + }{ + Name: u.Name, + + EntityType: u.EntityType, + + Probability: u.Probability, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Detectednamedentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/detectednamedentityvalue.go b/platformclientv2/detectednamedentityvalue.go index 1b6bd4459..599eb5df5 100644 --- a/platformclientv2/detectednamedentityvalue.go +++ b/platformclientv2/detectednamedentityvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Detectednamedentityvalue struct { } +func (u *Detectednamedentityvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Detectednamedentityvalue + + + + return json.Marshal(&struct { + Raw *string `json:"raw,omitempty"` + + Resolved *string `json:"resolved,omitempty"` + *Alias + }{ + Raw: u.Raw, + + Resolved: u.Resolved, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Detectednamedentityvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivity.go b/platformclientv2/developmentactivity.go index 3cb50f414..78231da99 100644 --- a/platformclientv2/developmentactivity.go +++ b/platformclientv2/developmentactivity.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,90 @@ type Developmentactivity struct { } +func (u *Developmentactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivity + + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateDue := new(string) + if u.DateDue != nil { + + *DateDue = timeutil.Strftime(u.DateDue, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateDue = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + CreatedBy *Userreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Status *string `json:"status,omitempty"` + + DateDue *string `json:"dateDue,omitempty"` + + Facilitator *Userreference `json:"facilitator,omitempty"` + + Attendees *[]Userreference `json:"attendees,omitempty"` + + IsOverdue *bool `json:"isOverdue,omitempty"` + *Alias + }{ + Id: u.Id, + + DateCompleted: DateCompleted, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + SelfUri: u.SelfUri, + + Name: u.Name, + + VarType: u.VarType, + + Status: u.Status, + + DateDue: DateDue, + + Facilitator: u.Facilitator, + + Attendees: u.Attendees, + + IsOverdue: u.IsOverdue, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregateparam.go b/platformclientv2/developmentactivityaggregateparam.go index 1764049d4..c5161c563 100644 --- a/platformclientv2/developmentactivityaggregateparam.go +++ b/platformclientv2/developmentactivityaggregateparam.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Developmentactivityaggregateparam struct { } +func (u *Developmentactivityaggregateparam) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregateparam + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Developmentactivityaggregatequeryrequestfilter `json:"filter,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregateparam) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregatequeryrequestclause.go b/platformclientv2/developmentactivityaggregatequeryrequestclause.go index 32aef3296..dae39370b 100644 --- a/platformclientv2/developmentactivityaggregatequeryrequestclause.go +++ b/platformclientv2/developmentactivityaggregatequeryrequestclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Developmentactivityaggregatequeryrequestclause struct { } +func (u *Developmentactivityaggregatequeryrequestclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregatequeryrequestclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Developmentactivityaggregatequeryrequestpredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregatequeryrequestclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregatequeryrequestfilter.go b/platformclientv2/developmentactivityaggregatequeryrequestfilter.go index 666396f27..92541f004 100644 --- a/platformclientv2/developmentactivityaggregatequeryrequestfilter.go +++ b/platformclientv2/developmentactivityaggregatequeryrequestfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Developmentactivityaggregatequeryrequestfilter struct { } +func (u *Developmentactivityaggregatequeryrequestfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregatequeryrequestfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Developmentactivityaggregatequeryrequestclause `json:"clauses,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregatequeryrequestfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregatequeryrequestpredicate.go b/platformclientv2/developmentactivityaggregatequeryrequestpredicate.go index a917a3962..63a3626d4 100644 --- a/platformclientv2/developmentactivityaggregatequeryrequestpredicate.go +++ b/platformclientv2/developmentactivityaggregatequeryrequestpredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Developmentactivityaggregatequeryrequestpredicate struct { } +func (u *Developmentactivityaggregatequeryrequestpredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregatequeryrequestpredicate + + + + return json.Marshal(&struct { + Dimension *string `json:"dimension,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Dimension: u.Dimension, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregatequeryrequestpredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregatequeryresponsedata.go b/platformclientv2/developmentactivityaggregatequeryresponsedata.go index 57ab23710..f386bec74 100644 --- a/platformclientv2/developmentactivityaggregatequeryresponsedata.go +++ b/platformclientv2/developmentactivityaggregatequeryresponsedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Developmentactivityaggregatequeryresponsedata struct { } +func (u *Developmentactivityaggregatequeryresponsedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregatequeryresponsedata + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Developmentactivityaggregatequeryresponsemetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregatequeryresponsedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregatequeryresponsegroupeddata.go b/platformclientv2/developmentactivityaggregatequeryresponsegroupeddata.go index 3111e01d9..5c64347cf 100644 --- a/platformclientv2/developmentactivityaggregatequeryresponsegroupeddata.go +++ b/platformclientv2/developmentactivityaggregatequeryresponsegroupeddata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Developmentactivityaggregatequeryresponsegroupeddata struct { } +func (u *Developmentactivityaggregatequeryresponsegroupeddata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregatequeryresponsegroupeddata + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Developmentactivityaggregatequeryresponsedata `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregatequeryresponsegroupeddata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregatequeryresponsemetric.go b/platformclientv2/developmentactivityaggregatequeryresponsemetric.go index 08b16fccf..bb73357f3 100644 --- a/platformclientv2/developmentactivityaggregatequeryresponsemetric.go +++ b/platformclientv2/developmentactivityaggregatequeryresponsemetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Developmentactivityaggregatequeryresponsemetric struct { } +func (u *Developmentactivityaggregatequeryresponsemetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregatequeryresponsemetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Stats *Developmentactivityaggregatequeryresponsestatistics `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregatequeryresponsemetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregatequeryresponsestatistics.go b/platformclientv2/developmentactivityaggregatequeryresponsestatistics.go index 547406552..35707fce7 100644 --- a/platformclientv2/developmentactivityaggregatequeryresponsestatistics.go +++ b/platformclientv2/developmentactivityaggregatequeryresponsestatistics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Developmentactivityaggregatequeryresponsestatistics struct { } +func (u *Developmentactivityaggregatequeryresponsestatistics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregatequeryresponsestatistics + + + + return json.Marshal(&struct { + Count *int `json:"count,omitempty"` + + Min *int `json:"min,omitempty"` + + Max *int `json:"max,omitempty"` + + Sum *int `json:"sum,omitempty"` + *Alias + }{ + Count: u.Count, + + Min: u.Min, + + Max: u.Max, + + Sum: u.Sum, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregatequeryresponsestatistics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivityaggregateresponse.go b/platformclientv2/developmentactivityaggregateresponse.go index e843bb903..fa7b25785 100644 --- a/platformclientv2/developmentactivityaggregateresponse.go +++ b/platformclientv2/developmentactivityaggregateresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Developmentactivityaggregateresponse struct { } +func (u *Developmentactivityaggregateresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivityaggregateresponse + + + + return json.Marshal(&struct { + Results *[]Developmentactivityaggregatequeryresponsegroupeddata `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivityaggregateresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/developmentactivitylisting.go b/platformclientv2/developmentactivitylisting.go index 5083917cc..87600e1fe 100644 --- a/platformclientv2/developmentactivitylisting.go +++ b/platformclientv2/developmentactivitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Developmentactivitylisting struct { } +func (u *Developmentactivitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Developmentactivitylisting + + + + return json.Marshal(&struct { + Entities *[]Developmentactivity `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Developmentactivitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialeraction.go b/platformclientv2/dialeraction.go index 089c51e11..1d076837a 100644 --- a/platformclientv2/dialeraction.go +++ b/platformclientv2/dialeraction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialeraction struct { } +func (u *Dialeraction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialeraction + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + ActionTypeName *string `json:"actionTypeName,omitempty"` + + UpdateOption *string `json:"updateOption,omitempty"` + + Properties *map[string]string `json:"properties,omitempty"` + *Alias + }{ + VarType: u.VarType, + + ActionTypeName: u.ActionTypeName, + + UpdateOption: u.UpdateOption, + + Properties: u.Properties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialeraction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerattemptlimitsconfigchangeattemptlimits.go b/platformclientv2/dialerattemptlimitsconfigchangeattemptlimits.go index a13668234..95175b796 100644 --- a/platformclientv2/dialerattemptlimitsconfigchangeattemptlimits.go +++ b/platformclientv2/dialerattemptlimitsconfigchangeattemptlimits.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Dialerattemptlimitsconfigchangeattemptlimits struct { } +func (u *Dialerattemptlimitsconfigchangeattemptlimits) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerattemptlimitsconfigchangeattemptlimits + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + MaxAttemptsPerContact *int `json:"maxAttemptsPerContact,omitempty"` + + MaxAttemptsPerNumber *int `json:"maxAttemptsPerNumber,omitempty"` + + TimeZoneId *string `json:"timeZoneId,omitempty"` + + ResetPeriod *string `json:"resetPeriod,omitempty"` + + RecallEntries *map[string]Dialerattemptlimitsconfigchangerecallentry `json:"recallEntries,omitempty"` + + BreadthFirstRecalls *bool `json:"breadthFirstRecalls,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + MaxAttemptsPerContact: u.MaxAttemptsPerContact, + + MaxAttemptsPerNumber: u.MaxAttemptsPerNumber, + + TimeZoneId: u.TimeZoneId, + + ResetPeriod: u.ResetPeriod, + + RecallEntries: u.RecallEntries, + + BreadthFirstRecalls: u.BreadthFirstRecalls, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerattemptlimitsconfigchangeattemptlimits) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerattemptlimitsconfigchangerecallentry.go b/platformclientv2/dialerattemptlimitsconfigchangerecallentry.go index 34862b545..5a37de0e8 100644 --- a/platformclientv2/dialerattemptlimitsconfigchangerecallentry.go +++ b/platformclientv2/dialerattemptlimitsconfigchangerecallentry.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialerattemptlimitsconfigchangerecallentry struct { } +func (u *Dialerattemptlimitsconfigchangerecallentry) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerattemptlimitsconfigchangerecallentry + + + + return json.Marshal(&struct { + NbrAttempts *int `json:"nbrAttempts,omitempty"` + + MinutesBetweenAttempts *int `json:"minutesBetweenAttempts,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + NbrAttempts: u.NbrAttempts, + + MinutesBetweenAttempts: u.MinutesBetweenAttempts, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerattemptlimitsconfigchangerecallentry) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerauditrequest.go b/platformclientv2/dialerauditrequest.go index 6810f8547..4351cc1d5 100644 --- a/platformclientv2/dialerauditrequest.go +++ b/platformclientv2/dialerauditrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialerauditrequest struct { } +func (u *Dialerauditrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerauditrequest + + + + return json.Marshal(&struct { + QueryPhrase *string `json:"queryPhrase,omitempty"` + + QueryFields *[]string `json:"queryFields,omitempty"` + + Facets *[]Auditfacet `json:"facets,omitempty"` + + Filters *[]Auditfilter `json:"filters,omitempty"` + *Alias + }{ + QueryPhrase: u.QueryPhrase, + + QueryFields: u.QueryFields, + + Facets: u.Facets, + + Filters: u.Filters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerauditrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercallabletimesetconfigchangecallabletime.go b/platformclientv2/dialercallabletimesetconfigchangecallabletime.go index de0ee87f4..691f55c53 100644 --- a/platformclientv2/dialercallabletimesetconfigchangecallabletime.go +++ b/platformclientv2/dialercallabletimesetconfigchangecallabletime.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialercallabletimesetconfigchangecallabletime struct { } +func (u *Dialercallabletimesetconfigchangecallabletime) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercallabletimesetconfigchangecallabletime + + + + return json.Marshal(&struct { + TimeSlots *[]Dialercallabletimesetconfigchangetimeslot `json:"timeSlots,omitempty"` + + TimeZoneId *string `json:"timeZoneId,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + TimeSlots: u.TimeSlots, + + TimeZoneId: u.TimeZoneId, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercallabletimesetconfigchangecallabletime) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercallabletimesetconfigchangecallabletimeset.go b/platformclientv2/dialercallabletimesetconfigchangecallabletimeset.go index 79ad1448a..ca6cb5028 100644 --- a/platformclientv2/dialercallabletimesetconfigchangecallabletimeset.go +++ b/platformclientv2/dialercallabletimesetconfigchangecallabletimeset.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Dialercallabletimesetconfigchangecallabletimeset struct { } +func (u *Dialercallabletimesetconfigchangecallabletimeset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercallabletimesetconfigchangecallabletimeset + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + CallableTimes *[]Dialercallabletimesetconfigchangecallabletime `json:"callableTimes,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + CallableTimes: u.CallableTimes, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercallabletimesetconfigchangecallabletimeset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercallabletimesetconfigchangetimeslot.go b/platformclientv2/dialercallabletimesetconfigchangetimeslot.go index 26e8afcdb..60440d480 100644 --- a/platformclientv2/dialercallabletimesetconfigchangetimeslot.go +++ b/platformclientv2/dialercallabletimesetconfigchangetimeslot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialercallabletimesetconfigchangetimeslot struct { } +func (u *Dialercallabletimesetconfigchangetimeslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercallabletimesetconfigchangetimeslot + + + + return json.Marshal(&struct { + StartTime *string `json:"startTime,omitempty"` + + StopTime *string `json:"stopTime,omitempty"` + + Day *int `json:"day,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + StartTime: u.StartTime, + + StopTime: u.StopTime, + + Day: u.Day, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercallabletimesetconfigchangetimeslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignconfigchangecampaign.go b/platformclientv2/dialercampaignconfigchangecampaign.go index d9dfc348b..cf88e9533 100644 --- a/platformclientv2/dialercampaignconfigchangecampaign.go +++ b/platformclientv2/dialercampaignconfigchangecampaign.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -145,6 +146,170 @@ type Dialercampaignconfigchangecampaign struct { } +func (u *Dialercampaignconfigchangecampaign) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignconfigchangecampaign + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ContactList *Dialercampaignconfigchangeurireference `json:"contactList,omitempty"` + + Queue *Dialercampaignconfigchangeurireference `json:"queue,omitempty"` + + DialingMode *string `json:"dialingMode,omitempty"` + + Script *Dialercampaignconfigchangeurireference `json:"script,omitempty"` + + EdgeGroup *Dialercampaignconfigchangeurireference `json:"edgeGroup,omitempty"` + + Site *Dialercampaignconfigchangeurireference `json:"site,omitempty"` + + CampaignStatus *string `json:"campaignStatus,omitempty"` + + PhoneColumns *[]Dialercampaignconfigchangephonecolumn `json:"phoneColumns,omitempty"` + + AbandonRate *float32 `json:"abandonRate,omitempty"` + + DncLists *[]Dialercampaignconfigchangeurireference `json:"dncLists,omitempty"` + + CallableTimeSet *Dialercampaignconfigchangeurireference `json:"callableTimeSet,omitempty"` + + CallAnalysisResponseSet *Dialercampaignconfigchangeurireference `json:"callAnalysisResponseSet,omitempty"` + + CallerName *string `json:"callerName,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + OutboundLineCount *int `json:"outboundLineCount,omitempty"` + + Errors *[]Dialercampaignconfigchangeresterrordetail `json:"errors,omitempty"` + + RuleSets *[]Dialercampaignconfigchangeurireference `json:"ruleSets,omitempty"` + + SkipPreviewDisabled *bool `json:"skipPreviewDisabled,omitempty"` + + PreviewTimeOutSeconds *int `json:"previewTimeOutSeconds,omitempty"` + + SingleNumberPreview *bool `json:"singleNumberPreview,omitempty"` + + ContactSort *Dialercampaignconfigchangecontactsort `json:"contactSort,omitempty"` + + ContactSorts *[]Dialercampaignconfigchangecontactsort `json:"contactSorts,omitempty"` + + NoAnswerTimeout *int `json:"noAnswerTimeout,omitempty"` + + CallAnalysisLanguage *string `json:"callAnalysisLanguage,omitempty"` + + Priority *int `json:"priority,omitempty"` + + ContactListFilters *[]Dialercampaignconfigchangeurireference `json:"contactListFilters,omitempty"` + + Division *Dialercampaignconfigchangeurireference `json:"division,omitempty"` + + AgentOwnedColumn *string `json:"agentOwnedColumn,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ContactList: u.ContactList, + + Queue: u.Queue, + + DialingMode: u.DialingMode, + + Script: u.Script, + + EdgeGroup: u.EdgeGroup, + + Site: u.Site, + + CampaignStatus: u.CampaignStatus, + + PhoneColumns: u.PhoneColumns, + + AbandonRate: u.AbandonRate, + + DncLists: u.DncLists, + + CallableTimeSet: u.CallableTimeSet, + + CallAnalysisResponseSet: u.CallAnalysisResponseSet, + + CallerName: u.CallerName, + + CallerAddress: u.CallerAddress, + + OutboundLineCount: u.OutboundLineCount, + + Errors: u.Errors, + + RuleSets: u.RuleSets, + + SkipPreviewDisabled: u.SkipPreviewDisabled, + + PreviewTimeOutSeconds: u.PreviewTimeOutSeconds, + + SingleNumberPreview: u.SingleNumberPreview, + + ContactSort: u.ContactSort, + + ContactSorts: u.ContactSorts, + + NoAnswerTimeout: u.NoAnswerTimeout, + + CallAnalysisLanguage: u.CallAnalysisLanguage, + + Priority: u.Priority, + + ContactListFilters: u.ContactListFilters, + + Division: u.Division, + + AgentOwnedColumn: u.AgentOwnedColumn, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignconfigchangecampaign) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignconfigchangecontactsort.go b/platformclientv2/dialercampaignconfigchangecontactsort.go index a60044233..1dcfb7638 100644 --- a/platformclientv2/dialercampaignconfigchangecontactsort.go +++ b/platformclientv2/dialercampaignconfigchangecontactsort.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialercampaignconfigchangecontactsort struct { } +func (u *Dialercampaignconfigchangecontactsort) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignconfigchangecontactsort + + + + return json.Marshal(&struct { + FieldName *string `json:"fieldName,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Numeric *bool `json:"numeric,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + FieldName: u.FieldName, + + Direction: u.Direction, + + Numeric: u.Numeric, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignconfigchangecontactsort) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignconfigchangephonecolumn.go b/platformclientv2/dialercampaignconfigchangephonecolumn.go index 079490bf5..aab0782dc 100644 --- a/platformclientv2/dialercampaignconfigchangephonecolumn.go +++ b/platformclientv2/dialercampaignconfigchangephonecolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialercampaignconfigchangephonecolumn struct { } +func (u *Dialercampaignconfigchangephonecolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignconfigchangephonecolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignconfigchangephonecolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignconfigchangeresterrordetail.go b/platformclientv2/dialercampaignconfigchangeresterrordetail.go index d5df20836..df84605c9 100644 --- a/platformclientv2/dialercampaignconfigchangeresterrordetail.go +++ b/platformclientv2/dialercampaignconfigchangeresterrordetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialercampaignconfigchangeresterrordetail struct { } +func (u *Dialercampaignconfigchangeresterrordetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignconfigchangeresterrordetail + + + + return json.Marshal(&struct { + VarError *string `json:"error,omitempty"` + + Details *string `json:"details,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + VarError: u.VarError, + + Details: u.Details, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignconfigchangeresterrordetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignconfigchangeurireference.go b/platformclientv2/dialercampaignconfigchangeurireference.go index 9ce048770..8ac7842f6 100644 --- a/platformclientv2/dialercampaignconfigchangeurireference.go +++ b/platformclientv2/dialercampaignconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercampaignconfigchangeurireference struct { } +func (u *Dialercampaignconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignprogresseventcampaignprogress.go b/platformclientv2/dialercampaignprogresseventcampaignprogress.go index 740cf853f..fd3090fbe 100644 --- a/platformclientv2/dialercampaignprogresseventcampaignprogress.go +++ b/platformclientv2/dialercampaignprogresseventcampaignprogress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dialercampaignprogresseventcampaignprogress struct { } +func (u *Dialercampaignprogresseventcampaignprogress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignprogresseventcampaignprogress + + + + return json.Marshal(&struct { + Campaign *Dialercampaignprogresseventurireference `json:"campaign,omitempty"` + + NumberOfContactsCalled *float32 `json:"numberOfContactsCalled,omitempty"` + + NumberOfContactsMessaged *float32 `json:"numberOfContactsMessaged,omitempty"` + + TotalNumberOfContacts *float32 `json:"totalNumberOfContacts,omitempty"` + + Percentage *int `json:"percentage,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Campaign: u.Campaign, + + NumberOfContactsCalled: u.NumberOfContactsCalled, + + NumberOfContactsMessaged: u.NumberOfContactsMessaged, + + TotalNumberOfContacts: u.TotalNumberOfContacts, + + Percentage: u.Percentage, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignprogresseventcampaignprogress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignprogresseventurireference.go b/platformclientv2/dialercampaignprogresseventurireference.go index 2d4c067a9..61ea36cc8 100644 --- a/platformclientv2/dialercampaignprogresseventurireference.go +++ b/platformclientv2/dialercampaignprogresseventurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercampaignprogresseventurireference struct { } +func (u *Dialercampaignprogresseventurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignprogresseventurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignprogresseventurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignruleconfigchangecampaignrule.go b/platformclientv2/dialercampaignruleconfigchangecampaignrule.go index 2188b69a9..e8da31682 100644 --- a/platformclientv2/dialercampaignruleconfigchangecampaignrule.go +++ b/platformclientv2/dialercampaignruleconfigchangecampaignrule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Dialercampaignruleconfigchangecampaignrule struct { } +func (u *Dialercampaignruleconfigchangecampaignrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignruleconfigchangecampaignrule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + CampaignRuleEntities *Dialercampaignruleconfigchangecampaignruleentities `json:"campaignRuleEntities,omitempty"` + + CampaignRuleConditions *[]Dialercampaignruleconfigchangecampaignrulecondition `json:"campaignRuleConditions,omitempty"` + + CampaignRuleActions *[]Dialercampaignruleconfigchangecampaignruleaction `json:"campaignRuleActions,omitempty"` + + MatchAnyConditions *bool `json:"matchAnyConditions,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + CampaignRuleEntities: u.CampaignRuleEntities, + + CampaignRuleConditions: u.CampaignRuleConditions, + + CampaignRuleActions: u.CampaignRuleActions, + + MatchAnyConditions: u.MatchAnyConditions, + + Enabled: u.Enabled, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignruleconfigchangecampaignrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignruleconfigchangecampaignruleaction.go b/platformclientv2/dialercampaignruleconfigchangecampaignruleaction.go index 4a7614ab8..537757990 100644 --- a/platformclientv2/dialercampaignruleconfigchangecampaignruleaction.go +++ b/platformclientv2/dialercampaignruleconfigchangecampaignruleaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Dialercampaignruleconfigchangecampaignruleaction struct { } +func (u *Dialercampaignruleconfigchangecampaignruleaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignruleconfigchangecampaignruleaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Parameters *map[string]string `json:"parameters,omitempty"` + + ActionType *string `json:"actionType,omitempty"` + + CampaignRuleActionEntities *Dialercampaignruleconfigchangecampaignruleactionentities `json:"campaignRuleActionEntities,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Parameters: u.Parameters, + + ActionType: u.ActionType, + + CampaignRuleActionEntities: u.CampaignRuleActionEntities, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignruleconfigchangecampaignruleaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignruleconfigchangecampaignruleactionentities.go b/platformclientv2/dialercampaignruleconfigchangecampaignruleactionentities.go index e5eb4435b..efd81ca67 100644 --- a/platformclientv2/dialercampaignruleconfigchangecampaignruleactionentities.go +++ b/platformclientv2/dialercampaignruleconfigchangecampaignruleactionentities.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialercampaignruleconfigchangecampaignruleactionentities struct { } +func (u *Dialercampaignruleconfigchangecampaignruleactionentities) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignruleconfigchangecampaignruleactionentities + + + + return json.Marshal(&struct { + Campaigns *[]Dialercampaignruleconfigchangeurireference `json:"campaigns,omitempty"` + + Sequences *[]Dialercampaignruleconfigchangeurireference `json:"sequences,omitempty"` + + UseTriggeringEntity *bool `json:"useTriggeringEntity,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Campaigns: u.Campaigns, + + Sequences: u.Sequences, + + UseTriggeringEntity: u.UseTriggeringEntity, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignruleconfigchangecampaignruleactionentities) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignruleconfigchangecampaignrulecondition.go b/platformclientv2/dialercampaignruleconfigchangecampaignrulecondition.go index 14451dd8f..91303bb92 100644 --- a/platformclientv2/dialercampaignruleconfigchangecampaignrulecondition.go +++ b/platformclientv2/dialercampaignruleconfigchangecampaignrulecondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialercampaignruleconfigchangecampaignrulecondition struct { } +func (u *Dialercampaignruleconfigchangecampaignrulecondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignruleconfigchangecampaignrulecondition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Parameters *map[string]string `json:"parameters,omitempty"` + + ConditionType *string `json:"conditionType,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Parameters: u.Parameters, + + ConditionType: u.ConditionType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignruleconfigchangecampaignrulecondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignruleconfigchangecampaignruleentities.go b/platformclientv2/dialercampaignruleconfigchangecampaignruleentities.go index c1d43fd03..1b24d5626 100644 --- a/platformclientv2/dialercampaignruleconfigchangecampaignruleentities.go +++ b/platformclientv2/dialercampaignruleconfigchangecampaignruleentities.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercampaignruleconfigchangecampaignruleentities struct { } +func (u *Dialercampaignruleconfigchangecampaignruleentities) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignruleconfigchangecampaignruleentities + + + + return json.Marshal(&struct { + Campaigns *[]Dialercampaignruleconfigchangeurireference `json:"campaigns,omitempty"` + + Sequences *[]Dialercampaignruleconfigchangeurireference `json:"sequences,omitempty"` + *Alias + }{ + Campaigns: u.Campaigns, + + Sequences: u.Sequences, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignruleconfigchangecampaignruleentities) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignruleconfigchangeurireference.go b/platformclientv2/dialercampaignruleconfigchangeurireference.go index 1cd2ea2ae..a9f9cf862 100644 --- a/platformclientv2/dialercampaignruleconfigchangeurireference.go +++ b/platformclientv2/dialercampaignruleconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercampaignruleconfigchangeurireference struct { } +func (u *Dialercampaignruleconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignruleconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignruleconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignscheduleconfigchangecampaignschedule.go b/platformclientv2/dialercampaignscheduleconfigchangecampaignschedule.go index ec12f0f6d..683f69909 100644 --- a/platformclientv2/dialercampaignscheduleconfigchangecampaignschedule.go +++ b/platformclientv2/dialercampaignscheduleconfigchangecampaignschedule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Dialercampaignscheduleconfigchangecampaignschedule struct { } +func (u *Dialercampaignscheduleconfigchangecampaignschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignscheduleconfigchangecampaignschedule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Intervals *[]Dialercampaignscheduleconfigchangescheduleinterval `json:"intervals,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + Campaign *Dialercampaignscheduleconfigchangeurireference `json:"campaign,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Intervals: u.Intervals, + + TimeZone: u.TimeZone, + + Campaign: u.Campaign, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignscheduleconfigchangecampaignschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignscheduleconfigchangescheduleinterval.go b/platformclientv2/dialercampaignscheduleconfigchangescheduleinterval.go index f268ed528..0f82cb4ce 100644 --- a/platformclientv2/dialercampaignscheduleconfigchangescheduleinterval.go +++ b/platformclientv2/dialercampaignscheduleconfigchangescheduleinterval.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialercampaignscheduleconfigchangescheduleinterval struct { } +func (u *Dialercampaignscheduleconfigchangescheduleinterval) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignscheduleconfigchangescheduleinterval + + + + return json.Marshal(&struct { + Start *string `json:"start,omitempty"` + + End *string `json:"end,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Start: u.Start, + + End: u.End, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignscheduleconfigchangescheduleinterval) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercampaignscheduleconfigchangeurireference.go b/platformclientv2/dialercampaignscheduleconfigchangeurireference.go index 10e566d4c..96d9d76f2 100644 --- a/platformclientv2/dialercampaignscheduleconfigchangeurireference.go +++ b/platformclientv2/dialercampaignscheduleconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercampaignscheduleconfigchangeurireference struct { } +func (u *Dialercampaignscheduleconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercampaignscheduleconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercampaignscheduleconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontact.go b/platformclientv2/dialercontact.go index d4ccecb29..b52f28300 100644 --- a/platformclientv2/dialercontact.go +++ b/platformclientv2/dialercontact.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dialercontact struct { } +func (u *Dialercontact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontact + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + Data *map[string]interface{} `json:"data,omitempty"` + + CallRecords *map[string]Callrecord `json:"callRecords,omitempty"` + + Callable *bool `json:"callable,omitempty"` + + PhoneNumberStatus *map[string]Phonenumberstatus `json:"phoneNumberStatus,omitempty"` + + ContactColumnTimeZones *map[string]Contactcolumntimezone `json:"contactColumnTimeZones,omitempty"` + + ConfigurationOverrides *Configurationoverrides `json:"configurationOverrides,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ContactListId: u.ContactListId, + + Data: u.Data, + + CallRecords: u.CallRecords, + + Callable: u.Callable, + + PhoneNumberStatus: u.PhoneNumberStatus, + + ContactColumnTimeZones: u.ContactColumnTimeZones, + + ConfigurationOverrides: u.ConfigurationOverrides, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactid.go b/platformclientv2/dialercontactid.go index cbe6f5984..49467b89d 100644 --- a/platformclientv2/dialercontactid.go +++ b/platformclientv2/dialercontactid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercontactid struct { } +func (u *Dialercontactid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactid + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactListId: u.ContactListId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistconfigchangecontactlist.go b/platformclientv2/dialercontactlistconfigchangecontactlist.go index 24fcae2eb..948e45994 100644 --- a/platformclientv2/dialercontactlistconfigchangecontactlist.go +++ b/platformclientv2/dialercontactlistconfigchangecontactlist.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,102 @@ type Dialercontactlistconfigchangecontactlist struct { } +func (u *Dialercontactlistconfigchangecontactlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistconfigchangecontactlist + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ColumnNames *[]string `json:"columnNames,omitempty"` + + PhoneColumns *[]Dialercontactlistconfigchangecontactphonenumbercolumn `json:"phoneColumns,omitempty"` + + EmailColumns *[]Dialercontactlistconfigchangeemailcolumn `json:"emailColumns,omitempty"` + + ImportStatus *Dialercontactlistconfigchangeimportstatus `json:"importStatus,omitempty"` + + PreviewModeColumnName *string `json:"previewModeColumnName,omitempty"` + + PreviewModeAcceptedValues *[]string `json:"previewModeAcceptedValues,omitempty"` + + Size *int `json:"size,omitempty"` + + AttemptLimits *Dialercontactlistconfigchangeurireference `json:"attemptLimits,omitempty"` + + AutomaticTimeZoneMapping *bool `json:"automaticTimeZoneMapping,omitempty"` + + ZipCodeColumnName *string `json:"zipCodeColumnName,omitempty"` + + Division *Dialercontactlistconfigchangeurireference `json:"division,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ColumnNames: u.ColumnNames, + + PhoneColumns: u.PhoneColumns, + + EmailColumns: u.EmailColumns, + + ImportStatus: u.ImportStatus, + + PreviewModeColumnName: u.PreviewModeColumnName, + + PreviewModeAcceptedValues: u.PreviewModeAcceptedValues, + + Size: u.Size, + + AttemptLimits: u.AttemptLimits, + + AutomaticTimeZoneMapping: u.AutomaticTimeZoneMapping, + + ZipCodeColumnName: u.ZipCodeColumnName, + + Division: u.Division, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistconfigchangecontactlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistconfigchangecontactphonenumbercolumn.go b/platformclientv2/dialercontactlistconfigchangecontactphonenumbercolumn.go index a46a0327e..74735d302 100644 --- a/platformclientv2/dialercontactlistconfigchangecontactphonenumbercolumn.go +++ b/platformclientv2/dialercontactlistconfigchangecontactphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialercontactlistconfigchangecontactphonenumbercolumn struct { } +func (u *Dialercontactlistconfigchangecontactphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistconfigchangecontactphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + CallableTimeColumn *string `json:"callableTimeColumn,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + CallableTimeColumn: u.CallableTimeColumn, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistconfigchangecontactphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistconfigchangeemailcolumn.go b/platformclientv2/dialercontactlistconfigchangeemailcolumn.go index e0205bfd8..0c0d59861 100644 --- a/platformclientv2/dialercontactlistconfigchangeemailcolumn.go +++ b/platformclientv2/dialercontactlistconfigchangeemailcolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialercontactlistconfigchangeemailcolumn struct { } +func (u *Dialercontactlistconfigchangeemailcolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistconfigchangeemailcolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistconfigchangeemailcolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistconfigchangeimportstatus.go b/platformclientv2/dialercontactlistconfigchangeimportstatus.go index 275445771..b68755eb4 100644 --- a/platformclientv2/dialercontactlistconfigchangeimportstatus.go +++ b/platformclientv2/dialercontactlistconfigchangeimportstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dialercontactlistconfigchangeimportstatus struct { } +func (u *Dialercontactlistconfigchangeimportstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistconfigchangeimportstatus + + + + return json.Marshal(&struct { + ImportState *string `json:"importState,omitempty"` + + TotalRecords *int `json:"totalRecords,omitempty"` + + CompletedRecords *int `json:"completedRecords,omitempty"` + + PercentageComplete *int `json:"percentageComplete,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ImportState: u.ImportState, + + TotalRecords: u.TotalRecords, + + CompletedRecords: u.CompletedRecords, + + PercentageComplete: u.PercentageComplete, + + FailureReason: u.FailureReason, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistconfigchangeimportstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistconfigchangeurireference.go b/platformclientv2/dialercontactlistconfigchangeurireference.go index 802bf1342..966c1dfff 100644 --- a/platformclientv2/dialercontactlistconfigchangeurireference.go +++ b/platformclientv2/dialercontactlistconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercontactlistconfigchangeurireference struct { } +func (u *Dialercontactlistconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistfilterconfigchangecontactlistfilter.go b/platformclientv2/dialercontactlistfilterconfigchangecontactlistfilter.go index 3136c0ae3..8336e115f 100644 --- a/platformclientv2/dialercontactlistfilterconfigchangecontactlistfilter.go +++ b/platformclientv2/dialercontactlistfilterconfigchangecontactlistfilter.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Dialercontactlistfilterconfigchangecontactlistfilter struct { } +func (u *Dialercontactlistfilterconfigchangecontactlistfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistfilterconfigchangecontactlistfilter + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ContactList *Dialercontactlistfilterconfigchangeurireference `json:"contactList,omitempty"` + + ContactListColumns *[]string `json:"contactListColumns,omitempty"` + + Clauses *[]Dialercontactlistfilterconfigchangefilterclause `json:"clauses,omitempty"` + + FilterType *string `json:"filterType,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ContactList: u.ContactList, + + ContactListColumns: u.ContactListColumns, + + Clauses: u.Clauses, + + FilterType: u.FilterType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistfilterconfigchangecontactlistfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistfilterconfigchangefilterclause.go b/platformclientv2/dialercontactlistfilterconfigchangefilterclause.go index da2fb3d52..eba205364 100644 --- a/platformclientv2/dialercontactlistfilterconfigchangefilterclause.go +++ b/platformclientv2/dialercontactlistfilterconfigchangefilterclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialercontactlistfilterconfigchangefilterclause struct { } +func (u *Dialercontactlistfilterconfigchangefilterclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistfilterconfigchangefilterclause + + + + return json.Marshal(&struct { + FilterType *string `json:"filterType,omitempty"` + + Predicates *[]Dialercontactlistfilterconfigchangefilterpredicate `json:"predicates,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + FilterType: u.FilterType, + + Predicates: u.Predicates, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistfilterconfigchangefilterclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistfilterconfigchangefilterpredicate.go b/platformclientv2/dialercontactlistfilterconfigchangefilterpredicate.go index 9fcc9b10d..c6ad5dfbb 100644 --- a/platformclientv2/dialercontactlistfilterconfigchangefilterpredicate.go +++ b/platformclientv2/dialercontactlistfilterconfigchangefilterpredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Dialercontactlistfilterconfigchangefilterpredicate struct { } +func (u *Dialercontactlistfilterconfigchangefilterpredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistfilterconfigchangefilterpredicate + + + + return json.Marshal(&struct { + Column *string `json:"column,omitempty"` + + ColumnType *string `json:"columnType,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Dialercontactlistfilterconfigchangerange `json:"range,omitempty"` + + Inverted *bool `json:"inverted,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Column: u.Column, + + ColumnType: u.ColumnType, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + + Inverted: u.Inverted, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistfilterconfigchangefilterpredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistfilterconfigchangerange.go b/platformclientv2/dialercontactlistfilterconfigchangerange.go index a1c83ae29..b3838f931 100644 --- a/platformclientv2/dialercontactlistfilterconfigchangerange.go +++ b/platformclientv2/dialercontactlistfilterconfigchangerange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dialercontactlistfilterconfigchangerange struct { } +func (u *Dialercontactlistfilterconfigchangerange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistfilterconfigchangerange + + + + return json.Marshal(&struct { + Min *string `json:"min,omitempty"` + + Max *string `json:"max,omitempty"` + + MinInclusive *bool `json:"minInclusive,omitempty"` + + MaxInclusive *bool `json:"maxInclusive,omitempty"` + + InSet *[]string `json:"inSet,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Min: u.Min, + + Max: u.Max, + + MinInclusive: u.MinInclusive, + + MaxInclusive: u.MaxInclusive, + + InSet: u.InSet, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistfilterconfigchangerange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialercontactlistfilterconfigchangeurireference.go b/platformclientv2/dialercontactlistfilterconfigchangeurireference.go index 5bf021918..f473777f1 100644 --- a/platformclientv2/dialercontactlistfilterconfigchangeurireference.go +++ b/platformclientv2/dialercontactlistfilterconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialercontactlistfilterconfigchangeurireference struct { } +func (u *Dialercontactlistfilterconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialercontactlistfilterconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialercontactlistfilterconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerdnclistconfigchangednclist.go b/platformclientv2/dialerdnclistconfigchangednclist.go index 574bc20db..5c865a872 100644 --- a/platformclientv2/dialerdnclistconfigchangednclist.go +++ b/platformclientv2/dialerdnclistconfigchangednclist.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Dialerdnclistconfigchangednclist struct { } +func (u *Dialerdnclistconfigchangednclist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerdnclistconfigchangednclist + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ImportStatus *Dialerdnclistconfigchangeimportstatus `json:"importStatus,omitempty"` + + Size *int `json:"size,omitempty"` + + DncSourceType *string `json:"dncSourceType,omitempty"` + + LoginId *string `json:"loginId,omitempty"` + + DncCodes *[]string `json:"dncCodes,omitempty"` + + LicenseId *string `json:"licenseId,omitempty"` + + ContactMethod *string `json:"contactMethod,omitempty"` + + Division *Dialerdnclistconfigchangeurireference `json:"division,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ImportStatus: u.ImportStatus, + + Size: u.Size, + + DncSourceType: u.DncSourceType, + + LoginId: u.LoginId, + + DncCodes: u.DncCodes, + + LicenseId: u.LicenseId, + + ContactMethod: u.ContactMethod, + + Division: u.Division, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerdnclistconfigchangednclist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerdnclistconfigchangeimportstatus.go b/platformclientv2/dialerdnclistconfigchangeimportstatus.go index dd6e7f696..94ca212ee 100644 --- a/platformclientv2/dialerdnclistconfigchangeimportstatus.go +++ b/platformclientv2/dialerdnclistconfigchangeimportstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dialerdnclistconfigchangeimportstatus struct { } +func (u *Dialerdnclistconfigchangeimportstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerdnclistconfigchangeimportstatus + + + + return json.Marshal(&struct { + ImportState *string `json:"importState,omitempty"` + + TotalRecords *int `json:"totalRecords,omitempty"` + + CompletedRecords *int `json:"completedRecords,omitempty"` + + PercentageComplete *int `json:"percentageComplete,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ImportState: u.ImportState, + + TotalRecords: u.TotalRecords, + + CompletedRecords: u.CompletedRecords, + + PercentageComplete: u.PercentageComplete, + + FailureReason: u.FailureReason, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerdnclistconfigchangeimportstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerdnclistconfigchangeurireference.go b/platformclientv2/dialerdnclistconfigchangeurireference.go index 840c285da..ee4913d15 100644 --- a/platformclientv2/dialerdnclistconfigchangeurireference.go +++ b/platformclientv2/dialerdnclistconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialerdnclistconfigchangeurireference struct { } +func (u *Dialerdnclistconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerdnclistconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerdnclistconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerevententitylisting.go b/platformclientv2/dialerevententitylisting.go index 2d4f08d09..5409874e6 100644 --- a/platformclientv2/dialerevententitylisting.go +++ b/platformclientv2/dialerevententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dialerevententitylisting struct { } +func (u *Dialerevententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerevententitylisting + + + + return json.Marshal(&struct { + Entities *[]Eventlog `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerevententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslot.go b/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslot.go index 1ab5739ef..dbb77d60a 100644 --- a/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslot.go +++ b/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialeroutboundsettingsconfigchangeatzmtimeslot struct { } +func (u *Dialeroutboundsettingsconfigchangeatzmtimeslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialeroutboundsettingsconfigchangeatzmtimeslot + + + + return json.Marshal(&struct { + EarliestCallableTime *string `json:"earliestCallableTime,omitempty"` + + LatestCallableTime *string `json:"latestCallableTime,omitempty"` + *Alias + }{ + EarliestCallableTime: u.EarliestCallableTime, + + LatestCallableTime: u.LatestCallableTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialeroutboundsettingsconfigchangeatzmtimeslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone.go b/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone.go index e6f8d99a5..d911b8944 100644 --- a/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone.go +++ b/platformclientv2/dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone struct { } +func (u *Dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone + + + + return json.Marshal(&struct { + EarliestCallableTime *string `json:"earliestCallableTime,omitempty"` + + LatestCallableTime *string `json:"latestCallableTime,omitempty"` + + TimeZoneId *string `json:"timeZoneId,omitempty"` + *Alias + }{ + EarliestCallableTime: u.EarliestCallableTime, + + LatestCallableTime: u.LatestCallableTime, + + TimeZoneId: u.TimeZoneId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings.go b/platformclientv2/dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings.go index be0bb4f8e..5ee8533a5 100644 --- a/platformclientv2/dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings.go +++ b/platformclientv2/dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings struct { } +func (u *Dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings + + + + return json.Marshal(&struct { + CallableWindows *[]Dialeroutboundsettingsconfigchangecallablewindow `json:"callableWindows,omitempty"` + *Alias + }{ + CallableWindows: u.CallableWindows, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialeroutboundsettingsconfigchangecallablewindow.go b/platformclientv2/dialeroutboundsettingsconfigchangecallablewindow.go index fca7d3c5d..587e67c70 100644 --- a/platformclientv2/dialeroutboundsettingsconfigchangecallablewindow.go +++ b/platformclientv2/dialeroutboundsettingsconfigchangecallablewindow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialeroutboundsettingsconfigchangecallablewindow struct { } +func (u *Dialeroutboundsettingsconfigchangecallablewindow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialeroutboundsettingsconfigchangecallablewindow + + + + return json.Marshal(&struct { + Mapped *Dialeroutboundsettingsconfigchangeatzmtimeslot `json:"mapped,omitempty"` + + Unmapped *Dialeroutboundsettingsconfigchangeatzmtimeslotwithtimezone `json:"unmapped,omitempty"` + *Alias + }{ + Mapped: u.Mapped, + + Unmapped: u.Unmapped, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialeroutboundsettingsconfigchangecallablewindow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialeroutboundsettingsconfigchangeoutboundsettings.go b/platformclientv2/dialeroutboundsettingsconfigchangeoutboundsettings.go index e46c8a991..2d051d879 100644 --- a/platformclientv2/dialeroutboundsettingsconfigchangeoutboundsettings.go +++ b/platformclientv2/dialeroutboundsettingsconfigchangeoutboundsettings.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Dialeroutboundsettingsconfigchangeoutboundsettings struct { } +func (u *Dialeroutboundsettingsconfigchangeoutboundsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialeroutboundsettingsconfigchangeoutboundsettings + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + MaxCallsPerAgent *int `json:"maxCallsPerAgent,omitempty"` + + MaxLineUtilization *float32 `json:"maxLineUtilization,omitempty"` + + AbandonSeconds *float32 `json:"abandonSeconds,omitempty"` + + ComplianceAbandonRateDenominator *string `json:"complianceAbandonRateDenominator,omitempty"` + + AutomaticTimeZoneMapping *Dialeroutboundsettingsconfigchangeautomatictimezonemappingsettings `json:"automaticTimeZoneMapping,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + MaxCallsPerAgent: u.MaxCallsPerAgent, + + MaxLineUtilization: u.MaxLineUtilization, + + AbandonSeconds: u.AbandonSeconds, + + ComplianceAbandonRateDenominator: u.ComplianceAbandonRateDenominator, + + AutomaticTimeZoneMapping: u.AutomaticTimeZoneMapping, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialeroutboundsettingsconfigchangeoutboundsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerpreview.go b/platformclientv2/dialerpreview.go index e8431cb09..7f63add9c 100644 --- a/platformclientv2/dialerpreview.go +++ b/platformclientv2/dialerpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Dialerpreview struct { } +func (u *Dialerpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerpreview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + CampaignId *string `json:"campaignId,omitempty"` + + PhoneNumberColumns *[]Phonenumbercolumn `json:"phoneNumberColumns,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactId: u.ContactId, + + ContactListId: u.ContactListId, + + CampaignId: u.CampaignId, + + PhoneNumberColumns: u.PhoneNumberColumns, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerresponsesetconfigchangereaction.go b/platformclientv2/dialerresponsesetconfigchangereaction.go index 528ff1dbc..e9ae13e8c 100644 --- a/platformclientv2/dialerresponsesetconfigchangereaction.go +++ b/platformclientv2/dialerresponsesetconfigchangereaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Dialerresponsesetconfigchangereaction struct { } +func (u *Dialerresponsesetconfigchangereaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerresponsesetconfigchangereaction + + + + return json.Marshal(&struct { + Data *string `json:"data,omitempty"` + + Name *string `json:"name,omitempty"` + + ReactionType *string `json:"reactionType,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Data: u.Data, + + Name: u.Name, + + ReactionType: u.ReactionType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerresponsesetconfigchangereaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerresponsesetconfigchangeresponseset.go b/platformclientv2/dialerresponsesetconfigchangeresponseset.go index 06a0ed213..cebf1cd84 100644 --- a/platformclientv2/dialerresponsesetconfigchangeresponseset.go +++ b/platformclientv2/dialerresponsesetconfigchangeresponseset.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Dialerresponsesetconfigchangeresponseset struct { } +func (u *Dialerresponsesetconfigchangeresponseset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerresponsesetconfigchangeresponseset + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Responses *map[string]Dialerresponsesetconfigchangereaction `json:"responses,omitempty"` + + BeepDetectionEnabled *bool `json:"beepDetectionEnabled,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Responses: u.Responses, + + BeepDetectionEnabled: u.BeepDetectionEnabled, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerresponsesetconfigchangeresponseset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrule.go b/platformclientv2/dialerrule.go index b4a5159c3..84794b4d9 100644 --- a/platformclientv2/dialerrule.go +++ b/platformclientv2/dialerrule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dialerrule struct { } +func (u *Dialerrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Order *int `json:"order,omitempty"` + + Category *string `json:"category,omitempty"` + + Conditions *[]Condition `json:"conditions,omitempty"` + + Actions *[]Dialeraction `json:"actions,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Order: u.Order, + + Category: u.Category, + + Conditions: u.Conditions, + + Actions: u.Actions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrulesetconfigchangeaction.go b/platformclientv2/dialerrulesetconfigchangeaction.go index 95685baf6..dc869de69 100644 --- a/platformclientv2/dialerrulesetconfigchangeaction.go +++ b/platformclientv2/dialerrulesetconfigchangeaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Dialerrulesetconfigchangeaction struct { } +func (u *Dialerrulesetconfigchangeaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrulesetconfigchangeaction + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + ActionTypeName *string `json:"actionTypeName,omitempty"` + + UpdateOption *string `json:"updateOption,omitempty"` + + Properties *map[string]string `json:"properties,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + VarType: u.VarType, + + ActionTypeName: u.ActionTypeName, + + UpdateOption: u.UpdateOption, + + Properties: u.Properties, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrulesetconfigchangeaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrulesetconfigchangecondition.go b/platformclientv2/dialerrulesetconfigchangecondition.go index ad31037a9..cab7aa790 100644 --- a/platformclientv2/dialerrulesetconfigchangecondition.go +++ b/platformclientv2/dialerrulesetconfigchangecondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -76,6 +77,86 @@ type Dialerrulesetconfigchangecondition struct { } +func (u *Dialerrulesetconfigchangecondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrulesetconfigchangecondition + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Inverted *bool `json:"inverted,omitempty"` + + AttributeName *string `json:"attributeName,omitempty"` + + Value *string `json:"value,omitempty"` + + ValueType *string `json:"valueType,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Codes *[]string `json:"codes,omitempty"` + + PropertyType *string `json:"propertyType,omitempty"` + + Property *string `json:"property,omitempty"` + + DataNotFoundResolution *bool `json:"dataNotFoundResolution,omitempty"` + + ContactIdField *string `json:"contactIdField,omitempty"` + + CallAnalysisResultField *string `json:"callAnalysisResultField,omitempty"` + + AgentWrapupField *string `json:"agentWrapupField,omitempty"` + + ContactColumnToDataActionFieldMappings *[]Dialerrulesetconfigchangecontactcolumntodataactionfieldmapping `json:"contactColumnToDataActionFieldMappings,omitempty"` + + Predicates *[]Dialerrulesetconfigchangedataactionconditionpredicate `json:"predicates,omitempty"` + + DataAction *Dialerrulesetconfigchangeurireference `json:"dataAction,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Inverted: u.Inverted, + + AttributeName: u.AttributeName, + + Value: u.Value, + + ValueType: u.ValueType, + + Operator: u.Operator, + + Codes: u.Codes, + + PropertyType: u.PropertyType, + + Property: u.Property, + + DataNotFoundResolution: u.DataNotFoundResolution, + + ContactIdField: u.ContactIdField, + + CallAnalysisResultField: u.CallAnalysisResultField, + + AgentWrapupField: u.AgentWrapupField, + + ContactColumnToDataActionFieldMappings: u.ContactColumnToDataActionFieldMappings, + + Predicates: u.Predicates, + + DataAction: u.DataAction, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrulesetconfigchangecondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrulesetconfigchangecontactcolumntodataactionfieldmapping.go b/platformclientv2/dialerrulesetconfigchangecontactcolumntodataactionfieldmapping.go index 32f3d4ae9..e688f5212 100644 --- a/platformclientv2/dialerrulesetconfigchangecontactcolumntodataactionfieldmapping.go +++ b/platformclientv2/dialerrulesetconfigchangecontactcolumntodataactionfieldmapping.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialerrulesetconfigchangecontactcolumntodataactionfieldmapping struct { } +func (u *Dialerrulesetconfigchangecontactcolumntodataactionfieldmapping) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrulesetconfigchangecontactcolumntodataactionfieldmapping + + + + return json.Marshal(&struct { + ContactColumnName *string `json:"contactColumnName,omitempty"` + + DataActionField *string `json:"dataActionField,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ContactColumnName: u.ContactColumnName, + + DataActionField: u.DataActionField, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrulesetconfigchangecontactcolumntodataactionfieldmapping) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrulesetconfigchangedataactionconditionpredicate.go b/platformclientv2/dialerrulesetconfigchangedataactionconditionpredicate.go index bf5efaf8d..75d61bfee 100644 --- a/platformclientv2/dialerrulesetconfigchangedataactionconditionpredicate.go +++ b/platformclientv2/dialerrulesetconfigchangedataactionconditionpredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dialerrulesetconfigchangedataactionconditionpredicate struct { } +func (u *Dialerrulesetconfigchangedataactionconditionpredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrulesetconfigchangedataactionconditionpredicate + + + + return json.Marshal(&struct { + OutputField *string `json:"outputField,omitempty"` + + OutputOperator *string `json:"outputOperator,omitempty"` + + ComparisonValue *string `json:"comparisonValue,omitempty"` + + OutputFieldMissingResolution *bool `json:"outputFieldMissingResolution,omitempty"` + + Inverted *bool `json:"inverted,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + OutputField: u.OutputField, + + OutputOperator: u.OutputOperator, + + ComparisonValue: u.ComparisonValue, + + OutputFieldMissingResolution: u.OutputFieldMissingResolution, + + Inverted: u.Inverted, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrulesetconfigchangedataactionconditionpredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrulesetconfigchangerule.go b/platformclientv2/dialerrulesetconfigchangerule.go index ab1ee1c1d..08b293164 100644 --- a/platformclientv2/dialerrulesetconfigchangerule.go +++ b/platformclientv2/dialerrulesetconfigchangerule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Dialerrulesetconfigchangerule struct { } +func (u *Dialerrulesetconfigchangerule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrulesetconfigchangerule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Order *int `json:"order,omitempty"` + + Category *string `json:"category,omitempty"` + + Actions *[]Dialerrulesetconfigchangeaction `json:"actions,omitempty"` + + Conditions *[]Dialerrulesetconfigchangecondition `json:"conditions,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Order: u.Order, + + Category: u.Category, + + Actions: u.Actions, + + Conditions: u.Conditions, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrulesetconfigchangerule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrulesetconfigchangeruleset.go b/platformclientv2/dialerrulesetconfigchangeruleset.go index 68798ff1b..ae7e5f70a 100644 --- a/platformclientv2/dialerrulesetconfigchangeruleset.go +++ b/platformclientv2/dialerrulesetconfigchangeruleset.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Dialerrulesetconfigchangeruleset struct { } +func (u *Dialerrulesetconfigchangeruleset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrulesetconfigchangeruleset + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ContactList *Dialerrulesetconfigchangeurireference `json:"contactList,omitempty"` + + Queue *Dialerrulesetconfigchangeurireference `json:"queue,omitempty"` + + Rules *[]Dialerrulesetconfigchangerule `json:"rules,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ContactList: u.ContactList, + + Queue: u.Queue, + + Rules: u.Rules, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrulesetconfigchangeruleset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerrulesetconfigchangeurireference.go b/platformclientv2/dialerrulesetconfigchangeurireference.go index 6d31c2a4d..e155a5a3f 100644 --- a/platformclientv2/dialerrulesetconfigchangeurireference.go +++ b/platformclientv2/dialerrulesetconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialerrulesetconfigchangeurireference struct { } +func (u *Dialerrulesetconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerrulesetconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerrulesetconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialersequenceconfigchangecampaignsequence.go b/platformclientv2/dialersequenceconfigchangecampaignsequence.go index 7f76e8744..aa7ad6cb9 100644 --- a/platformclientv2/dialersequenceconfigchangecampaignsequence.go +++ b/platformclientv2/dialersequenceconfigchangecampaignsequence.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Dialersequenceconfigchangecampaignsequence struct { } +func (u *Dialersequenceconfigchangecampaignsequence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialersequenceconfigchangecampaignsequence + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Campaigns *[]Dialersequenceconfigchangeurireference `json:"campaigns,omitempty"` + + CurrentCampaign *int `json:"currentCampaign,omitempty"` + + Status *string `json:"status,omitempty"` + + StopMessage *string `json:"stopMessage,omitempty"` + + Repeat *bool `json:"repeat,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Campaigns: u.Campaigns, + + CurrentCampaign: u.CurrentCampaign, + + Status: u.Status, + + StopMessage: u.StopMessage, + + Repeat: u.Repeat, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialersequenceconfigchangecampaignsequence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialersequenceconfigchangeurireference.go b/platformclientv2/dialersequenceconfigchangeurireference.go index af9a0e3ed..037547e7a 100644 --- a/platformclientv2/dialersequenceconfigchangeurireference.go +++ b/platformclientv2/dialersequenceconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialersequenceconfigchangeurireference struct { } +func (u *Dialersequenceconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialersequenceconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialersequenceconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialersequencescheduleconfigchangescheduleinterval.go b/platformclientv2/dialersequencescheduleconfigchangescheduleinterval.go index efa5185e7..7c8e4ccf4 100644 --- a/platformclientv2/dialersequencescheduleconfigchangescheduleinterval.go +++ b/platformclientv2/dialersequencescheduleconfigchangescheduleinterval.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dialersequencescheduleconfigchangescheduleinterval struct { } +func (u *Dialersequencescheduleconfigchangescheduleinterval) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialersequencescheduleconfigchangescheduleinterval + + + + return json.Marshal(&struct { + Start *string `json:"start,omitempty"` + + End *string `json:"end,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Start: u.Start, + + End: u.End, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialersequencescheduleconfigchangescheduleinterval) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialersequencescheduleconfigchangesequenceschedule.go b/platformclientv2/dialersequencescheduleconfigchangesequenceschedule.go index db50a04a1..5e198a000 100644 --- a/platformclientv2/dialersequencescheduleconfigchangesequenceschedule.go +++ b/platformclientv2/dialersequencescheduleconfigchangesequenceschedule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Dialersequencescheduleconfigchangesequenceschedule struct { } +func (u *Dialersequencescheduleconfigchangesequenceschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialersequencescheduleconfigchangesequenceschedule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Intervals *[]Dialersequencescheduleconfigchangescheduleinterval `json:"intervals,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + Sequence *Dialersequencescheduleconfigchangeurireference `json:"sequence,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Intervals: u.Intervals, + + TimeZone: u.TimeZone, + + Sequence: u.Sequence, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialersequencescheduleconfigchangesequenceschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialersequencescheduleconfigchangeurireference.go b/platformclientv2/dialersequencescheduleconfigchangeurireference.go index 1c38842ca..66035e6f4 100644 --- a/platformclientv2/dialersequencescheduleconfigchangeurireference.go +++ b/platformclientv2/dialersequencescheduleconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialersequencescheduleconfigchangeurireference struct { } +func (u *Dialersequencescheduleconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialersequencescheduleconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialersequencescheduleconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialerwrapupcodemappingconfigchangewrapupcodemapping.go b/platformclientv2/dialerwrapupcodemappingconfigchangewrapupcodemapping.go index 66609306a..6790c1cc4 100644 --- a/platformclientv2/dialerwrapupcodemappingconfigchangewrapupcodemapping.go +++ b/platformclientv2/dialerwrapupcodemappingconfigchangewrapupcodemapping.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Dialerwrapupcodemappingconfigchangewrapupcodemapping struct { } +func (u *Dialerwrapupcodemappingconfigchangewrapupcodemapping) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialerwrapupcodemappingconfigchangewrapupcodemapping + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + DefaultSet *[]string `json:"defaultSet,omitempty"` + + Mapping *map[string][]string `json:"mapping,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + DefaultSet: u.DefaultSet, + + Mapping: u.Mapping, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialerwrapupcodemappingconfigchangewrapupcodemapping) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialogflowagent.go b/platformclientv2/dialogflowagent.go index 49c5fb3f6..46852f6ef 100644 --- a/platformclientv2/dialogflowagent.go +++ b/platformclientv2/dialogflowagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Dialogflowagent struct { } +func (u *Dialogflowagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialogflowagent + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Project *Dialogflowproject `json:"project,omitempty"` + + Languages *[]string `json:"languages,omitempty"` + + Intents *[]Dialogflowintent `json:"intents,omitempty"` + + Environments *[]string `json:"environments,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Project: u.Project, + + Languages: u.Languages, + + Intents: u.Intents, + + Environments: u.Environments, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialogflowagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialogflowagentsummary.go b/platformclientv2/dialogflowagentsummary.go index 4d5596a49..1d9683b84 100644 --- a/platformclientv2/dialogflowagentsummary.go +++ b/platformclientv2/dialogflowagentsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Dialogflowagentsummary struct { } +func (u *Dialogflowagentsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialogflowagentsummary + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Project *Dialogflowproject `json:"project,omitempty"` + + Description *string `json:"description,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Project: u.Project, + + Description: u.Description, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialogflowagentsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialogflowagentsummaryentitylisting.go b/platformclientv2/dialogflowagentsummaryentitylisting.go index 19995f977..f3d4c9b9b 100644 --- a/platformclientv2/dialogflowagentsummaryentitylisting.go +++ b/platformclientv2/dialogflowagentsummaryentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dialogflowagentsummaryentitylisting struct { } +func (u *Dialogflowagentsummaryentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialogflowagentsummaryentitylisting + + + + return json.Marshal(&struct { + Entities *[]Dialogflowagentsummary `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialogflowagentsummaryentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialogflowintent.go b/platformclientv2/dialogflowintent.go index 5e929edad..295ce50b7 100644 --- a/platformclientv2/dialogflowintent.go +++ b/platformclientv2/dialogflowintent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialogflowintent struct { } +func (u *Dialogflowintent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialogflowintent + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Parameters *map[string]Dialogflowparameter `json:"parameters,omitempty"` + *Alias + }{ + Name: u.Name, + + Parameters: u.Parameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialogflowintent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialogflowparameter.go b/platformclientv2/dialogflowparameter.go index 4f4dfc831..5fe547c87 100644 --- a/platformclientv2/dialogflowparameter.go +++ b/platformclientv2/dialogflowparameter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialogflowparameter struct { } +func (u *Dialogflowparameter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialogflowparameter + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialogflowparameter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dialogflowproject.go b/platformclientv2/dialogflowproject.go index 8e775f666..998183fd6 100644 --- a/platformclientv2/dialogflowproject.go +++ b/platformclientv2/dialogflowproject.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Dialogflowproject struct { } +func (u *Dialogflowproject) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dialogflowproject + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dialogflowproject) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/did.go b/platformclientv2/did.go index 8ea109f12..d91d8449c 100644 --- a/platformclientv2/did.go +++ b/platformclientv2/did.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Did struct { } +func (u *Did) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Did + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + DidPool *Domainentityref `json:"didPool,omitempty"` + + Owner *Domainentityref `json:"owner,omitempty"` + + OwnerType *string `json:"ownerType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + PhoneNumber: u.PhoneNumber, + + DidPool: u.DidPool, + + Owner: u.Owner, + + OwnerType: u.OwnerType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Did) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/didentitylisting.go b/platformclientv2/didentitylisting.go index dfe71028d..2c114873e 100644 --- a/platformclientv2/didentitylisting.go +++ b/platformclientv2/didentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Didentitylisting struct { } +func (u *Didentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Didentitylisting + + + + return json.Marshal(&struct { + Entities *[]Did `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Didentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/didnumber.go b/platformclientv2/didnumber.go index bd4cce717..415b06c36 100644 --- a/platformclientv2/didnumber.go +++ b/platformclientv2/didnumber.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Didnumber struct { } +func (u *Didnumber) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Didnumber + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Number *string `json:"number,omitempty"` + + Assigned *bool `json:"assigned,omitempty"` + + DidPool *Addressableentityref `json:"didPool,omitempty"` + + Owner *Domainentityref `json:"owner,omitempty"` + + OwnerType *string `json:"ownerType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Number: u.Number, + + Assigned: u.Assigned, + + DidPool: u.DidPool, + + Owner: u.Owner, + + OwnerType: u.OwnerType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Didnumber) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/didnumberentitylisting.go b/platformclientv2/didnumberentitylisting.go index 4b84c7432..7b7af1e15 100644 --- a/platformclientv2/didnumberentitylisting.go +++ b/platformclientv2/didnumberentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Didnumberentitylisting struct { } +func (u *Didnumberentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Didnumberentitylisting + + + + return json.Marshal(&struct { + Entities *[]Didnumber `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Didnumberentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/didpool.go b/platformclientv2/didpool.go index 3e7a5e81a..1e4df1412 100644 --- a/platformclientv2/didpool.go +++ b/platformclientv2/didpool.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Didpool struct { } +func (u *Didpool) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Didpool + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + StartPhoneNumber *string `json:"startPhoneNumber,omitempty"` + + EndPhoneNumber *string `json:"endPhoneNumber,omitempty"` + + Comments *string `json:"comments,omitempty"` + + Provider *string `json:"provider,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + StartPhoneNumber: u.StartPhoneNumber, + + EndPhoneNumber: u.EndPhoneNumber, + + Comments: u.Comments, + + Provider: u.Provider, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Didpool) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/didpoolentitylisting.go b/platformclientv2/didpoolentitylisting.go index a089068dd..3aa29e1b3 100644 --- a/platformclientv2/didpoolentitylisting.go +++ b/platformclientv2/didpoolentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Didpoolentitylisting struct { } +func (u *Didpoolentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Didpoolentitylisting + + + + return json.Marshal(&struct { + Entities *[]Didpool `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Didpoolentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/digitlength.go b/platformclientv2/digitlength.go index d6cb78546..ded9a3e5d 100644 --- a/platformclientv2/digitlength.go +++ b/platformclientv2/digitlength.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Digitlength struct { } +func (u *Digitlength) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Digitlength + + + + return json.Marshal(&struct { + Start *string `json:"start,omitempty"` + + End *string `json:"end,omitempty"` + *Alias + }{ + Start: u.Start, + + End: u.End, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Digitlength) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/digits.go b/platformclientv2/digits.go index b8bfd6e3b..6cdfb2b25 100644 --- a/platformclientv2/digits.go +++ b/platformclientv2/digits.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Digits struct { } +func (u *Digits) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Digits + + + + return json.Marshal(&struct { + Digits *string `json:"digits,omitempty"` + *Alias + }{ + Digits: u.Digits, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Digits) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/directoryuserdeviceslisting.go b/platformclientv2/directoryuserdeviceslisting.go index 1e563526b..ffe4c4ff3 100644 --- a/platformclientv2/directoryuserdeviceslisting.go +++ b/platformclientv2/directoryuserdeviceslisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Directoryuserdeviceslisting struct { } +func (u *Directoryuserdeviceslisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Directoryuserdeviceslisting + + + + return json.Marshal(&struct { + Entities *[]Userdevice `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Directoryuserdeviceslisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/disallowedentitylearningassignmentitem.go b/platformclientv2/disallowedentitylearningassignmentitem.go index 1061ae518..d828e06b5 100644 --- a/platformclientv2/disallowedentitylearningassignmentitem.go +++ b/platformclientv2/disallowedentitylearningassignmentitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Disallowedentitylearningassignmentitem struct { } +func (u *Disallowedentitylearningassignmentitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Disallowedentitylearningassignmentitem + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + Entity *Learningassignmentitem `json:"entity,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + Entity: u.Entity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Disallowedentitylearningassignmentitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/disallowedentitylearningassignmentreference.go b/platformclientv2/disallowedentitylearningassignmentreference.go index 5ccae4649..e65bade43 100644 --- a/platformclientv2/disallowedentitylearningassignmentreference.go +++ b/platformclientv2/disallowedentitylearningassignmentreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Disallowedentitylearningassignmentreference struct { } +func (u *Disallowedentitylearningassignmentreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Disallowedentitylearningassignmentreference + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + Entity *Learningassignmentreference `json:"entity,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + Entity: u.Entity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Disallowedentitylearningassignmentreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/disconnectreason.go b/platformclientv2/disconnectreason.go index 033a0a014..a97dc8b09 100644 --- a/platformclientv2/disconnectreason.go +++ b/platformclientv2/disconnectreason.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Disconnectreason struct { } +func (u *Disconnectreason) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Disconnectreason + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Code *int `json:"code,omitempty"` + + Phrase *string `json:"phrase,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Code: u.Code, + + Phrase: u.Phrase, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Disconnectreason) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/division.go b/platformclientv2/division.go index 526f506bd..0911dd0a9 100644 --- a/platformclientv2/division.go +++ b/platformclientv2/division.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Division struct { } +func (u *Division) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Division + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Division) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/divisionreference.go b/platformclientv2/divisionreference.go index ba110cebe..49456a558 100644 --- a/platformclientv2/divisionreference.go +++ b/platformclientv2/divisionreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Divisionreference struct { } +func (u *Divisionreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Divisionreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Divisionreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/divspermittedentitylisting.go b/platformclientv2/divspermittedentitylisting.go index 9a6717484..51abf6a73 100644 --- a/platformclientv2/divspermittedentitylisting.go +++ b/platformclientv2/divspermittedentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Divspermittedentitylisting struct { } +func (u *Divspermittedentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Divspermittedentitylisting + + + + return json.Marshal(&struct { + Entities *[]Authzdivision `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + AllDivsPermitted *bool `json:"allDivsPermitted,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + AllDivsPermitted: u.AllDivsPermitted, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Divspermittedentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dnclist.go b/platformclientv2/dnclist.go index 9b10c9445..1ad9f93f3 100644 --- a/platformclientv2/dnclist.go +++ b/platformclientv2/dnclist.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Dnclist struct { } +func (u *Dnclist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dnclist + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ImportStatus *Importstatus `json:"importStatus,omitempty"` + + Size *int `json:"size,omitempty"` + + DncSourceType *string `json:"dncSourceType,omitempty"` + + LoginId *string `json:"loginId,omitempty"` + + DncCodes *[]string `json:"dncCodes,omitempty"` + + LicenseId *string `json:"licenseId,omitempty"` + + Division *Domainentityref `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ImportStatus: u.ImportStatus, + + Size: u.Size, + + DncSourceType: u.DncSourceType, + + LoginId: u.LoginId, + + DncCodes: u.DncCodes, + + LicenseId: u.LicenseId, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dnclist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dnclistcreate.go b/platformclientv2/dnclistcreate.go index be2171832..5258c5e68 100644 --- a/platformclientv2/dnclistcreate.go +++ b/platformclientv2/dnclistcreate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Dnclistcreate struct { } +func (u *Dnclistcreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dnclistcreate + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ImportStatus *Importstatus `json:"importStatus,omitempty"` + + Size *int `json:"size,omitempty"` + + DncSourceType *string `json:"dncSourceType,omitempty"` + + LoginId *string `json:"loginId,omitempty"` + + DncCodes *[]string `json:"dncCodes,omitempty"` + + LicenseId *string `json:"licenseId,omitempty"` + + Division *Domainentityref `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ImportStatus: u.ImportStatus, + + Size: u.Size, + + DncSourceType: u.DncSourceType, + + LoginId: u.LoginId, + + DncCodes: u.DncCodes, + + LicenseId: u.LicenseId, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dnclistcreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dnclistdivisionview.go b/platformclientv2/dnclistdivisionview.go index d06e93c29..c8cbe0537 100644 --- a/platformclientv2/dnclistdivisionview.go +++ b/platformclientv2/dnclistdivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dnclistdivisionview struct { } +func (u *Dnclistdivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dnclistdivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + ImportStatus *Importstatus `json:"importStatus,omitempty"` + + Size *int `json:"size,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + ImportStatus: u.ImportStatus, + + Size: u.Size, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dnclistdivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dnclistdivisionviewlisting.go b/platformclientv2/dnclistdivisionviewlisting.go index 1a94e860e..642879e6b 100644 --- a/platformclientv2/dnclistdivisionviewlisting.go +++ b/platformclientv2/dnclistdivisionviewlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dnclistdivisionviewlisting struct { } +func (u *Dnclistdivisionviewlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dnclistdivisionviewlisting + + + + return json.Marshal(&struct { + Entities *[]Dnclistdivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dnclistdivisionviewlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dnclistdownloadreadyexporturi.go b/platformclientv2/dnclistdownloadreadyexporturi.go index 6875cf9ac..d3e87a9ac 100644 --- a/platformclientv2/dnclistdownloadreadyexporturi.go +++ b/platformclientv2/dnclistdownloadreadyexporturi.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Dnclistdownloadreadyexporturi struct { } +func (u *Dnclistdownloadreadyexporturi) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dnclistdownloadreadyexporturi + + + + return json.Marshal(&struct { + Uri *string `json:"uri,omitempty"` + + ExportTimestamp *string `json:"exportTimestamp,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Uri: u.Uri, + + ExportTimestamp: u.ExportTimestamp, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dnclistdownloadreadyexporturi) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dnclistentitylisting.go b/platformclientv2/dnclistentitylisting.go index 9d6d7f1b3..13e5bd993 100644 --- a/platformclientv2/dnclistentitylisting.go +++ b/platformclientv2/dnclistentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Dnclistentitylisting struct { } +func (u *Dnclistentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dnclistentitylisting + + + + return json.Marshal(&struct { + Entities *[]Dnclist `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dnclistentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/dnclistimportstatusimportstatus.go b/platformclientv2/dnclistimportstatusimportstatus.go index a9e2fbcd5..1f3a2a85c 100644 --- a/platformclientv2/dnclistimportstatusimportstatus.go +++ b/platformclientv2/dnclistimportstatusimportstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Dnclistimportstatusimportstatus struct { } +func (u *Dnclistimportstatusimportstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Dnclistimportstatusimportstatus + + + + return json.Marshal(&struct { + ImportState *string `json:"importState,omitempty"` + + TotalRecords *int `json:"totalRecords,omitempty"` + + CompletedRecords *int `json:"completedRecords,omitempty"` + + PercentageComplete *int `json:"percentageComplete,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ImportState: u.ImportState, + + TotalRecords: u.TotalRecords, + + CompletedRecords: u.CompletedRecords, + + PercentageComplete: u.PercentageComplete, + + FailureReason: u.FailureReason, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Dnclistimportstatusimportstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/document.go b/platformclientv2/document.go index d3d352baf..f008b04f4 100644 --- a/platformclientv2/document.go +++ b/platformclientv2/document.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -133,6 +134,166 @@ type Document struct { } +func (u *Document) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Document + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateUploaded := new(string) + if u.DateUploaded != nil { + + *DateUploaded = timeutil.Strftime(u.DateUploaded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateUploaded = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ChangeNumber *int `json:"changeNumber,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + DateUploaded *string `json:"dateUploaded,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + UploadedBy *Domainentityref `json:"uploadedBy,omitempty"` + + SharingUri *string `json:"sharingUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + SystemType *string `json:"systemType,omitempty"` + + Filename *string `json:"filename,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + Read *bool `json:"read,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + ReceiverAddress *string `json:"receiverAddress,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + TagValues *[]Tagvalue `json:"tagValues,omitempty"` + + Attributes *[]Documentattribute `json:"attributes,omitempty"` + + Thumbnails *[]Documentthumbnail `json:"thumbnails,omitempty"` + + UploadStatus *Domainentityref `json:"uploadStatus,omitempty"` + + UploadDestinationUri *string `json:"uploadDestinationUri,omitempty"` + + UploadMethod *string `json:"uploadMethod,omitempty"` + + LockInfo *Lockinfo `json:"lockInfo,omitempty"` + + Acl *[]string `json:"acl,omitempty"` + + SharingStatus *string `json:"sharingStatus,omitempty"` + + DownloadSharingUri *string `json:"downloadSharingUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ChangeNumber: u.ChangeNumber, + + DateCreated: DateCreated, + + DateModified: DateModified, + + DateUploaded: DateUploaded, + + ContentUri: u.ContentUri, + + Workspace: u.Workspace, + + CreatedBy: u.CreatedBy, + + UploadedBy: u.UploadedBy, + + SharingUri: u.SharingUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + SystemType: u.SystemType, + + Filename: u.Filename, + + PageCount: u.PageCount, + + Read: u.Read, + + CallerAddress: u.CallerAddress, + + ReceiverAddress: u.ReceiverAddress, + + Tags: u.Tags, + + TagValues: u.TagValues, + + Attributes: u.Attributes, + + Thumbnails: u.Thumbnails, + + UploadStatus: u.UploadStatus, + + UploadDestinationUri: u.UploadDestinationUri, + + UploadMethod: u.UploadMethod, + + LockInfo: u.LockInfo, + + Acl: u.Acl, + + SharingStatus: u.SharingStatus, + + DownloadSharingUri: u.DownloadSharingUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Document) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentarticle.go b/platformclientv2/documentarticle.go index 1fae4dd00..330321493 100644 --- a/platformclientv2/documentarticle.go +++ b/platformclientv2/documentarticle.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Documentarticle struct { } +func (u *Documentarticle) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentarticle + + + + return json.Marshal(&struct { + Title *string `json:"title,omitempty"` + + Content *Articlecontent `json:"content,omitempty"` + + Alternatives *[]string `json:"alternatives,omitempty"` + *Alias + }{ + Title: u.Title, + + Content: u.Content, + + Alternatives: u.Alternatives, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentarticle) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentationresult.go b/platformclientv2/documentationresult.go index 760dd2b32..f82ef4bfa 100644 --- a/platformclientv2/documentationresult.go +++ b/platformclientv2/documentationresult.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -89,6 +90,106 @@ type Documentationresult struct { } +func (u *Documentationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentationresult + + + Modified := new(string) + if u.Modified != nil { + + *Modified = timeutil.Strftime(u.Modified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Modified = nil + } + + + return json.Marshal(&struct { + Id *int `json:"id,omitempty"` + + Categories *[]int `json:"categories,omitempty"` + + Description *string `json:"description,omitempty"` + + Content *string `json:"content,omitempty"` + + Excerpt *string `json:"excerpt,omitempty"` + + Link *string `json:"link,omitempty"` + + Modified *string `json:"modified,omitempty"` + + Name *string `json:"name,omitempty"` + + Service *[]int `json:"service,omitempty"` + + Slug *string `json:"slug,omitempty"` + + Title *string `json:"title,omitempty"` + + GetType *string `json:"get_type,omitempty"` + + FacetFeature *[]int `json:"facet_feature,omitempty"` + + FacetRole *[]int `json:"facet_role,omitempty"` + + FacetService *[]int `json:"facet_service,omitempty"` + + FaqCategories *[]int `json:"faq_categories,omitempty"` + + ReleasenoteCategory *[]int `json:"releasenote_category,omitempty"` + + ReleasenoteTag *[]int `json:"releasenote_tag,omitempty"` + + ServiceArea *[]int `json:"service-area,omitempty"` + + VideoCategories *[]int `json:"video_categories,omitempty"` + *Alias + }{ + Id: u.Id, + + Categories: u.Categories, + + Description: u.Description, + + Content: u.Content, + + Excerpt: u.Excerpt, + + Link: u.Link, + + Modified: Modified, + + Name: u.Name, + + Service: u.Service, + + Slug: u.Slug, + + Title: u.Title, + + GetType: u.GetType, + + FacetFeature: u.FacetFeature, + + FacetRole: u.FacetRole, + + FacetService: u.FacetService, + + FaqCategories: u.FaqCategories, + + ReleasenoteCategory: u.ReleasenoteCategory, + + ReleasenoteTag: u.ReleasenoteTag, + + ServiceArea: u.ServiceArea, + + VideoCategories: u.VideoCategories, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentationsearchcriteria.go b/platformclientv2/documentationsearchcriteria.go index ad713cec8..2ccdfc722 100644 --- a/platformclientv2/documentationsearchcriteria.go +++ b/platformclientv2/documentationsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Documentationsearchcriteria struct { } +func (u *Documentationsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentationsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Documentationsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentationsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentationsearchrequest.go b/platformclientv2/documentationsearchrequest.go index 6faffaa66..cd5e80935 100644 --- a/platformclientv2/documentationsearchrequest.go +++ b/platformclientv2/documentationsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Documentationsearchrequest struct { } +func (u *Documentationsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentationsearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + Query *[]Documentationsearchcriteria `json:"query,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentationsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentationsearchresponse.go b/platformclientv2/documentationsearchresponse.go index e99cd6e47..9ebeab5f2 100644 --- a/platformclientv2/documentationsearchresponse.go +++ b/platformclientv2/documentationsearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Documentationsearchresponse struct { } +func (u *Documentationsearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentationsearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + CurrentPage *string `json:"currentPage,omitempty"` + + NextPage *string `json:"nextPage,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *[]Documentationresult `json:"results,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PreviousPage: u.PreviousPage, + + CurrentPage: u.CurrentPage, + + NextPage: u.NextPage, + + Types: u.Types, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentationsearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentattribute.go b/platformclientv2/documentattribute.go index d0cf8a8d0..b4836eb90 100644 --- a/platformclientv2/documentattribute.go +++ b/platformclientv2/documentattribute.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Documentattribute struct { } +func (u *Documentattribute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentattribute + + + + return json.Marshal(&struct { + Attribute *Attribute `json:"attribute,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Attribute: u.Attribute, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentattribute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentaudit.go b/platformclientv2/documentaudit.go index b7ebed5e8..9f3391a8c 100644 --- a/platformclientv2/documentaudit.go +++ b/platformclientv2/documentaudit.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,90 @@ type Documentaudit struct { } +func (u *Documentaudit) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentaudit + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + TransactionId *string `json:"transactionId,omitempty"` + + TransactionInitiator *bool `json:"transactionInitiator,omitempty"` + + Application *string `json:"application,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + Level *string `json:"level,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + Status *string `json:"status,omitempty"` + + ActionContext *string `json:"actionContext,omitempty"` + + Action *string `json:"action,omitempty"` + + Entity *Auditentityreference `json:"entity,omitempty"` + + Changes *[]Auditchange `json:"changes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + User: u.User, + + Workspace: u.Workspace, + + TransactionId: u.TransactionId, + + TransactionInitiator: u.TransactionInitiator, + + Application: u.Application, + + ServiceName: u.ServiceName, + + Level: u.Level, + + Timestamp: Timestamp, + + Status: u.Status, + + ActionContext: u.ActionContext, + + Action: u.Action, + + Entity: u.Entity, + + Changes: u.Changes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentaudit) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentauditentitylisting.go b/platformclientv2/documentauditentitylisting.go index 0985d19bf..d2bee3e89 100644 --- a/platformclientv2/documentauditentitylisting.go +++ b/platformclientv2/documentauditentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Documentauditentitylisting struct { } +func (u *Documentauditentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentauditentitylisting + + + + return json.Marshal(&struct { + Entities *[]Documentaudit `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentauditentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentcategoryinput.go b/platformclientv2/documentcategoryinput.go index c4c8c143b..659d78fa1 100644 --- a/platformclientv2/documentcategoryinput.go +++ b/platformclientv2/documentcategoryinput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Documentcategoryinput struct { } +func (u *Documentcategoryinput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentcategoryinput + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentcategoryinput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documententitylisting.go b/platformclientv2/documententitylisting.go index e2f2710e6..a828e8a39 100644 --- a/platformclientv2/documententitylisting.go +++ b/platformclientv2/documententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Documententitylisting struct { } +func (u *Documententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documententitylisting + + + + return json.Marshal(&struct { + Entities *[]Document `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentfaq.go b/platformclientv2/documentfaq.go index 953a88867..c81dea71a 100644 --- a/platformclientv2/documentfaq.go +++ b/platformclientv2/documentfaq.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Documentfaq struct { } +func (u *Documentfaq) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentfaq + + + + return json.Marshal(&struct { + Question *string `json:"question,omitempty"` + + Answer *string `json:"answer,omitempty"` + + Alternatives *[]string `json:"alternatives,omitempty"` + *Alias + }{ + Question: u.Question, + + Answer: u.Answer, + + Alternatives: u.Alternatives, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentfaq) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentlisting.go b/platformclientv2/documentlisting.go index a9eb21ab3..4062b6b30 100644 --- a/platformclientv2/documentlisting.go +++ b/platformclientv2/documentlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Documentlisting struct { } +func (u *Documentlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentlisting + + + + return json.Marshal(&struct { + Entities *[]Knowledgedocument `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentreference.go b/platformclientv2/documentreference.go index fc9a6d0e8..33adc2e1f 100644 --- a/platformclientv2/documentreference.go +++ b/platformclientv2/documentreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Documentreference struct { } +func (u *Documentreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentthumbnail.go b/platformclientv2/documentthumbnail.go index cc8e74153..4aa84c557 100644 --- a/platformclientv2/documentthumbnail.go +++ b/platformclientv2/documentthumbnail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Documentthumbnail struct { } +func (u *Documentthumbnail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentthumbnail + + + + return json.Marshal(&struct { + Resolution *string `json:"resolution,omitempty"` + + ImageUri *string `json:"imageUri,omitempty"` + + Height *int `json:"height,omitempty"` + + Width *int `json:"width,omitempty"` + *Alias + }{ + Resolution: u.Resolution, + + ImageUri: u.ImageUri, + + Height: u.Height, + + Width: u.Width, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentthumbnail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentupdate.go b/platformclientv2/documentupdate.go index c0ff23573..63d8dfb7d 100644 --- a/platformclientv2/documentupdate.go +++ b/platformclientv2/documentupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Documentupdate struct { } +func (u *Documentupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentupdate + + + + return json.Marshal(&struct { + ChangeNumber *int `json:"changeNumber,omitempty"` + + Name *string `json:"name,omitempty"` + + Read *bool `json:"read,omitempty"` + + AddTags *[]string `json:"addTags,omitempty"` + + RemoveTags *[]string `json:"removeTags,omitempty"` + + AddTagIds *[]string `json:"addTagIds,omitempty"` + + RemoveTagIds *[]string `json:"removeTagIds,omitempty"` + + UpdateAttributes *[]Documentattribute `json:"updateAttributes,omitempty"` + + RemoveAttributes *[]string `json:"removeAttributes,omitempty"` + *Alias + }{ + ChangeNumber: u.ChangeNumber, + + Name: u.Name, + + Read: u.Read, + + AddTags: u.AddTags, + + RemoveTags: u.RemoveTags, + + AddTagIds: u.AddTagIds, + + RemoveTagIds: u.RemoveTagIds, + + UpdateAttributes: u.UpdateAttributes, + + RemoveAttributes: u.RemoveAttributes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/documentupload.go b/platformclientv2/documentupload.go index 581d30228..2c1ab22c2 100644 --- a/platformclientv2/documentupload.go +++ b/platformclientv2/documentupload.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Documentupload struct { } +func (u *Documentupload) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Documentupload + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + TagIds *[]string `json:"tagIds,omitempty"` + *Alias + }{ + Name: u.Name, + + Workspace: u.Workspace, + + Tags: u.Tags, + + TagIds: u.TagIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Documentupload) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domaincapabilities.go b/platformclientv2/domaincapabilities.go index ecf170fc8..52eada963 100644 --- a/platformclientv2/domaincapabilities.go +++ b/platformclientv2/domaincapabilities.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Domaincapabilities struct { } +func (u *Domaincapabilities) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domaincapabilities + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + Dhcp *bool `json:"dhcp,omitempty"` + + Metric *int `json:"metric,omitempty"` + + AutoMetric *bool `json:"autoMetric,omitempty"` + + SupportsMetric *bool `json:"supportsMetric,omitempty"` + + PingEnabled *bool `json:"pingEnabled,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + Dhcp: u.Dhcp, + + Metric: u.Metric, + + AutoMetric: u.AutoMetric, + + SupportsMetric: u.SupportsMetric, + + PingEnabled: u.PingEnabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domaincapabilities) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domaincertificateauthority.go b/platformclientv2/domaincertificateauthority.go index ba7894355..c23f591ab 100644 --- a/platformclientv2/domaincertificateauthority.go +++ b/platformclientv2/domaincertificateauthority.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Domaincertificateauthority struct { } +func (u *Domaincertificateauthority) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domaincertificateauthority + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + VarType *string `json:"type,omitempty"` + + Services *[]string `json:"services,omitempty"` + + CertificateDetails *[]Certificatedetails `json:"certificateDetails,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Certificate: u.Certificate, + + VarType: u.VarType, + + Services: u.Services, + + CertificateDetails: u.CertificateDetails, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domaincertificateauthority) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainedgesoftwareupdatedto.go b/platformclientv2/domainedgesoftwareupdatedto.go index d70698e21..2e54a632d 100644 --- a/platformclientv2/domainedgesoftwareupdatedto.go +++ b/platformclientv2/domainedgesoftwareupdatedto.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,82 @@ type Domainedgesoftwareupdatedto struct { } +func (u *Domainedgesoftwareupdatedto) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainedgesoftwareupdatedto + + + DownloadStartTime := new(string) + if u.DownloadStartTime != nil { + + *DownloadStartTime = timeutil.Strftime(u.DownloadStartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DownloadStartTime = nil + } + + ExecuteStartTime := new(string) + if u.ExecuteStartTime != nil { + + *ExecuteStartTime = timeutil.Strftime(u.ExecuteStartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExecuteStartTime = nil + } + + ExecuteStopTime := new(string) + if u.ExecuteStopTime != nil { + + *ExecuteStopTime = timeutil.Strftime(u.ExecuteStopTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExecuteStopTime = nil + } + + + return json.Marshal(&struct { + Version *Domainedgesoftwareversiondto `json:"version,omitempty"` + + MaxDownloadRate *int `json:"maxDownloadRate,omitempty"` + + DownloadStartTime *string `json:"downloadStartTime,omitempty"` + + ExecuteStartTime *string `json:"executeStartTime,omitempty"` + + ExecuteStopTime *string `json:"executeStopTime,omitempty"` + + ExecuteOnIdle *bool `json:"executeOnIdle,omitempty"` + + Status *string `json:"status,omitempty"` + + EdgeUri *string `json:"edgeUri,omitempty"` + + CallDrainingWaitTimeSeconds *int `json:"callDrainingWaitTimeSeconds,omitempty"` + + Current *bool `json:"current,omitempty"` + *Alias + }{ + Version: u.Version, + + MaxDownloadRate: u.MaxDownloadRate, + + DownloadStartTime: DownloadStartTime, + + ExecuteStartTime: ExecuteStartTime, + + ExecuteStopTime: ExecuteStopTime, + + ExecuteOnIdle: u.ExecuteOnIdle, + + Status: u.Status, + + EdgeUri: u.EdgeUri, + + CallDrainingWaitTimeSeconds: u.CallDrainingWaitTimeSeconds, + + Current: u.Current, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainedgesoftwareupdatedto) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainedgesoftwareversiondto.go b/platformclientv2/domainedgesoftwareversiondto.go index bc4a1299a..f5700a4c4 100644 --- a/platformclientv2/domainedgesoftwareversiondto.go +++ b/platformclientv2/domainedgesoftwareversiondto.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Domainedgesoftwareversiondto struct { } +func (u *Domainedgesoftwareversiondto) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainedgesoftwareversiondto + + + PublishDate := new(string) + if u.PublishDate != nil { + + *PublishDate = timeutil.Strftime(u.PublishDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PublishDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + EdgeVersion *string `json:"edgeVersion,omitempty"` + + PublishDate *string `json:"publishDate,omitempty"` + + EdgeUri *string `json:"edgeUri,omitempty"` + + LatestRelease *bool `json:"latestRelease,omitempty"` + + Current *bool `json:"current,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + EdgeVersion: u.EdgeVersion, + + PublishDate: PublishDate, + + EdgeUri: u.EdgeUri, + + LatestRelease: u.LatestRelease, + + Current: u.Current, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainedgesoftwareversiondto) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainedgesoftwareversiondtoentitylisting.go b/platformclientv2/domainedgesoftwareversiondtoentitylisting.go index 726ac084b..212c3f506 100644 --- a/platformclientv2/domainedgesoftwareversiondtoentitylisting.go +++ b/platformclientv2/domainedgesoftwareversiondtoentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Domainedgesoftwareversiondtoentitylisting struct { } +func (u *Domainedgesoftwareversiondtoentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainedgesoftwareversiondtoentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainedgesoftwareversiondto `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainedgesoftwareversiondtoentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainentity.go b/platformclientv2/domainentity.go index 417ec9683..278bc1453 100644 --- a/platformclientv2/domainentity.go +++ b/platformclientv2/domainentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Domainentity struct { } +func (u *Domainentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainentitylisting.go b/platformclientv2/domainentitylisting.go index 41c04cd2b..45a3f028a 100644 --- a/platformclientv2/domainentitylisting.go +++ b/platformclientv2/domainentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Domainentitylisting struct { } +func (u *Domainentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainentity `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainentitylistingevaluationform.go b/platformclientv2/domainentitylistingevaluationform.go index 890547a82..bbf0bf64e 100644 --- a/platformclientv2/domainentitylistingevaluationform.go +++ b/platformclientv2/domainentitylistingevaluationform.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Domainentitylistingevaluationform struct { } +func (u *Domainentitylistingevaluationform) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainentitylistingevaluationform + + + + return json.Marshal(&struct { + Entities *[]Evaluationform `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainentitylistingevaluationform) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainentitylistingqueryresult.go b/platformclientv2/domainentitylistingqueryresult.go index a7dc080f2..6a93eb54b 100644 --- a/platformclientv2/domainentitylistingqueryresult.go +++ b/platformclientv2/domainentitylistingqueryresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Domainentitylistingqueryresult struct { } +func (u *Domainentitylistingqueryresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainentitylistingqueryresult + + + + return json.Marshal(&struct { + Entities *[]Queryresult `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainentitylistingqueryresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainentitylistingsurveyform.go b/platformclientv2/domainentitylistingsurveyform.go index 4a997e6a0..38b9e1de1 100644 --- a/platformclientv2/domainentitylistingsurveyform.go +++ b/platformclientv2/domainentitylistingsurveyform.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Domainentitylistingsurveyform struct { } +func (u *Domainentitylistingsurveyform) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainentitylistingsurveyform + + + + return json.Marshal(&struct { + Entities *[]Surveyform `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainentitylistingsurveyform) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainentityref.go b/platformclientv2/domainentityref.go index 07fa31fb9..c0b6e9df3 100644 --- a/platformclientv2/domainentityref.go +++ b/platformclientv2/domainentityref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Domainentityref struct { } +func (u *Domainentityref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainentityref + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainentityref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainlogicalinterface.go b/platformclientv2/domainlogicalinterface.go index b91ad2d2c..760ead773 100644 --- a/platformclientv2/domainlogicalinterface.go +++ b/platformclientv2/domainlogicalinterface.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -173,6 +174,214 @@ type Domainlogicalinterface struct { } +func (u *Domainlogicalinterface) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainlogicalinterface + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + EdgeUri *string `json:"edgeUri,omitempty"` + + EdgeAssignedId *string `json:"edgeAssignedId,omitempty"` + + FriendlyName *string `json:"friendlyName,omitempty"` + + VlanTagId *int `json:"vlanTagId,omitempty"` + + HardwareAddress *string `json:"hardwareAddress,omitempty"` + + PhysicalAdapterId *string `json:"physicalAdapterId,omitempty"` + + IfStatus *string `json:"ifStatus,omitempty"` + + InterfaceType *string `json:"interfaceType,omitempty"` + + PublicNatAddressIpV4 *string `json:"publicNatAddressIpV4,omitempty"` + + PublicNatAddressIpV6 *string `json:"publicNatAddressIpV6,omitempty"` + + Routes *[]Domainnetworkroute `json:"routes,omitempty"` + + Addresses *[]Domainnetworkaddress `json:"addresses,omitempty"` + + Ipv4Capabilities *Domaincapabilities `json:"ipv4Capabilities,omitempty"` + + Ipv6Capabilities *Domaincapabilities `json:"ipv6Capabilities,omitempty"` + + CurrentState *string `json:"currentState,omitempty"` + + LastModifiedUserId *string `json:"lastModifiedUserId,omitempty"` + + LastModifiedCorrelationId *string `json:"lastModifiedCorrelationId,omitempty"` + + CommandResponses *[]Domainnetworkcommandresponse `json:"commandResponses,omitempty"` + + InheritPhoneTrunkBasesIPv4 *bool `json:"inheritPhoneTrunkBasesIPv4,omitempty"` + + InheritPhoneTrunkBasesIPv6 *bool `json:"inheritPhoneTrunkBasesIPv6,omitempty"` + + UseForInternalEdgeCommunication *bool `json:"useForInternalEdgeCommunication,omitempty"` + + UseForIndirectEdgeCommunication *bool `json:"useForIndirectEdgeCommunication,omitempty"` + + UseForCloudProxyEdgeCommunication *bool `json:"useForCloudProxyEdgeCommunication,omitempty"` + + UseForWanInterface *bool `json:"useForWanInterface,omitempty"` + + ExternalTrunkBaseAssignments *[]Trunkbaseassignment `json:"externalTrunkBaseAssignments,omitempty"` + + PhoneTrunkBaseAssignments *[]Trunkbaseassignment `json:"phoneTrunkBaseAssignments,omitempty"` + + TraceEnabled *bool `json:"traceEnabled,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + EdgeUri: u.EdgeUri, + + EdgeAssignedId: u.EdgeAssignedId, + + FriendlyName: u.FriendlyName, + + VlanTagId: u.VlanTagId, + + HardwareAddress: u.HardwareAddress, + + PhysicalAdapterId: u.PhysicalAdapterId, + + IfStatus: u.IfStatus, + + InterfaceType: u.InterfaceType, + + PublicNatAddressIpV4: u.PublicNatAddressIpV4, + + PublicNatAddressIpV6: u.PublicNatAddressIpV6, + + Routes: u.Routes, + + Addresses: u.Addresses, + + Ipv4Capabilities: u.Ipv4Capabilities, + + Ipv6Capabilities: u.Ipv6Capabilities, + + CurrentState: u.CurrentState, + + LastModifiedUserId: u.LastModifiedUserId, + + LastModifiedCorrelationId: u.LastModifiedCorrelationId, + + CommandResponses: u.CommandResponses, + + InheritPhoneTrunkBasesIPv4: u.InheritPhoneTrunkBasesIPv4, + + InheritPhoneTrunkBasesIPv6: u.InheritPhoneTrunkBasesIPv6, + + UseForInternalEdgeCommunication: u.UseForInternalEdgeCommunication, + + UseForIndirectEdgeCommunication: u.UseForIndirectEdgeCommunication, + + UseForCloudProxyEdgeCommunication: u.UseForCloudProxyEdgeCommunication, + + UseForWanInterface: u.UseForWanInterface, + + ExternalTrunkBaseAssignments: u.ExternalTrunkBaseAssignments, + + PhoneTrunkBaseAssignments: u.PhoneTrunkBaseAssignments, + + TraceEnabled: u.TraceEnabled, + + StartDate: StartDate, + + EndDate: EndDate, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainlogicalinterface) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainnetworkaddress.go b/platformclientv2/domainnetworkaddress.go index 440f72b87..26ca9ea63 100644 --- a/platformclientv2/domainnetworkaddress.go +++ b/platformclientv2/domainnetworkaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Domainnetworkaddress struct { } +func (u *Domainnetworkaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainnetworkaddress + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Address *string `json:"address,omitempty"` + + Persistent *bool `json:"persistent,omitempty"` + + Family *int `json:"family,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Address: u.Address, + + Persistent: u.Persistent, + + Family: u.Family, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainnetworkaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainnetworkcommandresponse.go b/platformclientv2/domainnetworkcommandresponse.go index d9abd4773..91f6dd617 100644 --- a/platformclientv2/domainnetworkcommandresponse.go +++ b/platformclientv2/domainnetworkcommandresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Domainnetworkcommandresponse struct { } +func (u *Domainnetworkcommandresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainnetworkcommandresponse + + + + return json.Marshal(&struct { + CorrelationId *string `json:"correlationId,omitempty"` + + CommandName *string `json:"commandName,omitempty"` + + Acknowledged *bool `json:"acknowledged,omitempty"` + + ErrorInfo **Errordetails `json:"errorInfo,omitempty"` + *Alias + }{ + CorrelationId: u.CorrelationId, + + CommandName: u.CommandName, + + Acknowledged: u.Acknowledged, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainnetworkcommandresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainnetworkroute.go b/platformclientv2/domainnetworkroute.go index 1f7c9f3c6..8ca760607 100644 --- a/platformclientv2/domainnetworkroute.go +++ b/platformclientv2/domainnetworkroute.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Domainnetworkroute struct { } +func (u *Domainnetworkroute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainnetworkroute + + + + return json.Marshal(&struct { + Prefix *string `json:"prefix,omitempty"` + + Nexthop *string `json:"nexthop,omitempty"` + + Persistent *bool `json:"persistent,omitempty"` + + Metric *int `json:"metric,omitempty"` + + Family *int `json:"family,omitempty"` + *Alias + }{ + Prefix: u.Prefix, + + Nexthop: u.Nexthop, + + Persistent: u.Persistent, + + Metric: u.Metric, + + Family: u.Family, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainnetworkroute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainorganizationproduct.go b/platformclientv2/domainorganizationproduct.go index 8fd71e939..da41cd320 100644 --- a/platformclientv2/domainorganizationproduct.go +++ b/platformclientv2/domainorganizationproduct.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Domainorganizationproduct struct { } +func (u *Domainorganizationproduct) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainorganizationproduct + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainorganizationproduct) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainorganizationrole.go b/platformclientv2/domainorganizationrole.go index 8b041d161..63411f5be 100644 --- a/platformclientv2/domainorganizationrole.go +++ b/platformclientv2/domainorganizationrole.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Domainorganizationrole struct { } +func (u *Domainorganizationrole) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainorganizationrole + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DefaultRoleId *string `json:"defaultRoleId,omitempty"` + + Permissions *[]string `json:"permissions,omitempty"` + + UnusedPermissions *[]string `json:"unusedPermissions,omitempty"` + + PermissionPolicies *[]Domainpermissionpolicy `json:"permissionPolicies,omitempty"` + + UserCount *int `json:"userCount,omitempty"` + + RoleNeedsUpdate *bool `json:"roleNeedsUpdate,omitempty"` + + VarDefault *bool `json:"default,omitempty"` + + Base *bool `json:"base,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + DefaultRoleId: u.DefaultRoleId, + + Permissions: u.Permissions, + + UnusedPermissions: u.UnusedPermissions, + + PermissionPolicies: u.PermissionPolicies, + + UserCount: u.UserCount, + + RoleNeedsUpdate: u.RoleNeedsUpdate, + + VarDefault: u.VarDefault, + + Base: u.Base, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainorganizationrole) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainorganizationrolecreate.go b/platformclientv2/domainorganizationrolecreate.go index 5e4d74406..c74e51cde 100644 --- a/platformclientv2/domainorganizationrolecreate.go +++ b/platformclientv2/domainorganizationrolecreate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Domainorganizationrolecreate struct { } +func (u *Domainorganizationrolecreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainorganizationrolecreate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DefaultRoleId *string `json:"defaultRoleId,omitempty"` + + Permissions *[]string `json:"permissions,omitempty"` + + UnusedPermissions *[]string `json:"unusedPermissions,omitempty"` + + PermissionPolicies *[]Domainpermissionpolicy `json:"permissionPolicies,omitempty"` + + UserCount *int `json:"userCount,omitempty"` + + RoleNeedsUpdate *bool `json:"roleNeedsUpdate,omitempty"` + + VarDefault *bool `json:"default,omitempty"` + + Base *bool `json:"base,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + DefaultRoleId: u.DefaultRoleId, + + Permissions: u.Permissions, + + UnusedPermissions: u.UnusedPermissions, + + PermissionPolicies: u.PermissionPolicies, + + UserCount: u.UserCount, + + RoleNeedsUpdate: u.RoleNeedsUpdate, + + VarDefault: u.VarDefault, + + Base: u.Base, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainorganizationrolecreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainorganizationroleupdate.go b/platformclientv2/domainorganizationroleupdate.go index c7fdadd9c..a1d3e6e31 100644 --- a/platformclientv2/domainorganizationroleupdate.go +++ b/platformclientv2/domainorganizationroleupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Domainorganizationroleupdate struct { } +func (u *Domainorganizationroleupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainorganizationroleupdate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DefaultRoleId *string `json:"defaultRoleId,omitempty"` + + Permissions *[]string `json:"permissions,omitempty"` + + UnusedPermissions *[]string `json:"unusedPermissions,omitempty"` + + PermissionPolicies *[]Domainpermissionpolicy `json:"permissionPolicies,omitempty"` + + UserCount *int `json:"userCount,omitempty"` + + RoleNeedsUpdate *bool `json:"roleNeedsUpdate,omitempty"` + + VarDefault *bool `json:"default,omitempty"` + + Base *bool `json:"base,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + DefaultRoleId: u.DefaultRoleId, + + Permissions: u.Permissions, + + UnusedPermissions: u.UnusedPermissions, + + PermissionPolicies: u.PermissionPolicies, + + UserCount: u.UserCount, + + RoleNeedsUpdate: u.RoleNeedsUpdate, + + VarDefault: u.VarDefault, + + Base: u.Base, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainorganizationroleupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainorgroledifference.go b/platformclientv2/domainorgroledifference.go index 8bc9d1889..44eed3fa2 100644 --- a/platformclientv2/domainorgroledifference.go +++ b/platformclientv2/domainorgroledifference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Domainorgroledifference struct { } +func (u *Domainorgroledifference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainorgroledifference + + + + return json.Marshal(&struct { + RemovedPermissionPolicies *[]Domainpermissionpolicy `json:"removedPermissionPolicies,omitempty"` + + AddedPermissionPolicies *[]Domainpermissionpolicy `json:"addedPermissionPolicies,omitempty"` + + SamePermissionPolicies *[]Domainpermissionpolicy `json:"samePermissionPolicies,omitempty"` + + UserOrgRole *Domainorganizationrole `json:"userOrgRole,omitempty"` + + RoleFromDefault *Domainorganizationrole `json:"roleFromDefault,omitempty"` + *Alias + }{ + RemovedPermissionPolicies: u.RemovedPermissionPolicies, + + AddedPermissionPolicies: u.AddedPermissionPolicies, + + SamePermissionPolicies: u.SamePermissionPolicies, + + UserOrgRole: u.UserOrgRole, + + RoleFromDefault: u.RoleFromDefault, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainorgroledifference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainpermission.go b/platformclientv2/domainpermission.go index 1792b113f..4d5d9e5db 100644 --- a/platformclientv2/domainpermission.go +++ b/platformclientv2/domainpermission.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Domainpermission struct { } +func (u *Domainpermission) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainpermission + + + + return json.Marshal(&struct { + Domain *string `json:"domain,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + + Action *string `json:"action,omitempty"` + + Label *string `json:"label,omitempty"` + + AllowsConditions *bool `json:"allowsConditions,omitempty"` + + DivisionAware *bool `json:"divisionAware,omitempty"` + *Alias + }{ + Domain: u.Domain, + + EntityType: u.EntityType, + + Action: u.Action, + + Label: u.Label, + + AllowsConditions: u.AllowsConditions, + + DivisionAware: u.DivisionAware, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainpermission) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainpermissioncollection.go b/platformclientv2/domainpermissioncollection.go index 3de6c38a8..31ef17c59 100644 --- a/platformclientv2/domainpermissioncollection.go +++ b/platformclientv2/domainpermissioncollection.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Domainpermissioncollection struct { } +func (u *Domainpermissioncollection) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainpermissioncollection + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Domain *string `json:"domain,omitempty"` + + PermissionMap *map[string][]Domainpermission `json:"permissionMap,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Domain: u.Domain, + + PermissionMap: u.PermissionMap, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainpermissioncollection) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainpermissionpolicy.go b/platformclientv2/domainpermissionpolicy.go index 68ea4051f..5f7ffb82f 100644 --- a/platformclientv2/domainpermissionpolicy.go +++ b/platformclientv2/domainpermissionpolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Domainpermissionpolicy struct { } +func (u *Domainpermissionpolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainpermissionpolicy + + + + return json.Marshal(&struct { + Domain *string `json:"domain,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + PolicyName *string `json:"policyName,omitempty"` + + PolicyDescription *string `json:"policyDescription,omitempty"` + + ActionSet *[]string `json:"actionSet,omitempty"` + + NamedResources *[]string `json:"namedResources,omitempty"` + + AllowConditions *bool `json:"allowConditions,omitempty"` + + ResourceConditionNode *Domainresourceconditionnode `json:"resourceConditionNode,omitempty"` + *Alias + }{ + Domain: u.Domain, + + EntityName: u.EntityName, + + PolicyName: u.PolicyName, + + PolicyDescription: u.PolicyDescription, + + ActionSet: u.ActionSet, + + NamedResources: u.NamedResources, + + AllowConditions: u.AllowConditions, + + ResourceConditionNode: u.ResourceConditionNode, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainpermissionpolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainphysicalcapabilities.go b/platformclientv2/domainphysicalcapabilities.go index 4e6133688..6a0750881 100644 --- a/platformclientv2/domainphysicalcapabilities.go +++ b/platformclientv2/domainphysicalcapabilities.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Domainphysicalcapabilities struct { } +func (u *Domainphysicalcapabilities) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainphysicalcapabilities + + + + return json.Marshal(&struct { + Vlan *bool `json:"vlan,omitempty"` + + Team *bool `json:"team,omitempty"` + *Alias + }{ + Vlan: u.Vlan, + + Team: u.Team, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainphysicalcapabilities) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainphysicalinterface.go b/platformclientv2/domainphysicalinterface.go index 6f862626a..d0aa34976 100644 --- a/platformclientv2/domainphysicalinterface.go +++ b/platformclientv2/domainphysicalinterface.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,102 @@ type Domainphysicalinterface struct { } +func (u *Domainphysicalinterface) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainphysicalinterface + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + EdgeUri *string `json:"edgeUri,omitempty"` + + FriendlyName *string `json:"friendlyName,omitempty"` + + HardwareAddress *string `json:"hardwareAddress,omitempty"` + + PortLabel *string `json:"portLabel,omitempty"` + + PhysicalCapabilities *Domainphysicalcapabilities `json:"physicalCapabilities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + EdgeUri: u.EdgeUri, + + FriendlyName: u.FriendlyName, + + HardwareAddress: u.HardwareAddress, + + PortLabel: u.PortLabel, + + PhysicalCapabilities: u.PhysicalCapabilities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainphysicalinterface) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainresourceconditionnode.go b/platformclientv2/domainresourceconditionnode.go index 3936bb4d5..119a57443 100644 --- a/platformclientv2/domainresourceconditionnode.go +++ b/platformclientv2/domainresourceconditionnode.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Domainresourceconditionnode struct { } +func (u *Domainresourceconditionnode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainresourceconditionnode + + + + return json.Marshal(&struct { + VariableName *string `json:"variableName,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Operands *[]Domainresourceconditionvalue `json:"operands,omitempty"` + + Conjunction *string `json:"conjunction,omitempty"` + + Terms *[]Domainresourceconditionnode `json:"terms,omitempty"` + *Alias + }{ + VariableName: u.VariableName, + + Operator: u.Operator, + + Operands: u.Operands, + + Conjunction: u.Conjunction, + + Terms: u.Terms, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainresourceconditionnode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainresourceconditionvalue.go b/platformclientv2/domainresourceconditionvalue.go index b2011c46f..daceda2e0 100644 --- a/platformclientv2/domainresourceconditionvalue.go +++ b/platformclientv2/domainresourceconditionvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Domainresourceconditionvalue struct { } +func (u *Domainresourceconditionvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainresourceconditionvalue + + + + return json.Marshal(&struct { + User *User `json:"user,omitempty"` + + Queue *Queue `json:"queue,omitempty"` + + Value *string `json:"value,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + User: u.User, + + Queue: u.Queue, + + Value: u.Value, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainresourceconditionvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainrole.go b/platformclientv2/domainrole.go index adcf01c97..c056f3dd2 100644 --- a/platformclientv2/domainrole.go +++ b/platformclientv2/domainrole.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Domainrole struct { } +func (u *Domainrole) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainrole + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainrole) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/domainschemareference.go b/platformclientv2/domainschemareference.go index 61d1cb8e1..fca74e47c 100644 --- a/platformclientv2/domainschemareference.go +++ b/platformclientv2/domainschemareference.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Domainschemareference struct { } +func (u *Domainschemareference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Domainschemareference + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Domainschemareference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/downloadresponse.go b/platformclientv2/downloadresponse.go index e8e650d85..3ca4b144f 100644 --- a/platformclientv2/downloadresponse.go +++ b/platformclientv2/downloadresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Downloadresponse struct { } +func (u *Downloadresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Downloadresponse + + + + return json.Marshal(&struct { + ContentLocationUri *string `json:"contentLocationUri,omitempty"` + + ImageUri *string `json:"imageUri,omitempty"` + + Thumbnails *[]Documentthumbnail `json:"thumbnails,omitempty"` + *Alias + }{ + ContentLocationUri: u.ContentLocationUri, + + ImageUri: u.ImageUri, + + Thumbnails: u.Thumbnails, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Downloadresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/draft.go b/platformclientv2/draft.go index 4a523390d..14d11561a 100644 --- a/platformclientv2/draft.go +++ b/platformclientv2/draft.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Draft struct { } +func (u *Draft) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Draft + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Miner *Miner `json:"miner,omitempty"` + + Intents *[]Draftintents `json:"intents,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Miner: u.Miner, + + Intents: u.Intents, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Draft) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/draftintents.go b/platformclientv2/draftintents.go index a223b3a11..eb16eb04a 100644 --- a/platformclientv2/draftintents.go +++ b/platformclientv2/draftintents.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Draftintents struct { } +func (u *Draftintents) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Draftintents + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Utterances *[]string `json:"utterances,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Utterances: u.Utterances, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Draftintents) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/draftlisting.go b/platformclientv2/draftlisting.go index 5b36337b0..0b8cea089 100644 --- a/platformclientv2/draftlisting.go +++ b/platformclientv2/draftlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Draftlisting struct { } +func (u *Draftlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Draftlisting + + + + return json.Marshal(&struct { + Entities *[]Draft `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Draftlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/draftrequest.go b/platformclientv2/draftrequest.go index 732722657..5400806a8 100644 --- a/platformclientv2/draftrequest.go +++ b/platformclientv2/draftrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Draftrequest struct { } +func (u *Draftrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Draftrequest + + + + return json.Marshal(&struct { + Intents *[]Draftintents `json:"intents,omitempty"` + *Alias + }{ + Intents: u.Intents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Draftrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/draftvalidationresult.go b/platformclientv2/draftvalidationresult.go index cba596fe8..889fda23e 100644 --- a/platformclientv2/draftvalidationresult.go +++ b/platformclientv2/draftvalidationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Draftvalidationresult struct { } +func (u *Draftvalidationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Draftvalidationresult + + + + return json.Marshal(&struct { + Valid *bool `json:"valid,omitempty"` + + Errors *[]Errorbody `json:"errors,omitempty"` + *Alias + }{ + Valid: u.Valid, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Draftvalidationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/durationcondition.go b/platformclientv2/durationcondition.go index 15dbdf138..7dd8e78e8 100644 --- a/platformclientv2/durationcondition.go +++ b/platformclientv2/durationcondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Durationcondition struct { } +func (u *Durationcondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Durationcondition + + + + return json.Marshal(&struct { + DurationTarget *string `json:"durationTarget,omitempty"` + + DurationOperator *string `json:"durationOperator,omitempty"` + + DurationRange *string `json:"durationRange,omitempty"` + *Alias + }{ + DurationTarget: u.DurationTarget, + + DurationOperator: u.DurationOperator, + + DurationRange: u.DurationRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Durationcondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edge.go b/platformclientv2/edge.go index 7bdabdd6e..c4ad5ab2d 100644 --- a/platformclientv2/edge.go +++ b/platformclientv2/edge.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -173,6 +174,198 @@ type Edge struct { } +func (u *Edge) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edge + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Interfaces *[]Edgeinterface `json:"interfaces,omitempty"` + + Make *string `json:"make,omitempty"` + + Model *string `json:"model,omitempty"` + + ApiVersion *string `json:"apiVersion,omitempty"` + + SoftwareVersion *string `json:"softwareVersion,omitempty"` + + SoftwareVersionTimestamp *string `json:"softwareVersionTimestamp,omitempty"` + + SoftwareVersionPlatform *string `json:"softwareVersionPlatform,omitempty"` + + SoftwareVersionConfiguration *string `json:"softwareVersionConfiguration,omitempty"` + + FullSoftwareVersion *string `json:"fullSoftwareVersion,omitempty"` + + PairingId *string `json:"pairingId,omitempty"` + + Fingerprint *string `json:"fingerprint,omitempty"` + + FingerprintHint *string `json:"fingerprintHint,omitempty"` + + CurrentVersion *string `json:"currentVersion,omitempty"` + + StagedVersion *string `json:"stagedVersion,omitempty"` + + Patch *string `json:"patch,omitempty"` + + StatusCode *string `json:"statusCode,omitempty"` + + EdgeGroup *Edgegroup `json:"edgeGroup,omitempty"` + + Site *Site `json:"site,omitempty"` + + SoftwareStatus *Domainedgesoftwareupdatedto `json:"softwareStatus,omitempty"` + + OnlineStatus *string `json:"onlineStatus,omitempty"` + + SerialNumber *string `json:"serialNumber,omitempty"` + + PhysicalEdge *bool `json:"physicalEdge,omitempty"` + + Managed *bool `json:"managed,omitempty"` + + EdgeDeploymentType *string `json:"edgeDeploymentType,omitempty"` + + CallDrainingState *string `json:"callDrainingState,omitempty"` + + ConversationCount *int `json:"conversationCount,omitempty"` + + Proxy *string `json:"proxy,omitempty"` + + OfflineConfigCalled *bool `json:"offlineConfigCalled,omitempty"` + + OsName *string `json:"osName,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Interfaces: u.Interfaces, + + Make: u.Make, + + Model: u.Model, + + ApiVersion: u.ApiVersion, + + SoftwareVersion: u.SoftwareVersion, + + SoftwareVersionTimestamp: u.SoftwareVersionTimestamp, + + SoftwareVersionPlatform: u.SoftwareVersionPlatform, + + SoftwareVersionConfiguration: u.SoftwareVersionConfiguration, + + FullSoftwareVersion: u.FullSoftwareVersion, + + PairingId: u.PairingId, + + Fingerprint: u.Fingerprint, + + FingerprintHint: u.FingerprintHint, + + CurrentVersion: u.CurrentVersion, + + StagedVersion: u.StagedVersion, + + Patch: u.Patch, + + StatusCode: u.StatusCode, + + EdgeGroup: u.EdgeGroup, + + Site: u.Site, + + SoftwareStatus: u.SoftwareStatus, + + OnlineStatus: u.OnlineStatus, + + SerialNumber: u.SerialNumber, + + PhysicalEdge: u.PhysicalEdge, + + Managed: u.Managed, + + EdgeDeploymentType: u.EdgeDeploymentType, + + CallDrainingState: u.CallDrainingState, + + ConversationCount: u.ConversationCount, + + Proxy: u.Proxy, + + OfflineConfigCalled: u.OfflineConfigCalled, + + OsName: u.OsName, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edge) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeautoupdateconfig.go b/platformclientv2/edgeautoupdateconfig.go index 48bbe1d1f..5cdff802c 100644 --- a/platformclientv2/edgeautoupdateconfig.go +++ b/platformclientv2/edgeautoupdateconfig.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,50 @@ type Edgeautoupdateconfig struct { } +func (u *Edgeautoupdateconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeautoupdateconfig + + + Start := new(string) + if u.Start != nil { + *Start = timeutil.Strftime(u.Start, "%Y-%m-%dT%H:%M:%S.%f") + + } else { + Start = nil + } + + End := new(string) + if u.End != nil { + *End = timeutil.Strftime(u.End, "%Y-%m-%dT%H:%M:%S.%f") + + } else { + End = nil + } + + + return json.Marshal(&struct { + TimeZone *string `json:"timeZone,omitempty"` + + Rrule *string `json:"rrule,omitempty"` + + Start *string `json:"start,omitempty"` + + End *string `json:"end,omitempty"` + *Alias + }{ + TimeZone: u.TimeZone, + + Rrule: u.Rrule, + + Start: Start, + + End: End, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeautoupdateconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgechangetopicedge.go b/platformclientv2/edgechangetopicedge.go index 6acddfa44..423ebc1e4 100644 --- a/platformclientv2/edgechangetopicedge.go +++ b/platformclientv2/edgechangetopicedge.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgechangetopicedge struct { } +func (u *Edgechangetopicedge) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgechangetopicedge + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + OnlineStatus *string `json:"onlineStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + OnlineStatus: u.OnlineStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgechangetopicedge) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeconnectioninfo.go b/platformclientv2/edgeconnectioninfo.go index bddb902cc..660916e88 100644 --- a/platformclientv2/edgeconnectioninfo.go +++ b/platformclientv2/edgeconnectioninfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Edgeconnectioninfo struct { } +func (u *Edgeconnectioninfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeconnectioninfo + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + InterfaceName *string `json:"interfaceName,omitempty"` + + InterfaceIpAddress *string `json:"interfaceIpAddress,omitempty"` + + ConnectionErrors *[]string `json:"connectionErrors,omitempty"` + + Site *Addressableentityref `json:"site,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + InterfaceName: u.InterfaceName, + + InterfaceIpAddress: u.InterfaceIpAddress, + + ConnectionErrors: u.ConnectionErrors, + + Site: u.Site, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeconnectioninfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeentitylisting.go b/platformclientv2/edgeentitylisting.go index 85fae1c63..3b8408f99 100644 --- a/platformclientv2/edgeentitylisting.go +++ b/platformclientv2/edgeentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Edgeentitylisting struct { } +func (u *Edgeentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeentitylisting + + + + return json.Marshal(&struct { + Entities *[]Edge `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgegroup.go b/platformclientv2/edgegroup.go index f93386e64..ba98b0703 100644 --- a/platformclientv2/edgegroup.go +++ b/platformclientv2/edgegroup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Edgegroup struct { } +func (u *Edgegroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgegroup + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Managed *bool `json:"managed,omitempty"` + + Hybrid *bool `json:"hybrid,omitempty"` + + EdgeTrunkBaseAssignment *Trunkbaseassignment `json:"edgeTrunkBaseAssignment,omitempty"` + + PhoneTrunkBases *[]Trunkbase `json:"phoneTrunkBases,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Managed: u.Managed, + + Hybrid: u.Hybrid, + + EdgeTrunkBaseAssignment: u.EdgeTrunkBaseAssignment, + + PhoneTrunkBases: u.PhoneTrunkBases, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgegroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgegroupentitylisting.go b/platformclientv2/edgegroupentitylisting.go index 773cdbf35..dfbb5f2ce 100644 --- a/platformclientv2/edgegroupentitylisting.go +++ b/platformclientv2/edgegroupentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Edgegroupentitylisting struct { } +func (u *Edgegroupentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgegroupentitylisting + + + + return json.Marshal(&struct { + Entities *[]Edgegroup `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgegroupentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeinterface.go b/platformclientv2/edgeinterface.go index 53cd1c4e2..3324b78e8 100644 --- a/platformclientv2/edgeinterface.go +++ b/platformclientv2/edgeinterface.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Edgeinterface struct { } +func (u *Edgeinterface) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeinterface + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + IpAddress *string `json:"ipAddress,omitempty"` + + Name *string `json:"name,omitempty"` + + MacAddress *string `json:"macAddress,omitempty"` + + IfName *string `json:"ifName,omitempty"` + + Endpoints *[]Domainentityref `json:"endpoints,omitempty"` + + LineTypes *[]string `json:"lineTypes,omitempty"` + + AddressFamilyId *string `json:"addressFamilyId,omitempty"` + *Alias + }{ + VarType: u.VarType, + + IpAddress: u.IpAddress, + + Name: u.Name, + + MacAddress: u.MacAddress, + + IfName: u.IfName, + + Endpoints: u.Endpoints, + + LineTypes: u.LineTypes, + + AddressFamilyId: u.AddressFamilyId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeinterface) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeline.go b/platformclientv2/edgeline.go index 49b2067dd..7a18bd45b 100644 --- a/platformclientv2/edgeline.go +++ b/platformclientv2/edgeline.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -89,6 +90,114 @@ type Edgeline struct { } +func (u *Edgeline) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeline + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Schema *Domainentityref `json:"schema,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + Edge *Edge `json:"edge,omitempty"` + + EdgeGroup *Edgegroup `json:"edgeGroup,omitempty"` + + LineType *string `json:"lineType,omitempty"` + + Endpoint *Endpoint `json:"endpoint,omitempty"` + + IpAddress *string `json:"ipAddress,omitempty"` + + LogicalInterfaceId *string `json:"logicalInterfaceId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Schema: u.Schema, + + Properties: u.Properties, + + Edge: u.Edge, + + EdgeGroup: u.EdgeGroup, + + LineType: u.LineType, + + Endpoint: u.Endpoint, + + IpAddress: u.IpAddress, + + LogicalInterfaceId: u.LogicalInterfaceId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeline) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelineentitylisting.go b/platformclientv2/edgelineentitylisting.go index 79e86719a..2d7fd541f 100644 --- a/platformclientv2/edgelineentitylisting.go +++ b/platformclientv2/edgelineentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Edgelineentitylisting struct { } +func (u *Edgelineentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelineentitylisting + + + + return json.Marshal(&struct { + Entities *[]Edgeline `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelineentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelogicalinterfaceschangetopicdomainlogicalinterfacechange.go b/platformclientv2/edgelogicalinterfaceschangetopicdomainlogicalinterfacechange.go index 3e95b03e5..00158fe62 100644 --- a/platformclientv2/edgelogicalinterfaceschangetopicdomainlogicalinterfacechange.go +++ b/platformclientv2/edgelogicalinterfaceschangetopicdomainlogicalinterfacechange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgelogicalinterfaceschangetopicdomainlogicalinterfacechange struct { } +func (u *Edgelogicalinterfaceschangetopicdomainlogicalinterfacechange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelogicalinterfaceschangetopicdomainlogicalinterfacechange + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ErrorInfo *Edgelogicalinterfaceschangetopicerrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + Id: u.Id, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelogicalinterfaceschangetopicdomainlogicalinterfacechange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelogicalinterfaceschangetopicerrorinfo.go b/platformclientv2/edgelogicalinterfaceschangetopicerrorinfo.go index 707e9d726..73b955647 100644 --- a/platformclientv2/edgelogicalinterfaceschangetopicerrorinfo.go +++ b/platformclientv2/edgelogicalinterfaceschangetopicerrorinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Edgelogicalinterfaceschangetopicerrorinfo struct { } +func (u *Edgelogicalinterfaceschangetopicerrorinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelogicalinterfaceschangetopicerrorinfo + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + Code *string `json:"code,omitempty"` + *Alias + }{ + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + Code: u.Code, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelogicalinterfaceschangetopicerrorinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelogsjob.go b/platformclientv2/edgelogsjob.go index 0dbbfd423..34e5ca9b8 100644 --- a/platformclientv2/edgelogsjob.go +++ b/platformclientv2/edgelogsjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Edgelogsjob struct { } +func (u *Edgelogsjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelogsjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Files *[]Edgelogsjobfile `json:"files,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Files: u.Files, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelogsjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelogsjobfile.go b/platformclientv2/edgelogsjobfile.go index 99e30430e..b9077fc4b 100644 --- a/platformclientv2/edgelogsjobfile.go +++ b/platformclientv2/edgelogsjobfile.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,122 @@ type Edgelogsjobfile struct { } +func (u *Edgelogsjobfile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelogsjobfile + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + TimeCreated := new(string) + if u.TimeCreated != nil { + + *TimeCreated = timeutil.Strftime(u.TimeCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + TimeCreated = nil + } + + TimeModified := new(string) + if u.TimeModified != nil { + + *TimeModified = timeutil.Strftime(u.TimeModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + TimeModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + TimeCreated *string `json:"timeCreated,omitempty"` + + TimeModified *string `json:"timeModified,omitempty"` + + SizeBytes *float64 `json:"sizeBytes,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + + EdgePath *string `json:"edgePath,omitempty"` + + DownloadId *string `json:"downloadId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + TimeCreated: TimeCreated, + + TimeModified: TimeModified, + + SizeBytes: u.SizeBytes, + + UploadStatus: u.UploadStatus, + + EdgePath: u.EdgePath, + + DownloadId: u.DownloadId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelogsjobfile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelogsjobrequest.go b/platformclientv2/edgelogsjobrequest.go index 4c59dc857..f08bad213 100644 --- a/platformclientv2/edgelogsjobrequest.go +++ b/platformclientv2/edgelogsjobrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Edgelogsjobrequest struct { } +func (u *Edgelogsjobrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelogsjobrequest + + + + return json.Marshal(&struct { + Path *string `json:"path,omitempty"` + + Query *string `json:"query,omitempty"` + + Recurse *bool `json:"recurse,omitempty"` + *Alias + }{ + Path: u.Path, + + Query: u.Query, + + Recurse: u.Recurse, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelogsjobrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelogsjobresponse.go b/platformclientv2/edgelogsjobresponse.go index 655b3cd8b..81fdff165 100644 --- a/platformclientv2/edgelogsjobresponse.go +++ b/platformclientv2/edgelogsjobresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Edgelogsjobresponse struct { } +func (u *Edgelogsjobresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelogsjobresponse + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelogsjobresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgelogsjobuploadrequest.go b/platformclientv2/edgelogsjobuploadrequest.go index 5410c5061..bbaa5aaaf 100644 --- a/platformclientv2/edgelogsjobuploadrequest.go +++ b/platformclientv2/edgelogsjobuploadrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Edgelogsjobuploadrequest struct { } +func (u *Edgelogsjobuploadrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgelogsjobuploadrequest + + + + return json.Marshal(&struct { + FileIds *[]string `json:"fileIds,omitempty"` + *Alias + }{ + FileIds: u.FileIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgelogsjobuploadrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetrics.go b/platformclientv2/edgemetrics.go index 344b28154..7a79eb130 100644 --- a/platformclientv2/edgemetrics.go +++ b/platformclientv2/edgemetrics.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Edgemetrics struct { } +func (u *Edgemetrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetrics + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + + return json.Marshal(&struct { + Edge *Domainentityref `json:"edge,omitempty"` + + EventTime *string `json:"eventTime,omitempty"` + + UpTimeMsec *int `json:"upTimeMsec,omitempty"` + + Processors *[]Edgemetricsprocessor `json:"processors,omitempty"` + + Memory *[]Edgemetricsmemory `json:"memory,omitempty"` + + Disks *[]Edgemetricsdisk `json:"disks,omitempty"` + + Subsystems *[]Edgemetricssubsystem `json:"subsystems,omitempty"` + + Networks *[]Edgemetricsnetwork `json:"networks,omitempty"` + *Alias + }{ + Edge: u.Edge, + + EventTime: EventTime, + + UpTimeMsec: u.UpTimeMsec, + + Processors: u.Processors, + + Memory: u.Memory, + + Disks: u.Disks, + + Subsystems: u.Subsystems, + + Networks: u.Networks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricsdisk.go b/platformclientv2/edgemetricsdisk.go index 684f0a9c1..f7d71784f 100644 --- a/platformclientv2/edgemetricsdisk.go +++ b/platformclientv2/edgemetricsdisk.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Edgemetricsdisk struct { } +func (u *Edgemetricsdisk) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricsdisk + + + + return json.Marshal(&struct { + AvailableBytes *float64 `json:"availableBytes,omitempty"` + + PartitionName *string `json:"partitionName,omitempty"` + + TotalBytes *float64 `json:"totalBytes,omitempty"` + *Alias + }{ + AvailableBytes: u.AvailableBytes, + + PartitionName: u.PartitionName, + + TotalBytes: u.TotalBytes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricsdisk) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricsmemory.go b/platformclientv2/edgemetricsmemory.go index 645247bb3..ae8f24019 100644 --- a/platformclientv2/edgemetricsmemory.go +++ b/platformclientv2/edgemetricsmemory.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Edgemetricsmemory struct { } +func (u *Edgemetricsmemory) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricsmemory + + + + return json.Marshal(&struct { + AvailableBytes *float64 `json:"availableBytes,omitempty"` + + VarType *string `json:"type,omitempty"` + + TotalBytes *float64 `json:"totalBytes,omitempty"` + *Alias + }{ + AvailableBytes: u.AvailableBytes, + + VarType: u.VarType, + + TotalBytes: u.TotalBytes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricsmemory) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricsnetwork.go b/platformclientv2/edgemetricsnetwork.go index 95669fab5..a3eb23dd8 100644 --- a/platformclientv2/edgemetricsnetwork.go +++ b/platformclientv2/edgemetricsnetwork.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Edgemetricsnetwork struct { } +func (u *Edgemetricsnetwork) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricsnetwork + + + + return json.Marshal(&struct { + Ifname *string `json:"ifname,omitempty"` + + SentBytesPerSec *int `json:"sentBytesPerSec,omitempty"` + + ReceivedBytesPerSec *int `json:"receivedBytesPerSec,omitempty"` + + BandwidthBitsPerSec *float64 `json:"bandwidthBitsPerSec,omitempty"` + + UtilizationPct *float64 `json:"utilizationPct,omitempty"` + *Alias + }{ + Ifname: u.Ifname, + + SentBytesPerSec: u.SentBytesPerSec, + + ReceivedBytesPerSec: u.ReceivedBytesPerSec, + + BandwidthBitsPerSec: u.BandwidthBitsPerSec, + + UtilizationPct: u.UtilizationPct, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricsnetwork) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricsprocessor.go b/platformclientv2/edgemetricsprocessor.go index a06f882f6..09fcd55e4 100644 --- a/platformclientv2/edgemetricsprocessor.go +++ b/platformclientv2/edgemetricsprocessor.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Edgemetricsprocessor struct { } +func (u *Edgemetricsprocessor) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricsprocessor + + + + return json.Marshal(&struct { + ActiveTimePct *float64 `json:"activeTimePct,omitempty"` + + CpuId *string `json:"cpuId,omitempty"` + + IdleTimePct *float64 `json:"idleTimePct,omitempty"` + + PrivilegedTimePct *float64 `json:"privilegedTimePct,omitempty"` + + UserTimePct *float64 `json:"userTimePct,omitempty"` + *Alias + }{ + ActiveTimePct: u.ActiveTimePct, + + CpuId: u.CpuId, + + IdleTimePct: u.IdleTimePct, + + PrivilegedTimePct: u.PrivilegedTimePct, + + UserTimePct: u.UserTimePct, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricsprocessor) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricssubsystem.go b/platformclientv2/edgemetricssubsystem.go index a2b8d0fa0..46c3018b6 100644 --- a/platformclientv2/edgemetricssubsystem.go +++ b/platformclientv2/edgemetricssubsystem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Edgemetricssubsystem struct { } +func (u *Edgemetricssubsystem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricssubsystem + + + + return json.Marshal(&struct { + DelayMs *int `json:"delayMs,omitempty"` + + ProcessName *string `json:"processName,omitempty"` + + MediaSubsystem **Edgemetricssubsystem `json:"mediaSubsystem,omitempty"` + *Alias + }{ + DelayMs: u.DelayMs, + + ProcessName: u.ProcessName, + + MediaSubsystem: u.MediaSubsystem, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricssubsystem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicedgemetricdisk.go b/platformclientv2/edgemetricstopicedgemetricdisk.go index 4c366b0c7..a6763f260 100644 --- a/platformclientv2/edgemetricstopicedgemetricdisk.go +++ b/platformclientv2/edgemetricstopicedgemetricdisk.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Edgemetricstopicedgemetricdisk struct { } +func (u *Edgemetricstopicedgemetricdisk) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicedgemetricdisk + + + + return json.Marshal(&struct { + PartitionName *string `json:"partitionName,omitempty"` + + AvailableBytes *int `json:"availableBytes,omitempty"` + + TotalBytes *int `json:"totalBytes,omitempty"` + *Alias + }{ + PartitionName: u.PartitionName, + + AvailableBytes: u.AvailableBytes, + + TotalBytes: u.TotalBytes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicedgemetricdisk) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicedgemetricmemory.go b/platformclientv2/edgemetricstopicedgemetricmemory.go index 6714e3a25..2b571ec99 100644 --- a/platformclientv2/edgemetricstopicedgemetricmemory.go +++ b/platformclientv2/edgemetricstopicedgemetricmemory.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Edgemetricstopicedgemetricmemory struct { } +func (u *Edgemetricstopicedgemetricmemory) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicedgemetricmemory + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + AvailableBytes *int `json:"availableBytes,omitempty"` + + TotalBytes *int `json:"totalBytes,omitempty"` + *Alias + }{ + VarType: u.VarType, + + AvailableBytes: u.AvailableBytes, + + TotalBytes: u.TotalBytes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicedgemetricmemory) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicedgemetricnetworks.go b/platformclientv2/edgemetricstopicedgemetricnetworks.go index 7ac8f2ae8..6ad405a3a 100644 --- a/platformclientv2/edgemetricstopicedgemetricnetworks.go +++ b/platformclientv2/edgemetricstopicedgemetricnetworks.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Edgemetricstopicedgemetricnetworks struct { } +func (u *Edgemetricstopicedgemetricnetworks) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicedgemetricnetworks + + + + return json.Marshal(&struct { + Ifname *string `json:"ifname,omitempty"` + + SentBytesPerSec *int `json:"sentBytesPerSec,omitempty"` + + ReceivedBytesPerSec *int `json:"receivedBytesPerSec,omitempty"` + + BandwidthBitsPerSec *int `json:"bandwidthBitsPerSec,omitempty"` + + UtilizationPct *float32 `json:"utilizationPct,omitempty"` + *Alias + }{ + Ifname: u.Ifname, + + SentBytesPerSec: u.SentBytesPerSec, + + ReceivedBytesPerSec: u.ReceivedBytesPerSec, + + BandwidthBitsPerSec: u.BandwidthBitsPerSec, + + UtilizationPct: u.UtilizationPct, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicedgemetricnetworks) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicedgemetricprocessor.go b/platformclientv2/edgemetricstopicedgemetricprocessor.go index 8b7b29404..bdd23e88a 100644 --- a/platformclientv2/edgemetricstopicedgemetricprocessor.go +++ b/platformclientv2/edgemetricstopicedgemetricprocessor.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Edgemetricstopicedgemetricprocessor struct { } +func (u *Edgemetricstopicedgemetricprocessor) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicedgemetricprocessor + + + + return json.Marshal(&struct { + CpuId *string `json:"cpuId,omitempty"` + + IdleTimePct *int `json:"idleTimePct,omitempty"` + + ActiveTimePct *int `json:"activeTimePct,omitempty"` + + PrivilegedTimePct *int `json:"privilegedTimePct,omitempty"` + + UserTimePct *int `json:"userTimePct,omitempty"` + *Alias + }{ + CpuId: u.CpuId, + + IdleTimePct: u.IdleTimePct, + + ActiveTimePct: u.ActiveTimePct, + + PrivilegedTimePct: u.PrivilegedTimePct, + + UserTimePct: u.UserTimePct, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicedgemetricprocessor) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicedgemetrics.go b/platformclientv2/edgemetricstopicedgemetrics.go index 23fb3ff1f..e1be20732 100644 --- a/platformclientv2/edgemetricstopicedgemetrics.go +++ b/platformclientv2/edgemetricstopicedgemetrics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Edgemetricstopicedgemetrics struct { } +func (u *Edgemetricstopicedgemetrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicedgemetrics + + + + return json.Marshal(&struct { + Edge *Edgemetricstopicurireference `json:"edge,omitempty"` + + UpTimeMsec *int `json:"upTimeMsec,omitempty"` + + Processors *[]Edgemetricstopicedgemetricprocessor `json:"processors,omitempty"` + + Memory *[]Edgemetricstopicedgemetricmemory `json:"memory,omitempty"` + + Disks *[]Edgemetricstopicedgemetricdisk `json:"disks,omitempty"` + + Subsystems *[]Edgemetricstopicedgemetricsubsystem `json:"subsystems,omitempty"` + + Networks *[]Edgemetricstopicedgemetricnetworks `json:"networks,omitempty"` + *Alias + }{ + Edge: u.Edge, + + UpTimeMsec: u.UpTimeMsec, + + Processors: u.Processors, + + Memory: u.Memory, + + Disks: u.Disks, + + Subsystems: u.Subsystems, + + Networks: u.Networks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicedgemetrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicedgemetricsubsystem.go b/platformclientv2/edgemetricstopicedgemetricsubsystem.go index c0e30e402..e680b75fe 100644 --- a/platformclientv2/edgemetricstopicedgemetricsubsystem.go +++ b/platformclientv2/edgemetricstopicedgemetricsubsystem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Edgemetricstopicedgemetricsubsystem struct { } +func (u *Edgemetricstopicedgemetricsubsystem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicedgemetricsubsystem + + + + return json.Marshal(&struct { + ProcessName *string `json:"processName,omitempty"` + + DelayMs *int `json:"delayMs,omitempty"` + + MediaSubsystem *Edgemetricstopicedgemetricsubsystemmedia `json:"mediaSubsystem,omitempty"` + *Alias + }{ + ProcessName: u.ProcessName, + + DelayMs: u.DelayMs, + + MediaSubsystem: u.MediaSubsystem, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicedgemetricsubsystem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicedgemetricsubsystemmedia.go b/platformclientv2/edgemetricstopicedgemetricsubsystemmedia.go index aebb38257..9240d2eb5 100644 --- a/platformclientv2/edgemetricstopicedgemetricsubsystemmedia.go +++ b/platformclientv2/edgemetricstopicedgemetricsubsystemmedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgemetricstopicedgemetricsubsystemmedia struct { } +func (u *Edgemetricstopicedgemetricsubsystemmedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicedgemetricsubsystemmedia + + + + return json.Marshal(&struct { + ProcessName *string `json:"processName,omitempty"` + + DelayMs *int `json:"delayMs,omitempty"` + *Alias + }{ + ProcessName: u.ProcessName, + + DelayMs: u.DelayMs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicedgemetricsubsystemmedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgemetricstopicurireference.go b/platformclientv2/edgemetricstopicurireference.go index e39367d32..b99ac5739 100644 --- a/platformclientv2/edgemetricstopicurireference.go +++ b/platformclientv2/edgemetricstopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgemetricstopicurireference struct { } +func (u *Edgemetricstopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgemetricstopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgemetricstopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgenetworkdiagnostic.go b/platformclientv2/edgenetworkdiagnostic.go index 44de06ee7..5dc459b91 100644 --- a/platformclientv2/edgenetworkdiagnostic.go +++ b/platformclientv2/edgenetworkdiagnostic.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgenetworkdiagnostic struct { } +func (u *Edgenetworkdiagnostic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgenetworkdiagnostic + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgenetworkdiagnostic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgenetworkdiagnosticrequest.go b/platformclientv2/edgenetworkdiagnosticrequest.go index 81016cbb6..1b2162cd5 100644 --- a/platformclientv2/edgenetworkdiagnosticrequest.go +++ b/platformclientv2/edgenetworkdiagnosticrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Edgenetworkdiagnosticrequest struct { } +func (u *Edgenetworkdiagnosticrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgenetworkdiagnosticrequest + + + + return json.Marshal(&struct { + Host *string `json:"host,omitempty"` + *Alias + }{ + Host: u.Host, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgenetworkdiagnosticrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgenetworkdiagnosticresponse.go b/platformclientv2/edgenetworkdiagnosticresponse.go index de0cfca01..15bae2780 100644 --- a/platformclientv2/edgenetworkdiagnosticresponse.go +++ b/platformclientv2/edgenetworkdiagnosticresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgenetworkdiagnosticresponse struct { } +func (u *Edgenetworkdiagnosticresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgenetworkdiagnosticresponse + + + + return json.Marshal(&struct { + CommandCorrelationId *string `json:"commandCorrelationId,omitempty"` + + Diagnostics *string `json:"diagnostics,omitempty"` + *Alias + }{ + CommandCorrelationId: u.CommandCorrelationId, + + Diagnostics: u.Diagnostics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgenetworkdiagnosticresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgerebootparameters.go b/platformclientv2/edgerebootparameters.go index 299d5a906..b3527926f 100644 --- a/platformclientv2/edgerebootparameters.go +++ b/platformclientv2/edgerebootparameters.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Edgerebootparameters struct { } +func (u *Edgerebootparameters) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgerebootparameters + + + + return json.Marshal(&struct { + CallDrainingWaitTimeSeconds *int `json:"callDrainingWaitTimeSeconds,omitempty"` + *Alias + }{ + CallDrainingWaitTimeSeconds: u.CallDrainingWaitTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgerebootparameters) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeservicestaterequest.go b/platformclientv2/edgeservicestaterequest.go index 6bc5f6845..5dfe9a8fa 100644 --- a/platformclientv2/edgeservicestaterequest.go +++ b/platformclientv2/edgeservicestaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgeservicestaterequest struct { } +func (u *Edgeservicestaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeservicestaterequest + + + + return json.Marshal(&struct { + InService *bool `json:"inService,omitempty"` + + CallDrainingWaitTimeSeconds *int `json:"callDrainingWaitTimeSeconds,omitempty"` + *Alias + }{ + InService: u.InService, + + CallDrainingWaitTimeSeconds: u.CallDrainingWaitTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeservicestaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgesoftwareupdatetopicdomainedgesoftwareupdate.go b/platformclientv2/edgesoftwareupdatetopicdomainedgesoftwareupdate.go index 5381bafc8..57440b49b 100644 --- a/platformclientv2/edgesoftwareupdatetopicdomainedgesoftwareupdate.go +++ b/platformclientv2/edgesoftwareupdatetopicdomainedgesoftwareupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,62 @@ type Edgesoftwareupdatetopicdomainedgesoftwareupdate struct { } +func (u *Edgesoftwareupdatetopicdomainedgesoftwareupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgesoftwareupdatetopicdomainedgesoftwareupdate + + + DownloadStartTime := new(string) + if u.DownloadStartTime != nil { + + *DownloadStartTime = timeutil.Strftime(u.DownloadStartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DownloadStartTime = nil + } + + ExecuteStartTime := new(string) + if u.ExecuteStartTime != nil { + + *ExecuteStartTime = timeutil.Strftime(u.ExecuteStartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExecuteStartTime = nil + } + + ExecuteStopTime := new(string) + if u.ExecuteStopTime != nil { + + *ExecuteStopTime = timeutil.Strftime(u.ExecuteStopTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExecuteStopTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Status *string `json:"status,omitempty"` + + DownloadStartTime *string `json:"downloadStartTime,omitempty"` + + ExecuteStartTime *string `json:"executeStartTime,omitempty"` + + ExecuteStopTime *string `json:"executeStopTime,omitempty"` + *Alias + }{ + Id: u.Id, + + Status: u.Status, + + DownloadStartTime: DownloadStartTime, + + ExecuteStartTime: ExecuteStartTime, + + ExecuteStopTime: ExecuteStopTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgesoftwareupdatetopicdomainedgesoftwareupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgetrunkbase.go b/platformclientv2/edgetrunkbase.go index 923b0dede..280266112 100644 --- a/platformclientv2/edgetrunkbase.go +++ b/platformclientv2/edgetrunkbase.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Edgetrunkbase struct { } +func (u *Edgetrunkbase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgetrunkbase + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + TrunkMetabase *Domainentityref `json:"trunkMetabase,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + TrunkType *string `json:"trunkType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + TrunkMetabase: u.TrunkMetabase, + + Properties: u.Properties, + + TrunkType: u.TrunkType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgetrunkbase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeversioninformation.go b/platformclientv2/edgeversioninformation.go index a0f70aed9..7846a4ad1 100644 --- a/platformclientv2/edgeversioninformation.go +++ b/platformclientv2/edgeversioninformation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Edgeversioninformation struct { } +func (u *Edgeversioninformation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeversioninformation + + + + return json.Marshal(&struct { + SoftwareVersion *string `json:"softwareVersion,omitempty"` + *Alias + }{ + SoftwareVersion: u.SoftwareVersion, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeversioninformation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/edgeversionreport.go b/platformclientv2/edgeversionreport.go index adf72511a..f3ef3e474 100644 --- a/platformclientv2/edgeversionreport.go +++ b/platformclientv2/edgeversionreport.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Edgeversionreport struct { } +func (u *Edgeversionreport) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Edgeversionreport + + + + return json.Marshal(&struct { + OldestVersion *Edgeversioninformation `json:"oldestVersion,omitempty"` + + NewestVersion *Edgeversioninformation `json:"newestVersion,omitempty"` + *Alias + }{ + OldestVersion: u.OldestVersion, + + NewestVersion: u.NewestVersion, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Edgeversionreport) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/education.go b/platformclientv2/education.go index a40982d6b..4f67dac1c 100644 --- a/platformclientv2/education.go +++ b/platformclientv2/education.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,52 @@ type Education struct { } +func (u *Education) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Education + + + DateStart := new(string) + if u.DateStart != nil { + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%d") + } else { + DateStart = nil + } + + DateEnd := new(string) + if u.DateEnd != nil { + *DateEnd = timeutil.Strftime(u.DateEnd, "%Y-%m-%d") + } else { + DateEnd = nil + } + + + return json.Marshal(&struct { + School *string `json:"school,omitempty"` + + FieldOfStudy *string `json:"fieldOfStudy,omitempty"` + + Notes *string `json:"notes,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + DateEnd *string `json:"dateEnd,omitempty"` + *Alias + }{ + School: u.School, + + FieldOfStudy: u.FieldOfStudy, + + Notes: u.Notes, + + DateStart: DateStart, + + DateEnd: DateEnd, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Education) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/effectiveconfiguration.go b/platformclientv2/effectiveconfiguration.go index 9dd1bddc0..2a3959127 100644 --- a/platformclientv2/effectiveconfiguration.go +++ b/platformclientv2/effectiveconfiguration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Effectiveconfiguration struct { } +func (u *Effectiveconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Effectiveconfiguration + + + + return json.Marshal(&struct { + Properties *map[string]interface{} `json:"properties,omitempty"` + + Advanced *map[string]interface{} `json:"advanced,omitempty"` + + Name *string `json:"name,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Credentials *map[string]Credentialinfo `json:"credentials,omitempty"` + *Alias + }{ + Properties: u.Properties, + + Advanced: u.Advanced, + + Name: u.Name, + + Notes: u.Notes, + + Credentials: u.Credentials, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Effectiveconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/email.go b/platformclientv2/email.go index e598c34ad..6d8b48c92 100644 --- a/platformclientv2/email.go +++ b/platformclientv2/email.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -105,6 +106,146 @@ type Email struct { } +func (u *Email) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Email + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Held *bool `json:"held,omitempty"` + + Subject *string `json:"subject,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Direction *string `json:"direction,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + ErrorInfo *Errorbody `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + DraftAttachments *[]Attachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Held: u.Held, + + Subject: u.Subject, + + MessagesSent: u.MessagesSent, + + Segments: u.Segments, + + Direction: u.Direction, + + RecordingId: u.RecordingId, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + AutoGenerated: u.AutoGenerated, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + MessageId: u.MessageId, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Email) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailaddress.go b/platformclientv2/emailaddress.go index 3cc4bdc9e..5bd89c3e9 100644 --- a/platformclientv2/emailaddress.go +++ b/platformclientv2/emailaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Emailaddress struct { } +func (u *Emailaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailaddress + + + + return json.Marshal(&struct { + Email *string `json:"email,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Email: u.Email, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailattachment.go b/platformclientv2/emailattachment.go index ec0921d95..5c4ea3bce 100644 --- a/platformclientv2/emailattachment.go +++ b/platformclientv2/emailattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Emailattachment struct { } +func (u *Emailattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailattachment + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + ContentPath *string `json:"contentPath,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + AttachmentId *string `json:"attachmentId,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + *Alias + }{ + Name: u.Name, + + ContentPath: u.ContentPath, + + ContentType: u.ContentType, + + AttachmentId: u.AttachmentId, + + ContentLength: u.ContentLength, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailcolumn.go b/platformclientv2/emailcolumn.go index a63923e8e..da36d13b0 100644 --- a/platformclientv2/emailcolumn.go +++ b/platformclientv2/emailcolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Emailcolumn struct { } +func (u *Emailcolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailcolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailcolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailconfig.go b/platformclientv2/emailconfig.go index 2d5d8de7b..c54145419 100644 --- a/platformclientv2/emailconfig.go +++ b/platformclientv2/emailconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Emailconfig struct { } +func (u *Emailconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailconfig + + + + return json.Marshal(&struct { + EmailColumns *[]string `json:"emailColumns,omitempty"` + + ContentTemplate *Domainentityref `json:"contentTemplate,omitempty"` + + FromAddress *Fromemailaddress `json:"fromAddress,omitempty"` + + ReplyToAddress *Replytoemailaddress `json:"replyToAddress,omitempty"` + *Alias + }{ + EmailColumns: u.EmailColumns, + + ContentTemplate: u.ContentTemplate, + + FromAddress: u.FromAddress, + + ReplyToAddress: u.ReplyToAddress, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailconversation.go b/platformclientv2/emailconversation.go index 5db2ee8b4..6a1177b3b 100644 --- a/platformclientv2/emailconversation.go +++ b/platformclientv2/emailconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Emailconversation struct { } +func (u *Emailconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Emailmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailconversationentitylisting.go b/platformclientv2/emailconversationentitylisting.go index 8383af422..3dc2155a7 100644 --- a/platformclientv2/emailconversationentitylisting.go +++ b/platformclientv2/emailconversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Emailconversationentitylisting struct { } +func (u *Emailconversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailconversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Emailconversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailconversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailmediaparticipant.go b/platformclientv2/emailmediaparticipant.go index f50e841b2..abbebf8c2 100644 --- a/platformclientv2/emailmediaparticipant.go +++ b/platformclientv2/emailmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -165,6 +166,222 @@ type Emailmediaparticipant struct { } +func (u *Emailmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Team *Domainentityref `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Domainentityref `json:"externalContact,omitempty"` + + ExternalOrganization *Domainentityref `json:"externalOrganization,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + Peer *string `json:"peer,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Subject *string `json:"subject,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + DraftAttachments *[]Attachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + Peer: u.Peer, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + ConversationRoutingData: u.ConversationRoutingData, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Subject: u.Subject, + + MessagesSent: u.MessagesSent, + + AutoGenerated: u.AutoGenerated, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + + MessageId: u.MessageId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailmediapolicy.go b/platformclientv2/emailmediapolicy.go index 7d87fdb6a..ac003d7d6 100644 --- a/platformclientv2/emailmediapolicy.go +++ b/platformclientv2/emailmediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Emailmediapolicy struct { } +func (u *Emailmediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailmediapolicy + + + + return json.Marshal(&struct { + Actions *Policyactions `json:"actions,omitempty"` + + Conditions *Emailmediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailmediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailmediapolicyconditions.go b/platformclientv2/emailmediapolicyconditions.go index f40867ce8..af254e036 100644 --- a/platformclientv2/emailmediapolicyconditions.go +++ b/platformclientv2/emailmediapolicyconditions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Emailmediapolicyconditions struct { } +func (u *Emailmediapolicyconditions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailmediapolicyconditions + + + + return json.Marshal(&struct { + ForUsers *[]User `json:"forUsers,omitempty"` + + DateRanges *[]string `json:"dateRanges,omitempty"` + + ForQueues *[]Queue `json:"forQueues,omitempty"` + + WrapupCodes *[]Wrapupcode `json:"wrapupCodes,omitempty"` + + Languages *[]Language `json:"languages,omitempty"` + + TimeAllowed *Timeallowed `json:"timeAllowed,omitempty"` + *Alias + }{ + ForUsers: u.ForUsers, + + DateRanges: u.DateRanges, + + ForQueues: u.ForQueues, + + WrapupCodes: u.WrapupCodes, + + Languages: u.Languages, + + TimeAllowed: u.TimeAllowed, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailmediapolicyconditions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailmessage.go b/platformclientv2/emailmessage.go index aab1eea16..74e4605a0 100644 --- a/platformclientv2/emailmessage.go +++ b/platformclientv2/emailmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,82 @@ type Emailmessage struct { } +func (u *Emailmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailmessage + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + To *[]Emailaddress `json:"to,omitempty"` + + Cc *[]Emailaddress `json:"cc,omitempty"` + + Bcc *[]Emailaddress `json:"bcc,omitempty"` + + From *Emailaddress `json:"from,omitempty"` + + ReplyTo *Emailaddress `json:"replyTo,omitempty"` + + Subject *string `json:"subject,omitempty"` + + Attachments *[]Attachment `json:"attachments,omitempty"` + + TextBody *string `json:"textBody,omitempty"` + + HtmlBody *string `json:"htmlBody,omitempty"` + + Time *string `json:"time,omitempty"` + + HistoryIncluded *bool `json:"historyIncluded,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + To: u.To, + + Cc: u.Cc, + + Bcc: u.Bcc, + + From: u.From, + + ReplyTo: u.ReplyTo, + + Subject: u.Subject, + + Attachments: u.Attachments, + + TextBody: u.TextBody, + + HtmlBody: u.HtmlBody, + + Time: Time, + + HistoryIncluded: u.HistoryIncluded, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailmessagelisting.go b/platformclientv2/emailmessagelisting.go index edcc0f6c4..f6c3f8deb 100644 --- a/platformclientv2/emailmessagelisting.go +++ b/platformclientv2/emailmessagelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Emailmessagelisting struct { } +func (u *Emailmessagelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailmessagelisting + + + + return json.Marshal(&struct { + Entities *[]Emailmessage `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailmessagelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emailsetup.go b/platformclientv2/emailsetup.go index 342abe65f..419bb4ce8 100644 --- a/platformclientv2/emailsetup.go +++ b/platformclientv2/emailsetup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Emailsetup struct { } +func (u *Emailsetup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emailsetup + + + + return json.Marshal(&struct { + RootDomain *string `json:"rootDomain,omitempty"` + *Alias + }{ + RootDomain: u.RootDomain, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emailsetup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/embeddedintegration.go b/platformclientv2/embeddedintegration.go index 56f65ae8a..d606ae0e3 100644 --- a/platformclientv2/embeddedintegration.go +++ b/platformclientv2/embeddedintegration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Embeddedintegration struct { } +func (u *Embeddedintegration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Embeddedintegration + + + + return json.Marshal(&struct { + EnableWhitelist *bool `json:"enableWhitelist,omitempty"` + + DomainWhitelist *[]string `json:"domainWhitelist,omitempty"` + *Alias + }{ + EnableWhitelist: u.EnableWhitelist, + + DomainWhitelist: u.DomainWhitelist, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Embeddedintegration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emergencycallflow.go b/platformclientv2/emergencycallflow.go index c858158df..876f9d435 100644 --- a/platformclientv2/emergencycallflow.go +++ b/platformclientv2/emergencycallflow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Emergencycallflow struct { } +func (u *Emergencycallflow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emergencycallflow + + + + return json.Marshal(&struct { + EmergencyFlow *Domainentityref `json:"emergencyFlow,omitempty"` + + Ivrs *[]Domainentityref `json:"ivrs,omitempty"` + *Alias + }{ + EmergencyFlow: u.EmergencyFlow, + + Ivrs: u.Ivrs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emergencycallflow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emergencygroup.go b/platformclientv2/emergencygroup.go index 5cd65cb98..c44899790 100644 --- a/platformclientv2/emergencygroup.go +++ b/platformclientv2/emergencygroup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Emergencygroup struct { } +func (u *Emergencygroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emergencygroup + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + EmergencyCallFlows *[]Emergencycallflow `json:"emergencyCallFlows,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Enabled: u.Enabled, + + EmergencyCallFlows: u.EmergencyCallFlows, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emergencygroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/emergencygrouplisting.go b/platformclientv2/emergencygrouplisting.go index 61a519f67..efdfac12e 100644 --- a/platformclientv2/emergencygrouplisting.go +++ b/platformclientv2/emergencygrouplisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Emergencygrouplisting struct { } +func (u *Emergencygrouplisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Emergencygrouplisting + + + + return json.Marshal(&struct { + Entities *[]Emergencygroup `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Emergencygrouplisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/employerinfo.go b/platformclientv2/employerinfo.go index 5748ddd74..ce114e920 100644 --- a/platformclientv2/employerinfo.go +++ b/platformclientv2/employerinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Employerinfo struct { } +func (u *Employerinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Employerinfo + + + + return json.Marshal(&struct { + OfficialName *string `json:"officialName,omitempty"` + + EmployeeId *string `json:"employeeId,omitempty"` + + EmployeeType *string `json:"employeeType,omitempty"` + + DateHire *string `json:"dateHire,omitempty"` + *Alias + }{ + OfficialName: u.OfficialName, + + EmployeeId: u.EmployeeId, + + EmployeeType: u.EmployeeType, + + DateHire: u.DateHire, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Employerinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/empty.go b/platformclientv2/empty.go index 6c5dfe631..0806e7464 100644 --- a/platformclientv2/empty.go +++ b/platformclientv2/empty.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Empty type Empty struct { } +func (u *Empty) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Empty + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Empty) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/encryptionkey.go b/platformclientv2/encryptionkey.go index d08f8cc45..5e7ad2fce 100644 --- a/platformclientv2/encryptionkey.go +++ b/platformclientv2/encryptionkey.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Encryptionkey struct { } +func (u *Encryptionkey) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Encryptionkey + + + CreateDate := new(string) + if u.CreateDate != nil { + + *CreateDate = timeutil.Strftime(u.CreateDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreateDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CreateDate *string `json:"createDate,omitempty"` + + KeydataSummary *string `json:"keydataSummary,omitempty"` + + User *User `json:"user,omitempty"` + + LocalEncryptionConfiguration *Localencryptionconfiguration `json:"localEncryptionConfiguration,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CreateDate: CreateDate, + + KeydataSummary: u.KeydataSummary, + + User: u.User, + + LocalEncryptionConfiguration: u.LocalEncryptionConfiguration, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Encryptionkey) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/encryptionkeyentitylisting.go b/platformclientv2/encryptionkeyentitylisting.go index 1c621ec3c..df697e1f9 100644 --- a/platformclientv2/encryptionkeyentitylisting.go +++ b/platformclientv2/encryptionkeyentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Encryptionkeyentitylisting struct { } +func (u *Encryptionkeyentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Encryptionkeyentitylisting + + + + return json.Marshal(&struct { + Entities *[]Encryptionkey `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Encryptionkeyentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/endpoint.go b/platformclientv2/endpoint.go index 4cb312650..25e524d16 100644 --- a/platformclientv2/endpoint.go +++ b/platformclientv2/endpoint.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Endpoint struct { } +func (u *Endpoint) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Endpoint + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Count *int `json:"count,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + Schema *Domainentityref `json:"schema,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Site *Domainentityref `json:"site,omitempty"` + + Dids *[]string `json:"dids,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Count: u.Count, + + Properties: u.Properties, + + Schema: u.Schema, + + Enabled: u.Enabled, + + Site: u.Site, + + Dids: u.Dids, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Endpoint) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/entity.go b/platformclientv2/entity.go index 5d13e0e64..c94774d88 100644 --- a/platformclientv2/entity.go +++ b/platformclientv2/entity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Entity struct { } +func (u *Entity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Entity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Entity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/entitytypecriteria.go b/platformclientv2/entitytypecriteria.go index 2f0a54c01..013358a4b 100644 --- a/platformclientv2/entitytypecriteria.go +++ b/platformclientv2/entitytypecriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Entitytypecriteria struct { } +func (u *Entitytypecriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Entitytypecriteria + + + + return json.Marshal(&struct { + Key *string `json:"key,omitempty"` + + Values *[]string `json:"values,omitempty"` + + ShouldIgnoreCase *bool `json:"shouldIgnoreCase,omitempty"` + + Operator *string `json:"operator,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + *Alias + }{ + Key: u.Key, + + Values: u.Values, + + ShouldIgnoreCase: u.ShouldIgnoreCase, + + Operator: u.Operator, + + EntityType: u.EntityType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Entitytypecriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/entry.go b/platformclientv2/entry.go index ffc05f85c..afe53f5c2 100644 --- a/platformclientv2/entry.go +++ b/platformclientv2/entry.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Entry struct { } +func (u *Entry) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Entry + + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + + Count *int `json:"count,omitempty"` + *Alias + }{ + Value: u.Value, + + Count: u.Count, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Entry) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/errorbody.go b/platformclientv2/errorbody.go index 89623547d..a7b3af395 100644 --- a/platformclientv2/errorbody.go +++ b/platformclientv2/errorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Errorbody struct { } +func (u *Errorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Errorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Detail `json:"details,omitempty"` + + Errors *[]Errorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Errorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/errordetails.go b/platformclientv2/errordetails.go index ea270656a..e8027eda8 100644 --- a/platformclientv2/errordetails.go +++ b/platformclientv2/errordetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Errordetails struct { } +func (u *Errordetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Errordetails + + + + return json.Marshal(&struct { + Status *int `json:"status,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + Code *string `json:"code,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Nested **Errordetails `json:"nested,omitempty"` + + Details *string `json:"details,omitempty"` + *Alias + }{ + Status: u.Status, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + Code: u.Code, + + ContextId: u.ContextId, + + Nested: u.Nested, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Errordetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/errorinfo.go b/platformclientv2/errorinfo.go index bdcc0068c..93edfcaa6 100644 --- a/platformclientv2/errorinfo.go +++ b/platformclientv2/errorinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Errorinfo struct { } +func (u *Errorinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Errorinfo + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Errorinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/estimatedwaittimepredictions.go b/platformclientv2/estimatedwaittimepredictions.go index 747acc1e1..af102bf1b 100644 --- a/platformclientv2/estimatedwaittimepredictions.go +++ b/platformclientv2/estimatedwaittimepredictions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Estimatedwaittimepredictions struct { } +func (u *Estimatedwaittimepredictions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Estimatedwaittimepredictions + + + + return json.Marshal(&struct { + Results *[]Predictionresults `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Estimatedwaittimepredictions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluation.go b/platformclientv2/evaluation.go index 0883e54c9..0688aca8a 100644 --- a/platformclientv2/evaluation.go +++ b/platformclientv2/evaluation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -105,6 +106,154 @@ type Evaluation struct { } +func (u *Evaluation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluation + + + ReleaseDate := new(string) + if u.ReleaseDate != nil { + + *ReleaseDate = timeutil.Strftime(u.ReleaseDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReleaseDate = nil + } + + AssignedDate := new(string) + if u.AssignedDate != nil { + + *AssignedDate = timeutil.Strftime(u.AssignedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + AssignedDate = nil + } + + ChangedDate := new(string) + if u.ChangedDate != nil { + + *ChangedDate = timeutil.Strftime(u.ChangedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ChangedDate = nil + } + + ConversationDate := new(string) + if u.ConversationDate != nil { + + *ConversationDate = timeutil.Strftime(u.ConversationDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConversationDate = nil + } + + ConversationEndDate := new(string) + if u.ConversationEndDate != nil { + + *ConversationEndDate = timeutil.Strftime(u.ConversationEndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConversationEndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Conversation *Conversation `json:"conversation,omitempty"` + + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + Evaluator *User `json:"evaluator,omitempty"` + + Agent *User `json:"agent,omitempty"` + + Calibration *Calibration `json:"calibration,omitempty"` + + Status *string `json:"status,omitempty"` + + Answers *Evaluationscoringset `json:"answers,omitempty"` + + AgentHasRead *bool `json:"agentHasRead,omitempty"` + + ReleaseDate *string `json:"releaseDate,omitempty"` + + AssignedDate *string `json:"assignedDate,omitempty"` + + ChangedDate *string `json:"changedDate,omitempty"` + + Queue *Queue `json:"queue,omitempty"` + + MediaType *[]string `json:"mediaType,omitempty"` + + Rescore *bool `json:"rescore,omitempty"` + + ConversationDate *string `json:"conversationDate,omitempty"` + + ConversationEndDate *string `json:"conversationEndDate,omitempty"` + + NeverRelease *bool `json:"neverRelease,omitempty"` + + ResourceId *string `json:"resourceId,omitempty"` + + ResourceType *string `json:"resourceType,omitempty"` + + Redacted *bool `json:"redacted,omitempty"` + + IsScoringIndex *bool `json:"isScoringIndex,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Conversation: u.Conversation, + + EvaluationForm: u.EvaluationForm, + + Evaluator: u.Evaluator, + + Agent: u.Agent, + + Calibration: u.Calibration, + + Status: u.Status, + + Answers: u.Answers, + + AgentHasRead: u.AgentHasRead, + + ReleaseDate: ReleaseDate, + + AssignedDate: AssignedDate, + + ChangedDate: ChangedDate, + + Queue: u.Queue, + + MediaType: u.MediaType, + + Rescore: u.Rescore, + + ConversationDate: ConversationDate, + + ConversationEndDate: ConversationEndDate, + + NeverRelease: u.NeverRelease, + + ResourceId: u.ResourceId, + + ResourceType: u.ResourceType, + + Redacted: u.Redacted, + + IsScoringIndex: u.IsScoringIndex, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationaggregatedatacontainer.go b/platformclientv2/evaluationaggregatedatacontainer.go index 6697497f2..a6335c3d4 100644 --- a/platformclientv2/evaluationaggregatedatacontainer.go +++ b/platformclientv2/evaluationaggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evaluationaggregatedatacontainer struct { } +func (u *Evaluationaggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationaggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationaggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationaggregatequeryclause.go b/platformclientv2/evaluationaggregatequeryclause.go index 126f6a306..7a87678b0 100644 --- a/platformclientv2/evaluationaggregatequeryclause.go +++ b/platformclientv2/evaluationaggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evaluationaggregatequeryclause struct { } +func (u *Evaluationaggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationaggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Evaluationaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationaggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationaggregatequeryfilter.go b/platformclientv2/evaluationaggregatequeryfilter.go index d71ccf89b..15da8a22f 100644 --- a/platformclientv2/evaluationaggregatequeryfilter.go +++ b/platformclientv2/evaluationaggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Evaluationaggregatequeryfilter struct { } +func (u *Evaluationaggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationaggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Evaluationaggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Evaluationaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationaggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationaggregatequerypredicate.go b/platformclientv2/evaluationaggregatequerypredicate.go index f03e79e53..1abc39c3a 100644 --- a/platformclientv2/evaluationaggregatequerypredicate.go +++ b/platformclientv2/evaluationaggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Evaluationaggregatequerypredicate struct { } +func (u *Evaluationaggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationaggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationaggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationaggregatequeryresponse.go b/platformclientv2/evaluationaggregatequeryresponse.go index aa36e248d..0a802a04f 100644 --- a/platformclientv2/evaluationaggregatequeryresponse.go +++ b/platformclientv2/evaluationaggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Evaluationaggregatequeryresponse struct { } +func (u *Evaluationaggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationaggregatequeryresponse + + + + return json.Marshal(&struct { + Results *[]Evaluationaggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationaggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationaggregationquery.go b/platformclientv2/evaluationaggregationquery.go index 8e30cb01a..50199c8b4 100644 --- a/platformclientv2/evaluationaggregationquery.go +++ b/platformclientv2/evaluationaggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Evaluationaggregationquery struct { } +func (u *Evaluationaggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationaggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Evaluationaggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Evaluationaggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationaggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationaggregationview.go b/platformclientv2/evaluationaggregationview.go index 8061fec0f..f96acacff 100644 --- a/platformclientv2/evaluationaggregationview.go +++ b/platformclientv2/evaluationaggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Evaluationaggregationview struct { } +func (u *Evaluationaggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationaggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationaggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationassignment.go b/platformclientv2/evaluationassignment.go index 2b16e8ff6..228915382 100644 --- a/platformclientv2/evaluationassignment.go +++ b/platformclientv2/evaluationassignment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evaluationassignment struct { } +func (u *Evaluationassignment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationassignment + + + + return json.Marshal(&struct { + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + User *User `json:"user,omitempty"` + *Alias + }{ + EvaluationForm: u.EvaluationForm, + + User: u.User, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationassignment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationdetailqueryclause.go b/platformclientv2/evaluationdetailqueryclause.go index ce4d21f8f..35f64fe8a 100644 --- a/platformclientv2/evaluationdetailqueryclause.go +++ b/platformclientv2/evaluationdetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evaluationdetailqueryclause struct { } +func (u *Evaluationdetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationdetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Evaluationdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationdetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationdetailqueryfilter.go b/platformclientv2/evaluationdetailqueryfilter.go index be312669c..49d7bd8f9 100644 --- a/platformclientv2/evaluationdetailqueryfilter.go +++ b/platformclientv2/evaluationdetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Evaluationdetailqueryfilter struct { } +func (u *Evaluationdetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationdetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Evaluationdetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Evaluationdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationdetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationdetailquerypredicate.go b/platformclientv2/evaluationdetailquerypredicate.go index 25c6e2e6a..4b70bc057 100644 --- a/platformclientv2/evaluationdetailquerypredicate.go +++ b/platformclientv2/evaluationdetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Evaluationdetailquerypredicate struct { } +func (u *Evaluationdetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationdetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Metric *string `json:"metric,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Metric: u.Metric, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationdetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationentitylisting.go b/platformclientv2/evaluationentitylisting.go index 55ee960a5..a3724440d 100644 --- a/platformclientv2/evaluationentitylisting.go +++ b/platformclientv2/evaluationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Evaluationentitylisting struct { } +func (u *Evaluationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Evaluation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationform.go b/platformclientv2/evaluationform.go index 94e244d9b..765d497bf 100644 --- a/platformclientv2/evaluationform.go +++ b/platformclientv2/evaluationform.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Evaluationform struct { } +func (u *Evaluationform) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationform + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + Published *bool `json:"published,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + QuestionGroups *[]Evaluationquestiongroup `json:"questionGroups,omitempty"` + + PublishedVersions *Domainentitylistingevaluationform `json:"publishedVersions,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ModifiedDate: ModifiedDate, + + Published: u.Published, + + ContextId: u.ContextId, + + QuestionGroups: u.QuestionGroups, + + PublishedVersions: u.PublishedVersions, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationform) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationformandscoringset.go b/platformclientv2/evaluationformandscoringset.go index 52cba3f47..2ab5a1369 100644 --- a/platformclientv2/evaluationformandscoringset.go +++ b/platformclientv2/evaluationformandscoringset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evaluationformandscoringset struct { } +func (u *Evaluationformandscoringset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationformandscoringset + + + + return json.Marshal(&struct { + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + Answers *Evaluationscoringset `json:"answers,omitempty"` + *Alias + }{ + EvaluationForm: u.EvaluationForm, + + Answers: u.Answers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationformandscoringset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationformentitylisting.go b/platformclientv2/evaluationformentitylisting.go index 291766212..0c93caa64 100644 --- a/platformclientv2/evaluationformentitylisting.go +++ b/platformclientv2/evaluationformentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Evaluationformentitylisting struct { } +func (u *Evaluationformentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationformentitylisting + + + + return json.Marshal(&struct { + Entities *[]Evaluationform `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationformentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationqualityv2topiccalibration.go b/platformclientv2/evaluationqualityv2topiccalibration.go index 8cf12bf4f..7d6511cec 100644 --- a/platformclientv2/evaluationqualityv2topiccalibration.go +++ b/platformclientv2/evaluationqualityv2topiccalibration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Evaluationqualityv2topiccalibration struct { } +func (u *Evaluationqualityv2topiccalibration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationqualityv2topiccalibration + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationqualityv2topiccalibration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationqualityv2topicevaluationscoringset.go b/platformclientv2/evaluationqualityv2topicevaluationscoringset.go index 8e507e75c..18e0220a3 100644 --- a/platformclientv2/evaluationqualityv2topicevaluationscoringset.go +++ b/platformclientv2/evaluationqualityv2topicevaluationscoringset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evaluationqualityv2topicevaluationscoringset struct { } +func (u *Evaluationqualityv2topicevaluationscoringset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationqualityv2topicevaluationscoringset + + + + return json.Marshal(&struct { + TotalScore *int `json:"totalScore,omitempty"` + + TotalCriticalScore *int `json:"totalCriticalScore,omitempty"` + *Alias + }{ + TotalScore: u.TotalScore, + + TotalCriticalScore: u.TotalCriticalScore, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationqualityv2topicevaluationscoringset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationqualityv2topicevaluationv2.go b/platformclientv2/evaluationqualityv2topicevaluationv2.go index 7be84af5b..097658f7d 100644 --- a/platformclientv2/evaluationqualityv2topicevaluationv2.go +++ b/platformclientv2/evaluationqualityv2topicevaluationv2.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -97,6 +98,146 @@ type Evaluationqualityv2topicevaluationv2 struct { } +func (u *Evaluationqualityv2topicevaluationv2) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationqualityv2topicevaluationv2 + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + ReleaseDate := new(string) + if u.ReleaseDate != nil { + + *ReleaseDate = timeutil.Strftime(u.ReleaseDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReleaseDate = nil + } + + AssignedDate := new(string) + if u.AssignedDate != nil { + + *AssignedDate = timeutil.Strftime(u.AssignedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + AssignedDate = nil + } + + ChangedDate := new(string) + if u.ChangedDate != nil { + + *ChangedDate = timeutil.Strftime(u.ChangedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ChangedDate = nil + } + + ConversationDate := new(string) + if u.ConversationDate != nil { + + *ConversationDate = timeutil.Strftime(u.ConversationDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConversationDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + Agent *Evaluationqualityv2topicuser `json:"agent,omitempty"` + + Evaluator *Evaluationqualityv2topicuser `json:"evaluator,omitempty"` + + EventTime *string `json:"eventTime,omitempty"` + + EvaluationFormId *string `json:"evaluationFormId,omitempty"` + + FormName *string `json:"formName,omitempty"` + + ScoringSet *Evaluationqualityv2topicevaluationscoringset `json:"scoringSet,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Status *string `json:"status,omitempty"` + + AgentHasRead *bool `json:"agentHasRead,omitempty"` + + ReleaseDate *string `json:"releaseDate,omitempty"` + + AssignedDate *string `json:"assignedDate,omitempty"` + + ChangedDate *string `json:"changedDate,omitempty"` + + EventType *string `json:"eventType,omitempty"` + + ResourceId *string `json:"resourceId,omitempty"` + + ResourceType *string `json:"resourceType,omitempty"` + + DivisionIds *[]string `json:"divisionIds,omitempty"` + + Rescore *bool `json:"rescore,omitempty"` + + ConversationDate *string `json:"conversationDate,omitempty"` + + MediaType *[]string `json:"mediaType,omitempty"` + + Calibration *Evaluationqualityv2topiccalibration `json:"calibration,omitempty"` + *Alias + }{ + Id: u.Id, + + ConversationId: u.ConversationId, + + Agent: u.Agent, + + Evaluator: u.Evaluator, + + EventTime: EventTime, + + EvaluationFormId: u.EvaluationFormId, + + FormName: u.FormName, + + ScoringSet: u.ScoringSet, + + ContextId: u.ContextId, + + Status: u.Status, + + AgentHasRead: u.AgentHasRead, + + ReleaseDate: ReleaseDate, + + AssignedDate: AssignedDate, + + ChangedDate: ChangedDate, + + EventType: u.EventType, + + ResourceId: u.ResourceId, + + ResourceType: u.ResourceType, + + DivisionIds: u.DivisionIds, + + Rescore: u.Rescore, + + ConversationDate: ConversationDate, + + MediaType: u.MediaType, + + Calibration: u.Calibration, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationqualityv2topicevaluationv2) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationqualityv2topicuser.go b/platformclientv2/evaluationqualityv2topicuser.go index 9c5a6404a..4af651b1b 100644 --- a/platformclientv2/evaluationqualityv2topicuser.go +++ b/platformclientv2/evaluationqualityv2topicuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evaluationqualityv2topicuser struct { } +func (u *Evaluationqualityv2topicuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationqualityv2topicuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + Id: u.Id, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationqualityv2topicuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationquestion.go b/platformclientv2/evaluationquestion.go index 696dfb0b5..116b926b0 100644 --- a/platformclientv2/evaluationquestion.go +++ b/platformclientv2/evaluationquestion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Evaluationquestion struct { } +func (u *Evaluationquestion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationquestion + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Text *string `json:"text,omitempty"` + + HelpText *string `json:"helpText,omitempty"` + + VarType *string `json:"type,omitempty"` + + NaEnabled *bool `json:"naEnabled,omitempty"` + + CommentsRequired *bool `json:"commentsRequired,omitempty"` + + VisibilityCondition *Visibilitycondition `json:"visibilityCondition,omitempty"` + + AnswerOptions *[]Answeroption `json:"answerOptions,omitempty"` + + IsKill *bool `json:"isKill,omitempty"` + + IsCritical *bool `json:"isCritical,omitempty"` + *Alias + }{ + Id: u.Id, + + Text: u.Text, + + HelpText: u.HelpText, + + VarType: u.VarType, + + NaEnabled: u.NaEnabled, + + CommentsRequired: u.CommentsRequired, + + VisibilityCondition: u.VisibilityCondition, + + AnswerOptions: u.AnswerOptions, + + IsKill: u.IsKill, + + IsCritical: u.IsCritical, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationquestion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationquestiongroup.go b/platformclientv2/evaluationquestiongroup.go index 929d68520..c97f85898 100644 --- a/platformclientv2/evaluationquestiongroup.go +++ b/platformclientv2/evaluationquestiongroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Evaluationquestiongroup struct { } +func (u *Evaluationquestiongroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationquestiongroup + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + DefaultAnswersToHighest *bool `json:"defaultAnswersToHighest,omitempty"` + + DefaultAnswersToNA *bool `json:"defaultAnswersToNA,omitempty"` + + NaEnabled *bool `json:"naEnabled,omitempty"` + + Weight *float32 `json:"weight,omitempty"` + + ManualWeight *bool `json:"manualWeight,omitempty"` + + Questions *[]Evaluationquestion `json:"questions,omitempty"` + + VisibilityCondition *Visibilitycondition `json:"visibilityCondition,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + DefaultAnswersToHighest: u.DefaultAnswersToHighest, + + DefaultAnswersToNA: u.DefaultAnswersToNA, + + NaEnabled: u.NaEnabled, + + Weight: u.Weight, + + ManualWeight: u.ManualWeight, + + Questions: u.Questions, + + VisibilityCondition: u.VisibilityCondition, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationquestiongroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationquestiongroupscore.go b/platformclientv2/evaluationquestiongroupscore.go index e77072bf5..adb6ce43f 100644 --- a/platformclientv2/evaluationquestiongroupscore.go +++ b/platformclientv2/evaluationquestiongroupscore.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -68,6 +69,78 @@ type Evaluationquestiongroupscore struct { } +func (u *Evaluationquestiongroupscore) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationquestiongroupscore + + + + return json.Marshal(&struct { + QuestionGroupId *string `json:"questionGroupId,omitempty"` + + TotalScore *float32 `json:"totalScore,omitempty"` + + MaxTotalScore *float32 `json:"maxTotalScore,omitempty"` + + MarkedNA *bool `json:"markedNA,omitempty"` + + TotalCriticalScore *float32 `json:"totalCriticalScore,omitempty"` + + MaxTotalCriticalScore *float32 `json:"maxTotalCriticalScore,omitempty"` + + TotalNonCriticalScore *float32 `json:"totalNonCriticalScore,omitempty"` + + MaxTotalNonCriticalScore *float32 `json:"maxTotalNonCriticalScore,omitempty"` + + TotalScoreUnweighted *float32 `json:"totalScoreUnweighted,omitempty"` + + MaxTotalScoreUnweighted *float32 `json:"maxTotalScoreUnweighted,omitempty"` + + TotalCriticalScoreUnweighted *float32 `json:"totalCriticalScoreUnweighted,omitempty"` + + MaxTotalCriticalScoreUnweighted *float32 `json:"maxTotalCriticalScoreUnweighted,omitempty"` + + TotalNonCriticalScoreUnweighted *float32 `json:"totalNonCriticalScoreUnweighted,omitempty"` + + MaxTotalNonCriticalScoreUnweighted *float32 `json:"maxTotalNonCriticalScoreUnweighted,omitempty"` + + QuestionScores *[]Evaluationquestionscore `json:"questionScores,omitempty"` + *Alias + }{ + QuestionGroupId: u.QuestionGroupId, + + TotalScore: u.TotalScore, + + MaxTotalScore: u.MaxTotalScore, + + MarkedNA: u.MarkedNA, + + TotalCriticalScore: u.TotalCriticalScore, + + MaxTotalCriticalScore: u.MaxTotalCriticalScore, + + TotalNonCriticalScore: u.TotalNonCriticalScore, + + MaxTotalNonCriticalScore: u.MaxTotalNonCriticalScore, + + TotalScoreUnweighted: u.TotalScoreUnweighted, + + MaxTotalScoreUnweighted: u.MaxTotalScoreUnweighted, + + TotalCriticalScoreUnweighted: u.TotalCriticalScoreUnweighted, + + MaxTotalCriticalScoreUnweighted: u.MaxTotalCriticalScoreUnweighted, + + TotalNonCriticalScoreUnweighted: u.TotalNonCriticalScoreUnweighted, + + MaxTotalNonCriticalScoreUnweighted: u.MaxTotalNonCriticalScoreUnweighted, + + QuestionScores: u.QuestionScores, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationquestiongroupscore) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationquestionscore.go b/platformclientv2/evaluationquestionscore.go index 136184a4d..86f843535 100644 --- a/platformclientv2/evaluationquestionscore.go +++ b/platformclientv2/evaluationquestionscore.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Evaluationquestionscore struct { } +func (u *Evaluationquestionscore) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationquestionscore + + + + return json.Marshal(&struct { + QuestionId *string `json:"questionId,omitempty"` + + AnswerId *string `json:"answerId,omitempty"` + + Score *int `json:"score,omitempty"` + + MarkedNA *bool `json:"markedNA,omitempty"` + + FailedKillQuestion *bool `json:"failedKillQuestion,omitempty"` + + Comments *string `json:"comments,omitempty"` + *Alias + }{ + QuestionId: u.QuestionId, + + AnswerId: u.AnswerId, + + Score: u.Score, + + MarkedNA: u.MarkedNA, + + FailedKillQuestion: u.FailedKillQuestion, + + Comments: u.Comments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationquestionscore) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluationscoringset.go b/platformclientv2/evaluationscoringset.go index 6adda6c9e..c5553d403 100644 --- a/platformclientv2/evaluationscoringset.go +++ b/platformclientv2/evaluationscoringset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Evaluationscoringset struct { } +func (u *Evaluationscoringset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluationscoringset + + + + return json.Marshal(&struct { + TotalScore *float32 `json:"totalScore,omitempty"` + + TotalCriticalScore *float32 `json:"totalCriticalScore,omitempty"` + + TotalNonCriticalScore *float32 `json:"totalNonCriticalScore,omitempty"` + + QuestionGroupScores *[]Evaluationquestiongroupscore `json:"questionGroupScores,omitempty"` + + AnyFailedKillQuestions *bool `json:"anyFailedKillQuestions,omitempty"` + + Comments *string `json:"comments,omitempty"` + + AgentComments *string `json:"agentComments,omitempty"` + *Alias + }{ + TotalScore: u.TotalScore, + + TotalCriticalScore: u.TotalCriticalScore, + + TotalNonCriticalScore: u.TotalNonCriticalScore, + + QuestionGroupScores: u.QuestionGroupScores, + + AnyFailedKillQuestions: u.AnyFailedKillQuestions, + + Comments: u.Comments, + + AgentComments: u.AgentComments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluationscoringset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluatoractivity.go b/platformclientv2/evaluatoractivity.go index a812aea88..147a8b4b3 100644 --- a/platformclientv2/evaluatoractivity.go +++ b/platformclientv2/evaluatoractivity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Evaluatoractivity struct { } +func (u *Evaluatoractivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluatoractivity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Evaluator *User `json:"evaluator,omitempty"` + + NumEvaluationsAssigned *int `json:"numEvaluationsAssigned,omitempty"` + + NumEvaluationsStarted *int `json:"numEvaluationsStarted,omitempty"` + + NumEvaluationsCompleted *int `json:"numEvaluationsCompleted,omitempty"` + + NumCalibrationsAssigned *int `json:"numCalibrationsAssigned,omitempty"` + + NumCalibrationsStarted *int `json:"numCalibrationsStarted,omitempty"` + + NumCalibrationsCompleted *int `json:"numCalibrationsCompleted,omitempty"` + + NumEvaluationsWithoutViewPermission *int `json:"numEvaluationsWithoutViewPermission,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Evaluator: u.Evaluator, + + NumEvaluationsAssigned: u.NumEvaluationsAssigned, + + NumEvaluationsStarted: u.NumEvaluationsStarted, + + NumEvaluationsCompleted: u.NumEvaluationsCompleted, + + NumCalibrationsAssigned: u.NumCalibrationsAssigned, + + NumCalibrationsStarted: u.NumCalibrationsStarted, + + NumCalibrationsCompleted: u.NumCalibrationsCompleted, + + NumEvaluationsWithoutViewPermission: u.NumEvaluationsWithoutViewPermission, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluatoractivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evaluatoractivityentitylisting.go b/platformclientv2/evaluatoractivityentitylisting.go index 634060287..43a7f88f3 100644 --- a/platformclientv2/evaluatoractivityentitylisting.go +++ b/platformclientv2/evaluatoractivityentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Evaluatoractivityentitylisting struct { } +func (u *Evaluatoractivityentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evaluatoractivityentitylisting + + + + return json.Marshal(&struct { + Entities *[]Evaluatoractivity `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evaluatoractivityentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/eventcondition.go b/platformclientv2/eventcondition.go index 106593812..231e68b23 100644 --- a/platformclientv2/eventcondition.go +++ b/platformclientv2/eventcondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Eventcondition struct { } +func (u *Eventcondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Eventcondition + + + + return json.Marshal(&struct { + Key *string `json:"key,omitempty"` + + Values *[]string `json:"values,omitempty"` + + Operator *string `json:"operator,omitempty"` + + StreamType *string `json:"streamType,omitempty"` + + SessionType *string `json:"sessionType,omitempty"` + + EventName *string `json:"eventName,omitempty"` + *Alias + }{ + Key: u.Key, + + Values: u.Values, + + Operator: u.Operator, + + StreamType: u.StreamType, + + SessionType: u.SessionType, + + EventName: u.EventName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Eventcondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/evententity.go b/platformclientv2/evententity.go index 7e09e9750..0cd0e1bb1 100644 --- a/platformclientv2/evententity.go +++ b/platformclientv2/evententity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Evententity struct { } +func (u *Evententity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Evententity + + + + return json.Marshal(&struct { + EntityType *string `json:"entityType,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + EntityType: u.EntityType, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Evententity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/eventlog.go b/platformclientv2/eventlog.go index c038fa9ee..6fb831fd9 100644 --- a/platformclientv2/eventlog.go +++ b/platformclientv2/eventlog.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,66 @@ type Eventlog struct { } +func (u *Eventlog) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Eventlog + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ErrorEntity *Domainentityref `json:"errorEntity,omitempty"` + + RelatedEntity *Domainentityref `json:"relatedEntity,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + Level *string `json:"level,omitempty"` + + Category *string `json:"category,omitempty"` + + CorrelationId *string `json:"correlationId,omitempty"` + + EventMessage *Eventmessage `json:"eventMessage,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ErrorEntity: u.ErrorEntity, + + RelatedEntity: u.RelatedEntity, + + Timestamp: Timestamp, + + Level: u.Level, + + Category: u.Category, + + CorrelationId: u.CorrelationId, + + EventMessage: u.EventMessage, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Eventlog) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/eventmessage.go b/platformclientv2/eventmessage.go index 09f1b436c..108d123b5 100644 --- a/platformclientv2/eventmessage.go +++ b/platformclientv2/eventmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Eventmessage struct { } +func (u *Eventmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Eventmessage + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]interface{} `json:"messageParams,omitempty"` + + DocumentationUri *string `json:"documentationUri,omitempty"` + + ResourceURIs *[]string `json:"resourceURIs,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + DocumentationUri: u.DocumentationUri, + + ResourceURIs: u.ResourceURIs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Eventmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/executerecordingjobsquery.go b/platformclientv2/executerecordingjobsquery.go index 250b50522..b9fc6031a 100644 --- a/platformclientv2/executerecordingjobsquery.go +++ b/platformclientv2/executerecordingjobsquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Executerecordingjobsquery struct { } +func (u *Executerecordingjobsquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Executerecordingjobsquery + + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + *Alias + }{ + State: u.State, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Executerecordingjobsquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/expansioncriterium.go b/platformclientv2/expansioncriterium.go index 9cdb827af..35aec0287 100644 --- a/platformclientv2/expansioncriterium.go +++ b/platformclientv2/expansioncriterium.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Expansioncriterium struct { } +func (u *Expansioncriterium) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Expansioncriterium + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Threshold *float64 `json:"threshold,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Threshold: u.Threshold, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Expansioncriterium) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/exportscriptrequest.go b/platformclientv2/exportscriptrequest.go index e1a1371ee..d28bb4ac0 100644 --- a/platformclientv2/exportscriptrequest.go +++ b/platformclientv2/exportscriptrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Exportscriptrequest struct { } +func (u *Exportscriptrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Exportscriptrequest + + + + return json.Marshal(&struct { + FileName *string `json:"fileName,omitempty"` + + VersionId *string `json:"versionId,omitempty"` + *Alias + }{ + FileName: u.FileName, + + VersionId: u.VersionId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Exportscriptrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/exportscriptresponse.go b/platformclientv2/exportscriptresponse.go index 4322f1891..8dd2e9367 100644 --- a/platformclientv2/exportscriptresponse.go +++ b/platformclientv2/exportscriptresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Exportscriptresponse struct { } +func (u *Exportscriptresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Exportscriptresponse + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + *Alias + }{ + Url: u.Url, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Exportscriptresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/exporturi.go b/platformclientv2/exporturi.go index 729253141..6a21d2cc1 100644 --- a/platformclientv2/exporturi.go +++ b/platformclientv2/exporturi.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Exporturi struct { } +func (u *Exporturi) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Exporturi + + + ExportTimestamp := new(string) + if u.ExportTimestamp != nil { + + *ExportTimestamp = timeutil.Strftime(u.ExportTimestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExportTimestamp = nil + } + + + return json.Marshal(&struct { + Uri *string `json:"uri,omitempty"` + + ExportTimestamp *string `json:"exportTimestamp,omitempty"` + *Alias + }{ + Uri: u.Uri, + + ExportTimestamp: ExportTimestamp, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Exporturi) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/extension.go b/platformclientv2/extension.go index 886ec6e58..d254fbcee 100644 --- a/platformclientv2/extension.go +++ b/platformclientv2/extension.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Extension struct { } +func (u *Extension) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Extension + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Number *string `json:"number,omitempty"` + + Owner *Domainentityref `json:"owner,omitempty"` + + ExtensionPool *Domainentityref `json:"extensionPool,omitempty"` + + OwnerType *string `json:"ownerType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Number: u.Number, + + Owner: u.Owner, + + ExtensionPool: u.ExtensionPool, + + OwnerType: u.OwnerType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Extension) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/extensionentitylisting.go b/platformclientv2/extensionentitylisting.go index a2e630435..c385713f8 100644 --- a/platformclientv2/extensionentitylisting.go +++ b/platformclientv2/extensionentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Extensionentitylisting struct { } +func (u *Extensionentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Extensionentitylisting + + + + return json.Marshal(&struct { + Entities *[]Extension `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Extensionentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/extensionpool.go b/platformclientv2/extensionpool.go index ec3f2742f..fdfb49112 100644 --- a/platformclientv2/extensionpool.go +++ b/platformclientv2/extensionpool.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Extensionpool struct { } +func (u *Extensionpool) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Extensionpool + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + StartNumber *string `json:"startNumber,omitempty"` + + EndNumber *string `json:"endNumber,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + StartNumber: u.StartNumber, + + EndNumber: u.EndNumber, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Extensionpool) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/extensionpoolentitylisting.go b/platformclientv2/extensionpoolentitylisting.go index 564440f82..bde0c153d 100644 --- a/platformclientv2/extensionpoolentitylisting.go +++ b/platformclientv2/extensionpoolentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Extensionpoolentitylisting struct { } +func (u *Extensionpoolentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Extensionpoolentitylisting + + + + return json.Marshal(&struct { + Entities *[]Extensionpool `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Extensionpoolentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/externalcontact.go b/platformclientv2/externalcontact.go index cb501c747..2a6f8d3da 100644 --- a/platformclientv2/externalcontact.go +++ b/platformclientv2/externalcontact.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,142 @@ type Externalcontact struct { } +func (u *Externalcontact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Externalcontact + + + ModifyDate := new(string) + if u.ModifyDate != nil { + + *ModifyDate = timeutil.Strftime(u.ModifyDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifyDate = nil + } + + CreateDate := new(string) + if u.CreateDate != nil { + + *CreateDate = timeutil.Strftime(u.CreateDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreateDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + MiddleName *string `json:"middleName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Salutation *string `json:"salutation,omitempty"` + + Title *string `json:"title,omitempty"` + + WorkPhone *Phonenumber `json:"workPhone,omitempty"` + + CellPhone *Phonenumber `json:"cellPhone,omitempty"` + + HomePhone *Phonenumber `json:"homePhone,omitempty"` + + OtherPhone *Phonenumber `json:"otherPhone,omitempty"` + + WorkEmail *string `json:"workEmail,omitempty"` + + PersonalEmail *string `json:"personalEmail,omitempty"` + + OtherEmail *string `json:"otherEmail,omitempty"` + + Address *Contactaddress `json:"address,omitempty"` + + TwitterId *Twitterid `json:"twitterId,omitempty"` + + LineId *Lineid `json:"lineId,omitempty"` + + WhatsAppId *Whatsappid `json:"whatsAppId,omitempty"` + + FacebookId *Facebookid `json:"facebookId,omitempty"` + + ModifyDate *string `json:"modifyDate,omitempty"` + + CreateDate *string `json:"createDate,omitempty"` + + ExternalOrganization *Externalorganization `json:"externalOrganization,omitempty"` + + SurveyOptOut *bool `json:"surveyOptOut,omitempty"` + + ExternalSystemUrl *string `json:"externalSystemUrl,omitempty"` + + Schema *Dataschema `json:"schema,omitempty"` + + CustomFields *map[string]interface{} `json:"customFields,omitempty"` + + ExternalDataSources *[]Externaldatasource `json:"externalDataSources,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + FirstName: u.FirstName, + + MiddleName: u.MiddleName, + + LastName: u.LastName, + + Salutation: u.Salutation, + + Title: u.Title, + + WorkPhone: u.WorkPhone, + + CellPhone: u.CellPhone, + + HomePhone: u.HomePhone, + + OtherPhone: u.OtherPhone, + + WorkEmail: u.WorkEmail, + + PersonalEmail: u.PersonalEmail, + + OtherEmail: u.OtherEmail, + + Address: u.Address, + + TwitterId: u.TwitterId, + + LineId: u.LineId, + + WhatsAppId: u.WhatsAppId, + + FacebookId: u.FacebookId, + + ModifyDate: ModifyDate, + + CreateDate: CreateDate, + + ExternalOrganization: u.ExternalOrganization, + + SurveyOptOut: u.SurveyOptOut, + + ExternalSystemUrl: u.ExternalSystemUrl, + + Schema: u.Schema, + + CustomFields: u.CustomFields, + + ExternalDataSources: u.ExternalDataSources, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Externalcontact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/externaldatasource.go b/platformclientv2/externaldatasource.go index ef96ceb54..621c059ea 100644 --- a/platformclientv2/externaldatasource.go +++ b/platformclientv2/externaldatasource.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Externaldatasource struct { } +func (u *Externaldatasource) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Externaldatasource + + + + return json.Marshal(&struct { + Platform *string `json:"platform,omitempty"` + + Url *string `json:"url,omitempty"` + *Alias + }{ + Platform: u.Platform, + + Url: u.Url, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Externaldatasource) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/externalorganization.go b/platformclientv2/externalorganization.go index cc4c94155..e8b807a3b 100644 --- a/platformclientv2/externalorganization.go +++ b/platformclientv2/externalorganization.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -97,6 +98,122 @@ type Externalorganization struct { } +func (u *Externalorganization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Externalorganization + + + ModifyDate := new(string) + if u.ModifyDate != nil { + + *ModifyDate = timeutil.Strftime(u.ModifyDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifyDate = nil + } + + CreateDate := new(string) + if u.CreateDate != nil { + + *CreateDate = timeutil.Strftime(u.CreateDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreateDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CompanyType *string `json:"companyType,omitempty"` + + Industry *string `json:"industry,omitempty"` + + PrimaryContactId *string `json:"primaryContactId,omitempty"` + + Address *Contactaddress `json:"address,omitempty"` + + PhoneNumber *Phonenumber `json:"phoneNumber,omitempty"` + + FaxNumber *Phonenumber `json:"faxNumber,omitempty"` + + EmployeeCount *int `json:"employeeCount,omitempty"` + + Revenue *int `json:"revenue,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + Websites *[]string `json:"websites,omitempty"` + + Tickers *[]Ticker `json:"tickers,omitempty"` + + TwitterId *Twitterid `json:"twitterId,omitempty"` + + ExternalSystemUrl *string `json:"externalSystemUrl,omitempty"` + + ModifyDate *string `json:"modifyDate,omitempty"` + + CreateDate *string `json:"createDate,omitempty"` + + Trustor *Trustor `json:"trustor,omitempty"` + + Schema *Dataschema `json:"schema,omitempty"` + + CustomFields *map[string]interface{} `json:"customFields,omitempty"` + + ExternalDataSources *[]Externaldatasource `json:"externalDataSources,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CompanyType: u.CompanyType, + + Industry: u.Industry, + + PrimaryContactId: u.PrimaryContactId, + + Address: u.Address, + + PhoneNumber: u.PhoneNumber, + + FaxNumber: u.FaxNumber, + + EmployeeCount: u.EmployeeCount, + + Revenue: u.Revenue, + + Tags: u.Tags, + + Websites: u.Websites, + + Tickers: u.Tickers, + + TwitterId: u.TwitterId, + + ExternalSystemUrl: u.ExternalSystemUrl, + + ModifyDate: ModifyDate, + + CreateDate: CreateDate, + + Trustor: u.Trustor, + + Schema: u.Schema, + + CustomFields: u.CustomFields, + + ExternalDataSources: u.ExternalDataSources, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Externalorganization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/externalorganizationlisting.go b/platformclientv2/externalorganizationlisting.go index 731a167d9..8ddb44dd5 100644 --- a/platformclientv2/externalorganizationlisting.go +++ b/platformclientv2/externalorganizationlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Externalorganizationlisting struct { } +func (u *Externalorganizationlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Externalorganizationlisting + + + + return json.Marshal(&struct { + Entities *[]Externalorganization `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Externalorganizationlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/externalorganizationtrustorlink.go b/platformclientv2/externalorganizationtrustorlink.go index cc4822815..45dffec43 100644 --- a/platformclientv2/externalorganizationtrustorlink.go +++ b/platformclientv2/externalorganizationtrustorlink.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Externalorganizationtrustorlink struct { } +func (u *Externalorganizationtrustorlink) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Externalorganizationtrustorlink + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + TrustorOrgId *string `json:"trustorOrgId,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ExternalOrganizationUri *string `json:"externalOrganizationUri,omitempty"` + *Alias + }{ + ExternalOrganizationId: u.ExternalOrganizationId, + + TrustorOrgId: u.TrustorOrgId, + + DateCreated: DateCreated, + + ExternalOrganizationUri: u.ExternalOrganizationUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Externalorganizationtrustorlink) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/externalsegment.go b/platformclientv2/externalsegment.go index d614cd71a..235becc16 100644 --- a/platformclientv2/externalsegment.go +++ b/platformclientv2/externalsegment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Externalsegment struct { } +func (u *Externalsegment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Externalsegment + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Source *string `json:"source,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Source: u.Source, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Externalsegment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facebookappcredentials.go b/platformclientv2/facebookappcredentials.go index 5c25ab6bd..7bfb2b2d6 100644 --- a/platformclientv2/facebookappcredentials.go +++ b/platformclientv2/facebookappcredentials.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Facebookappcredentials struct { } +func (u *Facebookappcredentials) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facebookappcredentials + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facebookappcredentials) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facebookid.go b/platformclientv2/facebookid.go index eaa65470c..aa975cd92 100644 --- a/platformclientv2/facebookid.go +++ b/platformclientv2/facebookid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Facebookid struct { } +func (u *Facebookid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facebookid + + + + return json.Marshal(&struct { + Ids *[]Facebookscopedid `json:"ids,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + Ids: u.Ids, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facebookid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facebookintegration.go b/platformclientv2/facebookintegration.go index 2b0e84734..e9d5a61e2 100644 --- a/platformclientv2/facebookintegration.go +++ b/platformclientv2/facebookintegration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Facebookintegration struct { } +func (u *Facebookintegration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facebookintegration + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + AppId *string `json:"appId,omitempty"` + + PageId *string `json:"pageId,omitempty"` + + PageName *string `json:"pageName,omitempty"` + + PageProfileImageUrl *string `json:"pageProfileImageUrl,omitempty"` + + Status *string `json:"status,omitempty"` + + Recipient *Domainentityref `json:"recipient,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + Version *int `json:"version,omitempty"` + + CreateStatus *string `json:"createStatus,omitempty"` + + CreateError *Errorbody `json:"createError,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + AppId: u.AppId, + + PageId: u.PageId, + + PageName: u.PageName, + + PageProfileImageUrl: u.PageProfileImageUrl, + + Status: u.Status, + + Recipient: u.Recipient, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Version: u.Version, + + CreateStatus: u.CreateStatus, + + CreateError: u.CreateError, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facebookintegration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facebookintegrationentitylisting.go b/platformclientv2/facebookintegrationentitylisting.go index 1b3f30e2d..154a8075e 100644 --- a/platformclientv2/facebookintegrationentitylisting.go +++ b/platformclientv2/facebookintegrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Facebookintegrationentitylisting struct { } +func (u *Facebookintegrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facebookintegrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Facebookintegration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facebookintegrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facebookintegrationrequest.go b/platformclientv2/facebookintegrationrequest.go index 629312acc..02f541884 100644 --- a/platformclientv2/facebookintegrationrequest.go +++ b/platformclientv2/facebookintegrationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Facebookintegrationrequest struct { } +func (u *Facebookintegrationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facebookintegrationrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PageAccessToken *string `json:"pageAccessToken,omitempty"` + + UserAccessToken *string `json:"userAccessToken,omitempty"` + + PageId *string `json:"pageId,omitempty"` + + AppId *string `json:"appId,omitempty"` + + AppSecret *string `json:"appSecret,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PageAccessToken: u.PageAccessToken, + + UserAccessToken: u.UserAccessToken, + + PageId: u.PageId, + + AppId: u.AppId, + + AppSecret: u.AppSecret, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facebookintegrationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facebookintegrationupdaterequest.go b/platformclientv2/facebookintegrationupdaterequest.go index 4e8bb925c..c34a2a7d6 100644 --- a/platformclientv2/facebookintegrationupdaterequest.go +++ b/platformclientv2/facebookintegrationupdaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Facebookintegrationupdaterequest struct { } +func (u *Facebookintegrationupdaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facebookintegrationupdaterequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PageAccessToken *string `json:"pageAccessToken,omitempty"` + + UserAccessToken *string `json:"userAccessToken,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PageAccessToken: u.PageAccessToken, + + UserAccessToken: u.UserAccessToken, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facebookintegrationupdaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facebookscopedid.go b/platformclientv2/facebookscopedid.go index a632f4b7d..170588163 100644 --- a/platformclientv2/facebookscopedid.go +++ b/platformclientv2/facebookscopedid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Facebookscopedid struct { } +func (u *Facebookscopedid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facebookscopedid + + + + return json.Marshal(&struct { + ScopedId *string `json:"scopedId,omitempty"` + *Alias + }{ + ScopedId: u.ScopedId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facebookscopedid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facet.go b/platformclientv2/facet.go index 716f6e00d..de4e8809f 100644 --- a/platformclientv2/facet.go +++ b/platformclientv2/facet.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Facet struct { } +func (u *Facet) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facet + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facet) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facetentry.go b/platformclientv2/facetentry.go index 0279b702f..3589ba36b 100644 --- a/platformclientv2/facetentry.go +++ b/platformclientv2/facetentry.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Facetentry struct { } +func (u *Facetentry) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facetentry + + + + return json.Marshal(&struct { + Attribute *Termattribute `json:"attribute,omitempty"` + + Statistics *Facetstatistics `json:"statistics,omitempty"` + + Other *int `json:"other,omitempty"` + + Total *int `json:"total,omitempty"` + + Missing *int `json:"missing,omitempty"` + + TermCount *int `json:"termCount,omitempty"` + + TermType *string `json:"termType,omitempty"` + + Terms *[]Facetterm `json:"terms,omitempty"` + *Alias + }{ + Attribute: u.Attribute, + + Statistics: u.Statistics, + + Other: u.Other, + + Total: u.Total, + + Missing: u.Missing, + + TermCount: u.TermCount, + + TermType: u.TermType, + + Terms: u.Terms, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facetentry) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facetinfo.go b/platformclientv2/facetinfo.go index 67eb3b810..5a152c68a 100644 --- a/platformclientv2/facetinfo.go +++ b/platformclientv2/facetinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Facetinfo struct { } +func (u *Facetinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facetinfo + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Entries *[]Entry `json:"entries,omitempty"` + *Alias + }{ + Name: u.Name, + + Entries: u.Entries, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facetinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facetkeyattribute.go b/platformclientv2/facetkeyattribute.go index 3ef5868b9..e0020b307 100644 --- a/platformclientv2/facetkeyattribute.go +++ b/platformclientv2/facetkeyattribute.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Facetkeyattribute struct { } +func (u *Facetkeyattribute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facetkeyattribute + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Count *int `json:"count,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Count: u.Count, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facetkeyattribute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facetstatistics.go b/platformclientv2/facetstatistics.go index 14a500044..ec172718c 100644 --- a/platformclientv2/facetstatistics.go +++ b/platformclientv2/facetstatistics.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Facetstatistics struct { } +func (u *Facetstatistics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facetstatistics + + + DateMin := new(string) + if u.DateMin != nil { + + *DateMin = timeutil.Strftime(u.DateMin, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateMin = nil + } + + DateMax := new(string) + if u.DateMax != nil { + + *DateMax = timeutil.Strftime(u.DateMax, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateMax = nil + } + + + return json.Marshal(&struct { + Count *int `json:"count,omitempty"` + + Min *float64 `json:"min,omitempty"` + + Max *float64 `json:"max,omitempty"` + + Mean *float64 `json:"mean,omitempty"` + + StdDeviation *float64 `json:"stdDeviation,omitempty"` + + DateMin *string `json:"dateMin,omitempty"` + + DateMax *string `json:"dateMax,omitempty"` + *Alias + }{ + Count: u.Count, + + Min: u.Min, + + Max: u.Max, + + Mean: u.Mean, + + StdDeviation: u.StdDeviation, + + DateMin: DateMin, + + DateMax: DateMax, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facetstatistics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/facetterm.go b/platformclientv2/facetterm.go index 2efe444dd..175819a00 100644 --- a/platformclientv2/facetterm.go +++ b/platformclientv2/facetterm.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Facetterm struct { } +func (u *Facetterm) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Facetterm + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + + return json.Marshal(&struct { + Term *string `json:"term,omitempty"` + + Key *int `json:"key,omitempty"` + + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Count *int `json:"count,omitempty"` + + Time *string `json:"time,omitempty"` + *Alias + }{ + Term: u.Term, + + Key: u.Key, + + Id: u.Id, + + Name: u.Name, + + Count: u.Count, + + Time: Time, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Facetterm) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/failedobject.go b/platformclientv2/failedobject.go index c14d9cc1c..99c240f99 100644 --- a/platformclientv2/failedobject.go +++ b/platformclientv2/failedobject.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Failedobject struct { } +func (u *Failedobject) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Failedobject + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *string `json:"version,omitempty"` + + Name *string `json:"name,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + + Name: u.Name, + + ErrorCode: u.ErrorCode, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Failedobject) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/failedrecordingsentitylisting.go b/platformclientv2/failedrecordingsentitylisting.go index 004f140e4..7fdb41ed8 100644 --- a/platformclientv2/failedrecordingsentitylisting.go +++ b/platformclientv2/failedrecordingsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Failedrecordingsentitylisting struct { } +func (u *Failedrecordingsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Failedrecordingsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Recordingjobfailedrecording `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Failedrecordingsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxdocument.go b/platformclientv2/faxdocument.go index c5ba03e1e..a90ba0c46 100644 --- a/platformclientv2/faxdocument.go +++ b/platformclientv2/faxdocument.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Faxdocument struct { } +func (u *Faxdocument) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxdocument + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + SharingUri *string `json:"sharingUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + Filename *string `json:"filename,omitempty"` + + Read *bool `json:"read,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + ReceiverAddress *string `json:"receiverAddress,omitempty"` + + Thumbnails *[]Documentthumbnail `json:"thumbnails,omitempty"` + + DownloadSharingUri *string `json:"downloadSharingUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ContentUri: u.ContentUri, + + Workspace: u.Workspace, + + CreatedBy: u.CreatedBy, + + SharingUri: u.SharingUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + Filename: u.Filename, + + Read: u.Read, + + PageCount: u.PageCount, + + CallerAddress: u.CallerAddress, + + ReceiverAddress: u.ReceiverAddress, + + Thumbnails: u.Thumbnails, + + DownloadSharingUri: u.DownloadSharingUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxdocument) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxdocumententitylisting.go b/platformclientv2/faxdocumententitylisting.go index cf6df4cb0..cdd744a5e 100644 --- a/platformclientv2/faxdocumententitylisting.go +++ b/platformclientv2/faxdocumententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Faxdocumententitylisting struct { } +func (u *Faxdocumententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxdocumententitylisting + + + + return json.Marshal(&struct { + Entities *[]Faxdocument `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxdocumententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxsendrequest.go b/platformclientv2/faxsendrequest.go index e83f1b706..f1e368f49 100644 --- a/platformclientv2/faxsendrequest.go +++ b/platformclientv2/faxsendrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Faxsendrequest struct { } +func (u *Faxsendrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxsendrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Addresses *[]string `json:"addresses,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + Workspace *Workspace `json:"workspace,omitempty"` + + CoverSheet *Coversheet `json:"coverSheet,omitempty"` + + TimeZoneOffsetMinutes *int `json:"timeZoneOffsetMinutes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Addresses: u.Addresses, + + DocumentId: u.DocumentId, + + ContentType: u.ContentType, + + Workspace: u.Workspace, + + CoverSheet: u.CoverSheet, + + TimeZoneOffsetMinutes: u.TimeZoneOffsetMinutes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxsendrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxsendresponse.go b/platformclientv2/faxsendresponse.go index bdc88fd85..6124f3702 100644 --- a/platformclientv2/faxsendresponse.go +++ b/platformclientv2/faxsendresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Faxsendresponse struct { } +func (u *Faxsendresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxsendresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + UploadDestinationUri *string `json:"uploadDestinationUri,omitempty"` + + UploadMethodType *string `json:"uploadMethodType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + UploadDestinationUri: u.UploadDestinationUri, + + UploadMethodType: u.UploadMethodType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxsendresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxstatus.go b/platformclientv2/faxstatus.go index 7e99c089e..8c3fcdfc7 100644 --- a/platformclientv2/faxstatus.go +++ b/platformclientv2/faxstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Faxstatus struct { } +func (u *Faxstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxstatus + + + + return json.Marshal(&struct { + Direction *string `json:"direction,omitempty"` + + ExpectedPages *int `json:"expectedPages,omitempty"` + + ActivePage *int `json:"activePage,omitempty"` + + LinesTransmitted *int `json:"linesTransmitted,omitempty"` + + BytesTransmitted *int `json:"bytesTransmitted,omitempty"` + + BaudRate *int `json:"baudRate,omitempty"` + + PageErrors *int `json:"pageErrors,omitempty"` + + LineErrors *int `json:"lineErrors,omitempty"` + *Alias + }{ + Direction: u.Direction, + + ExpectedPages: u.ExpectedPages, + + ActivePage: u.ActivePage, + + LinesTransmitted: u.LinesTransmitted, + + BytesTransmitted: u.BytesTransmitted, + + BaudRate: u.BaudRate, + + PageErrors: u.PageErrors, + + LineErrors: u.LineErrors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxsummary.go b/platformclientv2/faxsummary.go index 906215e75..73e09140e 100644 --- a/platformclientv2/faxsummary.go +++ b/platformclientv2/faxsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Faxsummary struct { } +func (u *Faxsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxsummary + + + + return json.Marshal(&struct { + ReadCount *int `json:"readCount,omitempty"` + + UnreadCount *int `json:"unreadCount,omitempty"` + + TotalCount *int `json:"totalCount,omitempty"` + *Alias + }{ + ReadCount: u.ReadCount, + + UnreadCount: u.UnreadCount, + + TotalCount: u.TotalCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxtopicfaxdatav2.go b/platformclientv2/faxtopicfaxdatav2.go index b5e218d31..8a3728591 100644 --- a/platformclientv2/faxtopicfaxdatav2.go +++ b/platformclientv2/faxtopicfaxdatav2.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Faxtopicfaxdatav2 struct { } +func (u *Faxtopicfaxdatav2) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxtopicfaxdatav2 + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateUploaded := new(string) + if u.DateUploaded != nil { + + *DateUploaded = timeutil.Strftime(u.DateUploaded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateUploaded = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Workspace *Faxtopicworkspacedata `json:"workspace,omitempty"` + + CreatedBy *Faxtopicuserdata `json:"createdBy,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + Filename *string `json:"filename,omitempty"` + + ChangeNumber *int `json:"changeNumber,omitempty"` + + DateUploaded *string `json:"dateUploaded,omitempty"` + + UploadedBy *Faxtopicuserdata `json:"uploadedBy,omitempty"` + + LockInfo *Faxtopiclockdata `json:"lockInfo,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + ReceiverAddress *string `json:"receiverAddress,omitempty"` + + Read *bool `json:"read,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Workspace: u.Workspace, + + CreatedBy: u.CreatedBy, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + Filename: u.Filename, + + ChangeNumber: u.ChangeNumber, + + DateUploaded: DateUploaded, + + UploadedBy: u.UploadedBy, + + LockInfo: u.LockInfo, + + SelfUri: u.SelfUri, + + CallerAddress: u.CallerAddress, + + ReceiverAddress: u.ReceiverAddress, + + Read: u.Read, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxtopicfaxdatav2) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxtopiclockdata.go b/platformclientv2/faxtopiclockdata.go index 190a41ccc..c7a3c2de4 100644 --- a/platformclientv2/faxtopiclockdata.go +++ b/platformclientv2/faxtopiclockdata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Faxtopiclockdata struct { } +func (u *Faxtopiclockdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxtopiclockdata + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateExpires := new(string) + if u.DateExpires != nil { + + *DateExpires = timeutil.Strftime(u.DateExpires, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpires = nil + } + + + return json.Marshal(&struct { + LockedBy *Faxtopicuserdata `json:"lockedBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateExpires *string `json:"dateExpires,omitempty"` + *Alias + }{ + LockedBy: u.LockedBy, + + DateCreated: DateCreated, + + DateExpires: DateExpires, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxtopiclockdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxtopicuserdata.go b/platformclientv2/faxtopicuserdata.go index 9c469c282..d78ee1a2f 100644 --- a/platformclientv2/faxtopicuserdata.go +++ b/platformclientv2/faxtopicuserdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Faxtopicuserdata struct { } +func (u *Faxtopicuserdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxtopicuserdata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxtopicuserdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/faxtopicworkspacedata.go b/platformclientv2/faxtopicworkspacedata.go index a6f9d55ad..85550f8dc 100644 --- a/platformclientv2/faxtopicworkspacedata.go +++ b/platformclientv2/faxtopicworkspacedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Faxtopicworkspacedata struct { } +func (u *Faxtopicworkspacedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Faxtopicworkspacedata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Faxtopicworkspacedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/featurestate.go b/platformclientv2/featurestate.go index 1007c517c..b4cc434f1 100644 --- a/platformclientv2/featurestate.go +++ b/platformclientv2/featurestate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Featurestate struct { } +func (u *Featurestate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Featurestate + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Featurestate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/fieldconfig.go b/platformclientv2/fieldconfig.go index c114b9867..4362dfa9a 100644 --- a/platformclientv2/fieldconfig.go +++ b/platformclientv2/fieldconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Fieldconfig struct { } +func (u *Fieldconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Fieldconfig + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + + State *string `json:"state,omitempty"` + + Sections *[]Section `json:"sections,omitempty"` + + Version *string `json:"version,omitempty"` + + SchemaVersion *string `json:"schemaVersion,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + EntityType: u.EntityType, + + State: u.State, + + Sections: u.Sections, + + Version: u.Version, + + SchemaVersion: u.SchemaVersion, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Fieldconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/fieldconfigs.go b/platformclientv2/fieldconfigs.go index 1cd244c92..82d7b1e18 100644 --- a/platformclientv2/fieldconfigs.go +++ b/platformclientv2/fieldconfigs.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Fieldconfigs struct { } +func (u *Fieldconfigs) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Fieldconfigs + + + + return json.Marshal(&struct { + Org *Fieldconfig `json:"org,omitempty"` + + Person *Fieldconfig `json:"person,omitempty"` + + Group *Fieldconfig `json:"group,omitempty"` + + ExternalContact *Fieldconfig `json:"externalContact,omitempty"` + *Alias + }{ + Org: u.Org, + + Person: u.Person, + + Group: u.Group, + + ExternalContact: u.ExternalContact, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Fieldconfigs) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/fieldlist.go b/platformclientv2/fieldlist.go index ba304cfa9..be246f215 100644 --- a/platformclientv2/fieldlist.go +++ b/platformclientv2/fieldlist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Fieldlist struct { } +func (u *Fieldlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Fieldlist + + + + return json.Marshal(&struct { + CustomLabels *bool `json:"customLabels,omitempty"` + + InstructionText *string `json:"instructionText,omitempty"` + + Key *string `json:"key,omitempty"` + + LabelKeys *[]string `json:"labelKeys,omitempty"` + + Params *map[string]interface{} `json:"params,omitempty"` + + Repeatable *bool `json:"repeatable,omitempty"` + + State *string `json:"state,omitempty"` + + VarType *string `json:"type,omitempty"` + + Required *bool `json:"required,omitempty"` + *Alias + }{ + CustomLabels: u.CustomLabels, + + InstructionText: u.InstructionText, + + Key: u.Key, + + LabelKeys: u.LabelKeys, + + Params: u.Params, + + Repeatable: u.Repeatable, + + State: u.State, + + VarType: u.VarType, + + Required: u.Required, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Fieldlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/fileuploadmode.go b/platformclientv2/fileuploadmode.go index b656ba21c..648546dca 100644 --- a/platformclientv2/fileuploadmode.go +++ b/platformclientv2/fileuploadmode.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Fileuploadmode struct { } +func (u *Fileuploadmode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Fileuploadmode + + + + return json.Marshal(&struct { + FileTypes *[]string `json:"fileTypes,omitempty"` + + MaxFileSizeKB *int `json:"maxFileSizeKB,omitempty"` + *Alias + }{ + FileTypes: u.FileTypes, + + MaxFileSizeKB: u.MaxFileSizeKB, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Fileuploadmode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/fileuploadsettings.go b/platformclientv2/fileuploadsettings.go index 42e94e4df..a114871c2 100644 --- a/platformclientv2/fileuploadsettings.go +++ b/platformclientv2/fileuploadsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Fileuploadsettings struct { } +func (u *Fileuploadsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Fileuploadsettings + + + + return json.Marshal(&struct { + Modes *[]Fileuploadmode `json:"modes,omitempty"` + *Alias + }{ + Modes: u.Modes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Fileuploadsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/filter.go b/platformclientv2/filter.go index a8fb0a9f4..7650e1b71 100644 --- a/platformclientv2/filter.go +++ b/platformclientv2/filter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Filter struct { } +func (u *Filter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Filter + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + + Operator: u.Operator, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Filter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/filterpreviewresponse.go b/platformclientv2/filterpreviewresponse.go index 820209662..98ed544d0 100644 --- a/platformclientv2/filterpreviewresponse.go +++ b/platformclientv2/filterpreviewresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Filterpreviewresponse struct { } +func (u *Filterpreviewresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Filterpreviewresponse + + + + return json.Marshal(&struct { + FilteredContacts *int `json:"filteredContacts,omitempty"` + + TotalContacts *int `json:"totalContacts,omitempty"` + + Preview *[]Dialercontact `json:"preview,omitempty"` + *Alias + }{ + FilteredContacts: u.FilteredContacts, + + TotalContacts: u.TotalContacts, + + Preview: u.Preview, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Filterpreviewresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flow.go b/platformclientv2/flow.go index 0f5470278..a6e205610 100644 --- a/platformclientv2/flow.go +++ b/platformclientv2/flow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -96,6 +97,106 @@ type Flow struct { } +func (u *Flow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flow + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + VarType *string `json:"type,omitempty"` + + LockedUser *User `json:"lockedUser,omitempty"` + + LockedClient *Domainentityref `json:"lockedClient,omitempty"` + + Active *bool `json:"active,omitempty"` + + System *bool `json:"system,omitempty"` + + Deleted *bool `json:"deleted,omitempty"` + + PublishedVersion *Flowversion `json:"publishedVersion,omitempty"` + + SavedVersion *Flowversion `json:"savedVersion,omitempty"` + + InputSchema *interface{} `json:"inputSchema,omitempty"` + + OutputSchema *interface{} `json:"outputSchema,omitempty"` + + CheckedInVersion *Flowversion `json:"checkedInVersion,omitempty"` + + DebugVersion *Flowversion `json:"debugVersion,omitempty"` + + PublishedBy *User `json:"publishedBy,omitempty"` + + CurrentOperation *Operation `json:"currentOperation,omitempty"` + + NluInfo *Nluinfo `json:"nluInfo,omitempty"` + + SupportedLanguages *[]Supportedlanguage `json:"supportedLanguages,omitempty"` + + CompatibleFlowTypes *[]string `json:"compatibleFlowTypes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + VarType: u.VarType, + + LockedUser: u.LockedUser, + + LockedClient: u.LockedClient, + + Active: u.Active, + + System: u.System, + + Deleted: u.Deleted, + + PublishedVersion: u.PublishedVersion, + + SavedVersion: u.SavedVersion, + + InputSchema: u.InputSchema, + + OutputSchema: u.OutputSchema, + + CheckedInVersion: u.CheckedInVersion, + + DebugVersion: u.DebugVersion, + + PublishedBy: u.PublishedBy, + + CurrentOperation: u.CurrentOperation, + + NluInfo: u.NluInfo, + + SupportedLanguages: u.SupportedLanguages, + + CompatibleFlowTypes: u.CompatibleFlowTypes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowaggregatedatacontainer.go b/platformclientv2/flowaggregatedatacontainer.go index 6cea3bf85..d28f52060 100644 --- a/platformclientv2/flowaggregatedatacontainer.go +++ b/platformclientv2/flowaggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Flowaggregatedatacontainer struct { } +func (u *Flowaggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowaggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowaggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowaggregatequeryclause.go b/platformclientv2/flowaggregatequeryclause.go index 49b5395d0..d7e3a4768 100644 --- a/platformclientv2/flowaggregatequeryclause.go +++ b/platformclientv2/flowaggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Flowaggregatequeryclause struct { } +func (u *Flowaggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowaggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Flowaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowaggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowaggregatequeryfilter.go b/platformclientv2/flowaggregatequeryfilter.go index 152be6380..e5902049a 100644 --- a/platformclientv2/flowaggregatequeryfilter.go +++ b/platformclientv2/flowaggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Flowaggregatequeryfilter struct { } +func (u *Flowaggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowaggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Flowaggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Flowaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowaggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowaggregatequerypredicate.go b/platformclientv2/flowaggregatequerypredicate.go index aa6322fb1..2222c27d4 100644 --- a/platformclientv2/flowaggregatequerypredicate.go +++ b/platformclientv2/flowaggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Flowaggregatequerypredicate struct { } +func (u *Flowaggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowaggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowaggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowaggregatequeryresponse.go b/platformclientv2/flowaggregatequeryresponse.go index 3eb56343c..34693d6e1 100644 --- a/platformclientv2/flowaggregatequeryresponse.go +++ b/platformclientv2/flowaggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Flowaggregatequeryresponse struct { } +func (u *Flowaggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowaggregatequeryresponse + + + + return json.Marshal(&struct { + Results *[]Flowaggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowaggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowaggregationquery.go b/platformclientv2/flowaggregationquery.go index 12d615903..c111afbed 100644 --- a/platformclientv2/flowaggregationquery.go +++ b/platformclientv2/flowaggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Flowaggregationquery struct { } +func (u *Flowaggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowaggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Flowaggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Flowaggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowaggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowaggregationview.go b/platformclientv2/flowaggregationview.go index c1b7863d2..c166bfcae 100644 --- a/platformclientv2/flowaggregationview.go +++ b/platformclientv2/flowaggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Flowaggregationview struct { } +func (u *Flowaggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowaggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowaggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowdiagnosticinfo.go b/platformclientv2/flowdiagnosticinfo.go index 747ea0e5f..a2926c9e4 100644 --- a/platformclientv2/flowdiagnosticinfo.go +++ b/platformclientv2/flowdiagnosticinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Flowdiagnosticinfo struct { } +func (u *Flowdiagnosticinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowdiagnosticinfo + + + + return json.Marshal(&struct { + LastActionId *int `json:"lastActionId,omitempty"` + *Alias + }{ + LastActionId: u.LastActionId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowdiagnosticinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowdivisionview.go b/platformclientv2/flowdivisionview.go index 9abaef3a3..33ef34a23 100644 --- a/platformclientv2/flowdivisionview.go +++ b/platformclientv2/flowdivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Flowdivisionview struct { } +func (u *Flowdivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowdivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + VarType *string `json:"type,omitempty"` + + InputSchema *Jsonschemadocument `json:"inputSchema,omitempty"` + + OutputSchema *Jsonschemadocument `json:"outputSchema,omitempty"` + + PublishedVersion *Flowversion `json:"publishedVersion,omitempty"` + + DebugVersion *Flowversion `json:"debugVersion,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + VarType: u.VarType, + + InputSchema: u.InputSchema, + + OutputSchema: u.OutputSchema, + + PublishedVersion: u.PublishedVersion, + + DebugVersion: u.DebugVersion, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowdivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowdivisionviewentitylisting.go b/platformclientv2/flowdivisionviewentitylisting.go index 517a7238a..a05d4e4ae 100644 --- a/platformclientv2/flowdivisionviewentitylisting.go +++ b/platformclientv2/flowdivisionviewentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Flowdivisionviewentitylisting struct { } +func (u *Flowdivisionviewentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowdivisionviewentitylisting + + + + return json.Marshal(&struct { + Entities *[]Flowdivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowdivisionviewentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowentitylisting.go b/platformclientv2/flowentitylisting.go index 0324a5cca..23e0e6f3c 100644 --- a/platformclientv2/flowentitylisting.go +++ b/platformclientv2/flowentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Flowentitylisting struct { } +func (u *Flowentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowentitylisting + + + + return json.Marshal(&struct { + Entities *[]Flow `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowexecutionlaunchrequest.go b/platformclientv2/flowexecutionlaunchrequest.go index 629ece7f1..a3119281e 100644 --- a/platformclientv2/flowexecutionlaunchrequest.go +++ b/platformclientv2/flowexecutionlaunchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Flowexecutionlaunchrequest struct { } +func (u *Flowexecutionlaunchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowexecutionlaunchrequest + + + + return json.Marshal(&struct { + FlowId *string `json:"flowId,omitempty"` + + FlowVersion *string `json:"flowVersion,omitempty"` + + InputData *map[string]interface{} `json:"inputData,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + FlowId: u.FlowId, + + FlowVersion: u.FlowVersion, + + InputData: u.InputData, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowexecutionlaunchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowexecutionlaunchresponse.go b/platformclientv2/flowexecutionlaunchresponse.go index b5ba1d523..76a23a819 100644 --- a/platformclientv2/flowexecutionlaunchresponse.go +++ b/platformclientv2/flowexecutionlaunchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Flowexecutionlaunchresponse struct { } +func (u *Flowexecutionlaunchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowexecutionlaunchresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + FlowVersion *Domainentityref `json:"flowVersion,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + FlowVersion: u.FlowVersion, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowexecutionlaunchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowmilestone.go b/platformclientv2/flowmilestone.go index 0745e9611..3d3c61c30 100644 --- a/platformclientv2/flowmilestone.go +++ b/platformclientv2/flowmilestone.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Flowmilestone struct { } +func (u *Flowmilestone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowmilestone + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowmilestone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowmilestonedivisionview.go b/platformclientv2/flowmilestonedivisionview.go index 40805a6dc..035082052 100644 --- a/platformclientv2/flowmilestonedivisionview.go +++ b/platformclientv2/flowmilestonedivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Flowmilestonedivisionview struct { } +func (u *Flowmilestonedivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowmilestonedivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowmilestonedivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowmilestonedivisionviewentitylisting.go b/platformclientv2/flowmilestonedivisionviewentitylisting.go index 1124b6714..9fbff2e9e 100644 --- a/platformclientv2/flowmilestonedivisionviewentitylisting.go +++ b/platformclientv2/flowmilestonedivisionviewentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Flowmilestonedivisionviewentitylisting struct { } +func (u *Flowmilestonedivisionviewentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowmilestonedivisionviewentitylisting + + + + return json.Marshal(&struct { + Entities *[]Flowmilestonedivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowmilestonedivisionviewentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowmilestonelisting.go b/platformclientv2/flowmilestonelisting.go index fa2bd5926..6a77b72bd 100644 --- a/platformclientv2/flowmilestonelisting.go +++ b/platformclientv2/flowmilestonelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Flowmilestonelisting struct { } +func (u *Flowmilestonelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowmilestonelisting + + + + return json.Marshal(&struct { + Entities *[]Flowmilestone `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowmilestonelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowobservationdatacontainer.go b/platformclientv2/flowobservationdatacontainer.go index e21904394..7056f6c95 100644 --- a/platformclientv2/flowobservationdatacontainer.go +++ b/platformclientv2/flowobservationdatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Flowobservationdatacontainer struct { } +func (u *Flowobservationdatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowobservationdatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Observationmetricdata `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowobservationdatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowobservationquery.go b/platformclientv2/flowobservationquery.go index 5c4fd4e97..133bac69a 100644 --- a/platformclientv2/flowobservationquery.go +++ b/platformclientv2/flowobservationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Flowobservationquery struct { } +func (u *Flowobservationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowobservationquery + + + + return json.Marshal(&struct { + Filter *Flowobservationqueryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + DetailMetrics *[]string `json:"detailMetrics,omitempty"` + *Alias + }{ + Filter: u.Filter, + + Metrics: u.Metrics, + + DetailMetrics: u.DetailMetrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowobservationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowobservationqueryclause.go b/platformclientv2/flowobservationqueryclause.go index 270213300..930d8f447 100644 --- a/platformclientv2/flowobservationqueryclause.go +++ b/platformclientv2/flowobservationqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Flowobservationqueryclause struct { } +func (u *Flowobservationqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowobservationqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Flowobservationquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowobservationqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowobservationqueryfilter.go b/platformclientv2/flowobservationqueryfilter.go index 3b86bf6fe..26ba3df73 100644 --- a/platformclientv2/flowobservationqueryfilter.go +++ b/platformclientv2/flowobservationqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Flowobservationqueryfilter struct { } +func (u *Flowobservationqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowobservationqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Flowobservationqueryclause `json:"clauses,omitempty"` + + Predicates *[]Flowobservationquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowobservationqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowobservationquerypredicate.go b/platformclientv2/flowobservationquerypredicate.go index e215aaaab..99edcb12c 100644 --- a/platformclientv2/flowobservationquerypredicate.go +++ b/platformclientv2/flowobservationquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Flowobservationquerypredicate struct { } +func (u *Flowobservationquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowobservationquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowobservationquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowobservationqueryresponse.go b/platformclientv2/flowobservationqueryresponse.go index fe6e355d3..a70637d9b 100644 --- a/platformclientv2/flowobservationqueryresponse.go +++ b/platformclientv2/flowobservationqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Flowobservationqueryresponse struct { } +func (u *Flowobservationqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowobservationqueryresponse + + + + return json.Marshal(&struct { + Results *[]Flowobservationdatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowobservationqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowoutcome.go b/platformclientv2/flowoutcome.go index 08f004d43..05cf0a812 100644 --- a/platformclientv2/flowoutcome.go +++ b/platformclientv2/flowoutcome.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Flowoutcome struct { } +func (u *Flowoutcome) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowoutcome + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + CurrentOperation *Operation `json:"currentOperation,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + CurrentOperation: u.CurrentOperation, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowoutcome) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowoutcomedivisionview.go b/platformclientv2/flowoutcomedivisionview.go index 381cb74b0..72c0fa24e 100644 --- a/platformclientv2/flowoutcomedivisionview.go +++ b/platformclientv2/flowoutcomedivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Flowoutcomedivisionview struct { } +func (u *Flowoutcomedivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowoutcomedivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowoutcomedivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowoutcomedivisionviewentitylisting.go b/platformclientv2/flowoutcomedivisionviewentitylisting.go index a1262f162..a9319f79d 100644 --- a/platformclientv2/flowoutcomedivisionviewentitylisting.go +++ b/platformclientv2/flowoutcomedivisionviewentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Flowoutcomedivisionviewentitylisting struct { } +func (u *Flowoutcomedivisionviewentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowoutcomedivisionviewentitylisting + + + + return json.Marshal(&struct { + Entities *[]Flowoutcomedivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowoutcomedivisionviewentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowoutcomelisting.go b/platformclientv2/flowoutcomelisting.go index f2daa6fb1..a0efe34cf 100644 --- a/platformclientv2/flowoutcomelisting.go +++ b/platformclientv2/flowoutcomelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Flowoutcomelisting struct { } +func (u *Flowoutcomelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowoutcomelisting + + + + return json.Marshal(&struct { + Entities *[]Flowoutcome `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowoutcomelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowruntimeexecution.go b/platformclientv2/flowruntimeexecution.go index 63410ce31..606e726ee 100644 --- a/platformclientv2/flowruntimeexecution.go +++ b/platformclientv2/flowruntimeexecution.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Flowruntimeexecution struct { } +func (u *Flowruntimeexecution) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowruntimeexecution + + + DateLaunched := new(string) + if u.DateLaunched != nil { + + *DateLaunched = timeutil.Strftime(u.DateLaunched, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateLaunched = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + FlowVersion *Flowversion `json:"flowVersion,omitempty"` + + DateLaunched *string `json:"dateLaunched,omitempty"` + + Status *string `json:"status,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + CompletionReason *string `json:"completionReason,omitempty"` + + FlowErrorInfo *Errorbody `json:"flowErrorInfo,omitempty"` + + OutputData *map[string]interface{} `json:"outputData,omitempty"` + + Conversation *Domainentityref `json:"conversation,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + FlowVersion: u.FlowVersion, + + DateLaunched: DateLaunched, + + Status: u.Status, + + DateCompleted: DateCompleted, + + CompletionReason: u.CompletionReason, + + FlowErrorInfo: u.FlowErrorInfo, + + OutputData: u.OutputData, + + Conversation: u.Conversation, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowruntimeexecution) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowversion.go b/platformclientv2/flowversion.go index fe3ac714d..4e308e13d 100644 --- a/platformclientv2/flowversion.go +++ b/platformclientv2/flowversion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -84,6 +85,94 @@ type Flowversion struct { } +func (u *Flowversion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowversion + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CommitVersion *string `json:"commitVersion,omitempty"` + + ConfigurationVersion *string `json:"configurationVersion,omitempty"` + + VarType *string `json:"type,omitempty"` + + Secure *bool `json:"secure,omitempty"` + + Debug *bool `json:"debug,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + CreatedByClient *Domainentityref `json:"createdByClient,omitempty"` + + ConfigurationUri *string `json:"configurationUri,omitempty"` + + DateCreated *int `json:"dateCreated,omitempty"` + + GenerationId *string `json:"generationId,omitempty"` + + PublishResultUri *string `json:"publishResultUri,omitempty"` + + InputSchema *Jsonschemadocument `json:"inputSchema,omitempty"` + + OutputSchema *Jsonschemadocument `json:"outputSchema,omitempty"` + + NluInfo *Nluinfo `json:"nluInfo,omitempty"` + + SupportedLanguages *[]Supportedlanguage `json:"supportedLanguages,omitempty"` + + CompatibleFlowTypes *[]string `json:"compatibleFlowTypes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CommitVersion: u.CommitVersion, + + ConfigurationVersion: u.ConfigurationVersion, + + VarType: u.VarType, + + Secure: u.Secure, + + Debug: u.Debug, + + CreatedBy: u.CreatedBy, + + CreatedByClient: u.CreatedByClient, + + ConfigurationUri: u.ConfigurationUri, + + DateCreated: u.DateCreated, + + GenerationId: u.GenerationId, + + PublishResultUri: u.PublishResultUri, + + InputSchema: u.InputSchema, + + OutputSchema: u.OutputSchema, + + NluInfo: u.NluInfo, + + SupportedLanguages: u.SupportedLanguages, + + CompatibleFlowTypes: u.CompatibleFlowTypes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowversion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/flowversionentitylisting.go b/platformclientv2/flowversionentitylisting.go index 79b64d7af..351959813 100644 --- a/platformclientv2/flowversionentitylisting.go +++ b/platformclientv2/flowversionentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Flowversionentitylisting struct { } +func (u *Flowversionentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Flowversionentitylisting + + + + return json.Marshal(&struct { + Entities *[]Flowversion `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Flowversionentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastabandonrateresponse.go b/platformclientv2/forecastabandonrateresponse.go index 5a5acc85c..84d4b05b6 100644 --- a/platformclientv2/forecastabandonrateresponse.go +++ b/platformclientv2/forecastabandonrateresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Forecastabandonrateresponse struct { } +func (u *Forecastabandonrateresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastabandonrateresponse + + + + return json.Marshal(&struct { + Percent *int `json:"percent,omitempty"` + *Alias + }{ + Percent: u.Percent, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastabandonrateresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastaveragespeedofanswerresponse.go b/platformclientv2/forecastaveragespeedofanswerresponse.go index 77df91822..046578ef9 100644 --- a/platformclientv2/forecastaveragespeedofanswerresponse.go +++ b/platformclientv2/forecastaveragespeedofanswerresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Forecastaveragespeedofanswerresponse struct { } +func (u *Forecastaveragespeedofanswerresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastaveragespeedofanswerresponse + + + + return json.Marshal(&struct { + Seconds *int `json:"seconds,omitempty"` + *Alias + }{ + Seconds: u.Seconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastaveragespeedofanswerresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastplanninggroupdata.go b/platformclientv2/forecastplanninggroupdata.go index 9ab70e483..4b1af195c 100644 --- a/platformclientv2/forecastplanninggroupdata.go +++ b/platformclientv2/forecastplanninggroupdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Forecastplanninggroupdata struct { } +func (u *Forecastplanninggroupdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastplanninggroupdata + + + + return json.Marshal(&struct { + PlanningGroupId *string `json:"planningGroupId,omitempty"` + + OfferedPerInterval *[]float64 `json:"offeredPerInterval,omitempty"` + + AverageHandleTimeSecondsPerInterval *[]float64 `json:"averageHandleTimeSecondsPerInterval,omitempty"` + *Alias + }{ + PlanningGroupId: u.PlanningGroupId, + + OfferedPerInterval: u.OfferedPerInterval, + + AverageHandleTimeSecondsPerInterval: u.AverageHandleTimeSecondsPerInterval, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastplanninggroupdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastplanninggroupresponse.go b/platformclientv2/forecastplanninggroupresponse.go index f921e5a83..ce8530590 100644 --- a/platformclientv2/forecastplanninggroupresponse.go +++ b/platformclientv2/forecastplanninggroupresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Forecastplanninggroupresponse struct { } +func (u *Forecastplanninggroupresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastplanninggroupresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + RoutePaths *[]Routepathresponse `json:"routePaths,omitempty"` + + ServiceGoalTemplate *Forecastservicegoaltemplateresponse `json:"serviceGoalTemplate,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + RoutePaths: u.RoutePaths, + + ServiceGoalTemplate: u.ServiceGoalTemplate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastplanninggroupresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastplanninggroupsresponse.go b/platformclientv2/forecastplanninggroupsresponse.go index 402af9643..f9cf3587f 100644 --- a/platformclientv2/forecastplanninggroupsresponse.go +++ b/platformclientv2/forecastplanninggroupsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Forecastplanninggroupsresponse struct { } +func (u *Forecastplanninggroupsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastplanninggroupsresponse + + + + return json.Marshal(&struct { + Entities *[]Forecastplanninggroupresponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastplanninggroupsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastservicegoaltemplateresponse.go b/platformclientv2/forecastservicegoaltemplateresponse.go index 03775f539..5e3e6b1ff 100644 --- a/platformclientv2/forecastservicegoaltemplateresponse.go +++ b/platformclientv2/forecastservicegoaltemplateresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Forecastservicegoaltemplateresponse struct { } +func (u *Forecastservicegoaltemplateresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastservicegoaltemplateresponse + + + + return json.Marshal(&struct { + ServiceLevel *Forecastservicelevelresponse `json:"serviceLevel,omitempty"` + + AverageSpeedOfAnswer *Forecastaveragespeedofanswerresponse `json:"averageSpeedOfAnswer,omitempty"` + + AbandonRate *Forecastabandonrateresponse `json:"abandonRate,omitempty"` + *Alias + }{ + ServiceLevel: u.ServiceLevel, + + AverageSpeedOfAnswer: u.AverageSpeedOfAnswer, + + AbandonRate: u.AbandonRate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastservicegoaltemplateresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastservicelevelresponse.go b/platformclientv2/forecastservicelevelresponse.go index d6ff88344..55b0524db 100644 --- a/platformclientv2/forecastservicelevelresponse.go +++ b/platformclientv2/forecastservicelevelresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Forecastservicelevelresponse struct { } +func (u *Forecastservicelevelresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastservicelevelresponse + + + + return json.Marshal(&struct { + Percent *int `json:"percent,omitempty"` + + Seconds *int `json:"seconds,omitempty"` + *Alias + }{ + Percent: u.Percent, + + Seconds: u.Seconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastservicelevelresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/forecastsourcedaypointer.go b/platformclientv2/forecastsourcedaypointer.go index ea2200913..4dc45754b 100644 --- a/platformclientv2/forecastsourcedaypointer.go +++ b/platformclientv2/forecastsourcedaypointer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Forecastsourcedaypointer struct { } +func (u *Forecastsourcedaypointer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Forecastsourcedaypointer + + + + return json.Marshal(&struct { + DayOfWeek *string `json:"dayOfWeek,omitempty"` + + Weight *int `json:"weight,omitempty"` + + Date *string `json:"date,omitempty"` + + FileName *string `json:"fileName,omitempty"` + + DataKey *string `json:"dataKey,omitempty"` + *Alias + }{ + DayOfWeek: u.DayOfWeek, + + Weight: u.Weight, + + Date: u.Date, + + FileName: u.FileName, + + DataKey: u.DataKey, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Forecastsourcedaypointer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/format.go b/platformclientv2/format.go index d39bdcc2c..95ca75fb2 100644 --- a/platformclientv2/format.go +++ b/platformclientv2/format.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Format struct { } +func (u *Format) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Format + + + + return json.Marshal(&struct { + Flags *[]string `json:"flags,omitempty"` + *Alias + }{ + Flags: u.Flags, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Format) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/formstracktrigger.go b/platformclientv2/formstracktrigger.go index 7b6b32c8c..a7eebfe8b 100644 --- a/platformclientv2/formstracktrigger.go +++ b/platformclientv2/formstracktrigger.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Formstracktrigger struct { } +func (u *Formstracktrigger) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Formstracktrigger + + + + return json.Marshal(&struct { + Selector *string `json:"selector,omitempty"` + + FormName *string `json:"formName,omitempty"` + + CaptureDataOnFormAbandon *bool `json:"captureDataOnFormAbandon,omitempty"` + + CaptureDataOnFormSubmit *bool `json:"captureDataOnFormSubmit,omitempty"` + *Alias + }{ + Selector: u.Selector, + + FormName: u.FormName, + + CaptureDataOnFormAbandon: u.CaptureDataOnFormAbandon, + + CaptureDataOnFormSubmit: u.CaptureDataOnFormSubmit, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Formstracktrigger) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/freeseatingconfiguration.go b/platformclientv2/freeseatingconfiguration.go index 1bcbe1f2c..b7ce15256 100644 --- a/platformclientv2/freeseatingconfiguration.go +++ b/platformclientv2/freeseatingconfiguration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Freeseatingconfiguration struct { } +func (u *Freeseatingconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Freeseatingconfiguration + + + + return json.Marshal(&struct { + FreeSeatingState *string `json:"freeSeatingState,omitempty"` + + TtlMinutes *int `json:"ttlMinutes,omitempty"` + *Alias + }{ + FreeSeatingState: u.FreeSeatingState, + + TtlMinutes: u.TtlMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Freeseatingconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/fromemailaddress.go b/platformclientv2/fromemailaddress.go index e1edc3a55..815d4b5cf 100644 --- a/platformclientv2/fromemailaddress.go +++ b/platformclientv2/fromemailaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Fromemailaddress struct { } +func (u *Fromemailaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Fromemailaddress + + + + return json.Marshal(&struct { + Domain *Domainentityref `json:"domain,omitempty"` + + FriendlyName *string `json:"friendlyName,omitempty"` + + LocalPart *string `json:"localPart,omitempty"` + *Alias + }{ + Domain: u.Domain, + + FriendlyName: u.FriendlyName, + + LocalPart: u.LocalPart, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Fromemailaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gamificationstatus.go b/platformclientv2/gamificationstatus.go index cd773b55c..d5bf7a5fe 100644 --- a/platformclientv2/gamificationstatus.go +++ b/platformclientv2/gamificationstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,37 @@ type Gamificationstatus struct { } +func (u *Gamificationstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gamificationstatus + + + DateStart := new(string) + if u.DateStart != nil { + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%d") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + IsActive *bool `json:"isActive,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + AutomaticUserAssignment *bool `json:"automaticUserAssignment,omitempty"` + *Alias + }{ + IsActive: u.IsActive, + + DateStart: DateStart, + + AutomaticUserAssignment: u.AutomaticUserAssignment, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gamificationstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gdprjourneycustomer.go b/platformclientv2/gdprjourneycustomer.go index 2027fb673..d2001445b 100644 --- a/platformclientv2/gdprjourneycustomer.go +++ b/platformclientv2/gdprjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Gdprjourneycustomer struct { } +func (u *Gdprjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gdprjourneycustomer + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gdprjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gdprrequest.go b/platformclientv2/gdprrequest.go index 2b12d584a..7a6d0a2be 100644 --- a/platformclientv2/gdprrequest.go +++ b/platformclientv2/gdprrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,66 @@ type Gdprrequest struct { } +func (u *Gdprrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gdprrequest + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ReplacementTerms *[]Replacementterm `json:"replacementTerms,omitempty"` + + RequestType *string `json:"requestType,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + Status *string `json:"status,omitempty"` + + Subject *Gdprsubject `json:"subject,omitempty"` + + ResultsUrl *string `json:"resultsUrl,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CreatedBy: u.CreatedBy, + + ReplacementTerms: u.ReplacementTerms, + + RequestType: u.RequestType, + + CreatedDate: CreatedDate, + + Status: u.Status, + + Subject: u.Subject, + + ResultsUrl: u.ResultsUrl, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gdprrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gdprrequestentitylisting.go b/platformclientv2/gdprrequestentitylisting.go index 22bf0b210..c956bf43f 100644 --- a/platformclientv2/gdprrequestentitylisting.go +++ b/platformclientv2/gdprrequestentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Gdprrequestentitylisting struct { } +func (u *Gdprrequestentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gdprrequestentitylisting + + + + return json.Marshal(&struct { + Entities *[]Gdprrequest `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gdprrequestentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gdprsubject.go b/platformclientv2/gdprsubject.go index 44d73e3a1..922709ad9 100644 --- a/platformclientv2/gdprsubject.go +++ b/platformclientv2/gdprsubject.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Gdprsubject struct { } +func (u *Gdprsubject) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gdprsubject + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + UserId *string `json:"userId,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + DialerContactId *Dialercontactid `json:"dialerContactId,omitempty"` + + JourneyCustomer *Gdprjourneycustomer `json:"journeyCustomer,omitempty"` + + SocialHandle *Socialhandle `json:"socialHandle,omitempty"` + + ExternalId *string `json:"externalId,omitempty"` + + Addresses *[]string `json:"addresses,omitempty"` + + PhoneNumbers *[]string `json:"phoneNumbers,omitempty"` + + EmailAddresses *[]string `json:"emailAddresses,omitempty"` + *Alias + }{ + Name: u.Name, + + UserId: u.UserId, + + ExternalContactId: u.ExternalContactId, + + DialerContactId: u.DialerContactId, + + JourneyCustomer: u.JourneyCustomer, + + SocialHandle: u.SocialHandle, + + ExternalId: u.ExternalId, + + Addresses: u.Addresses, + + PhoneNumbers: u.PhoneNumbers, + + EmailAddresses: u.EmailAddresses, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gdprsubject) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gdprsubjectentitylisting.go b/platformclientv2/gdprsubjectentitylisting.go index 30a1d4c3e..ff006a4db 100644 --- a/platformclientv2/gdprsubjectentitylisting.go +++ b/platformclientv2/gdprsubjectentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Gdprsubjectentitylisting struct { } +func (u *Gdprsubjectentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gdprsubjectentitylisting + + + + return json.Marshal(&struct { + Entities *[]Gdprsubject `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gdprsubjectentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/generalprogramjob.go b/platformclientv2/generalprogramjob.go index 421c45a4a..780252aa3 100644 --- a/platformclientv2/generalprogramjob.go +++ b/platformclientv2/generalprogramjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,58 @@ type Generalprogramjob struct { } +func (u *Generalprogramjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Generalprogramjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + CreatedBy *Addressableentityref `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Generalprogramjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/generalprogramjobrequest.go b/platformclientv2/generalprogramjobrequest.go index bbc95a332..445ff6af2 100644 --- a/platformclientv2/generalprogramjobrequest.go +++ b/platformclientv2/generalprogramjobrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Generalprogramjobrequest struct { } +func (u *Generalprogramjobrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Generalprogramjobrequest + + + + return json.Marshal(&struct { + Dialect *string `json:"dialect,omitempty"` + + Mode *string `json:"mode,omitempty"` + *Alias + }{ + Dialect: u.Dialect, + + Mode: u.Mode, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Generalprogramjobrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/generaltopic.go b/platformclientv2/generaltopic.go index 9b1dade26..6e792f324 100644 --- a/platformclientv2/generaltopic.go +++ b/platformclientv2/generaltopic.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Generaltopic struct { } +func (u *Generaltopic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Generaltopic + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Generaltopic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/generaltopicsentitylisting.go b/platformclientv2/generaltopicsentitylisting.go index 492271bdc..53fb374e0 100644 --- a/platformclientv2/generaltopicsentitylisting.go +++ b/platformclientv2/generaltopicsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Generaltopicsentitylisting struct { } +func (u *Generaltopicsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Generaltopicsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Generaltopic `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Generaltopicsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/generatebuforecastrequest.go b/platformclientv2/generatebuforecastrequest.go index fc6e8d907..744dc1a4a 100644 --- a/platformclientv2/generatebuforecastrequest.go +++ b/platformclientv2/generatebuforecastrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Generatebuforecastrequest struct { } +func (u *Generatebuforecastrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Generatebuforecastrequest + + + + return json.Marshal(&struct { + Description *string `json:"description,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + CanUseForScheduling *bool `json:"canUseForScheduling,omitempty"` + *Alias + }{ + Description: u.Description, + + WeekCount: u.WeekCount, + + CanUseForScheduling: u.CanUseForScheduling, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Generatebuforecastrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/genericsaml.go b/platformclientv2/genericsaml.go index 2e25aee46..650bfcee0 100644 --- a/platformclientv2/genericsaml.go +++ b/platformclientv2/genericsaml.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Genericsaml struct { } +func (u *Genericsaml) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Genericsaml + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + RelyingPartyIdentifier *string `json:"relyingPartyIdentifier,omitempty"` + + LogoImageData *string `json:"logoImageData,omitempty"` + + EndpointCompression *bool `json:"endpointCompression,omitempty"` + + NameIdentifierFormat *string `json:"nameIdentifierFormat,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + RelyingPartyIdentifier: u.RelyingPartyIdentifier, + + LogoImageData: u.LogoImageData, + + EndpointCompression: u.EndpointCompression, + + NameIdentifierFormat: u.NameIdentifierFormat, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Genericsaml) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/genesysbotconnector.go b/platformclientv2/genesysbotconnector.go index 68ff0dfaf..d73a5971e 100644 --- a/platformclientv2/genesysbotconnector.go +++ b/platformclientv2/genesysbotconnector.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Genesysbotconnector struct { } +func (u *Genesysbotconnector) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Genesysbotconnector + + + + return json.Marshal(&struct { + QueryParameters *map[string]string `json:"queryParameters,omitempty"` + *Alias + }{ + QueryParameters: u.QueryParameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Genesysbotconnector) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/geolocation.go b/platformclientv2/geolocation.go index 2bdd28af8..6cf1c3194 100644 --- a/platformclientv2/geolocation.go +++ b/platformclientv2/geolocation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Geolocation struct { } +func (u *Geolocation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Geolocation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Primary *bool `json:"primary,omitempty"` + + Latitude *float64 `json:"latitude,omitempty"` + + Longitude *float64 `json:"longitude,omitempty"` + + Country *string `json:"country,omitempty"` + + Region *string `json:"region,omitempty"` + + City *string `json:"city,omitempty"` + + Locations *[]Locationdefinition `json:"locations,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + Primary: u.Primary, + + Latitude: u.Latitude, + + Longitude: u.Longitude, + + Country: u.Country, + + Region: u.Region, + + City: u.City, + + Locations: u.Locations, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Geolocation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/geolocationeventgeolocation.go b/platformclientv2/geolocationeventgeolocation.go index ecd7a2e10..9255d5dbb 100644 --- a/platformclientv2/geolocationeventgeolocation.go +++ b/platformclientv2/geolocationeventgeolocation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Geolocationeventgeolocation struct { } +func (u *Geolocationeventgeolocation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Geolocationeventgeolocation + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + VarType *string `json:"type,omitempty"` + + Country *string `json:"country,omitempty"` + + Region *string `json:"region,omitempty"` + + City *string `json:"city,omitempty"` + *Alias + }{ + UserId: u.UserId, + + VarType: u.VarType, + + Country: u.Country, + + Region: u.Region, + + City: u.City, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Geolocationeventgeolocation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/geolocationsettings.go b/platformclientv2/geolocationsettings.go index 6f7480ade..89439dcdb 100644 --- a/platformclientv2/geolocationsettings.go +++ b/platformclientv2/geolocationsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Geolocationsettings struct { } +func (u *Geolocationsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Geolocationsettings + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + MapboxKey *string `json:"mapboxKey,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Enabled: u.Enabled, + + MapboxKey: u.MapboxKey, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Geolocationsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/getmetricdefinitionsresponse.go b/platformclientv2/getmetricdefinitionsresponse.go index f73202e23..fff62a1ed 100644 --- a/platformclientv2/getmetricdefinitionsresponse.go +++ b/platformclientv2/getmetricdefinitionsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Getmetricdefinitionsresponse struct { } +func (u *Getmetricdefinitionsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Getmetricdefinitionsresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Metricdefinition `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Getmetricdefinitionsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/getmetricsresponse.go b/platformclientv2/getmetricsresponse.go index 4faddb9c6..68c6771ce 100644 --- a/platformclientv2/getmetricsresponse.go +++ b/platformclientv2/getmetricsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Getmetricsresponse struct { } +func (u *Getmetricsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Getmetricsresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Metrics `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Getmetricsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/getprofilesresponse.go b/platformclientv2/getprofilesresponse.go index 45b69ca83..25519517d 100644 --- a/platformclientv2/getprofilesresponse.go +++ b/platformclientv2/getprofilesresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Getprofilesresponse struct { } +func (u *Getprofilesresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Getprofilesresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Performanceprofile `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Getprofilesresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gettemplatesresponse.go b/platformclientv2/gettemplatesresponse.go index a9b1d385a..8239d3fe8 100644 --- a/platformclientv2/gettemplatesresponse.go +++ b/platformclientv2/gettemplatesresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Gettemplatesresponse struct { } +func (u *Gettemplatesresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gettemplatesresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Objectivetemplate `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gettemplatesresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gkndocumentationresult.go b/platformclientv2/gkndocumentationresult.go index 618a64138..e42433340 100644 --- a/platformclientv2/gkndocumentationresult.go +++ b/platformclientv2/gkndocumentationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Gkndocumentationresult struct { } +func (u *Gkndocumentationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gkndocumentationresult + + + + return json.Marshal(&struct { + Content *string `json:"content,omitempty"` + + Link *string `json:"link,omitempty"` + + Title *string `json:"title,omitempty"` + + VarType *string `json:"_type,omitempty"` + *Alias + }{ + Content: u.Content, + + Link: u.Link, + + Title: u.Title, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gkndocumentationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gkndocumentationsearchcriteria.go b/platformclientv2/gkndocumentationsearchcriteria.go index 4625585e6..14ea8f3ed 100644 --- a/platformclientv2/gkndocumentationsearchcriteria.go +++ b/platformclientv2/gkndocumentationsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Gkndocumentationsearchcriteria struct { } +func (u *Gkndocumentationsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gkndocumentationsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Gkndocumentationsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gkndocumentationsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gkndocumentationsearchrequest.go b/platformclientv2/gkndocumentationsearchrequest.go index 8107e88c5..d9f209589 100644 --- a/platformclientv2/gkndocumentationsearchrequest.go +++ b/platformclientv2/gkndocumentationsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Gkndocumentationsearchrequest struct { } +func (u *Gkndocumentationsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gkndocumentationsearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + Query *[]Gkndocumentationsearchcriteria `json:"query,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gkndocumentationsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gkndocumentationsearchresponse.go b/platformclientv2/gkndocumentationsearchresponse.go index 78bc217a6..7040f80b9 100644 --- a/platformclientv2/gkndocumentationsearchresponse.go +++ b/platformclientv2/gkndocumentationsearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Gkndocumentationsearchresponse struct { } +func (u *Gkndocumentationsearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gkndocumentationsearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + CurrentPage *string `json:"currentPage,omitempty"` + + NextPage *string `json:"nextPage,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *[]Gkndocumentationresult `json:"results,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PreviousPage: u.PreviousPage, + + CurrentPage: u.CurrentPage, + + NextPage: u.NextPage, + + Types: u.Types, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gkndocumentationsearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/googledialogflowcustomsettings.go b/platformclientv2/googledialogflowcustomsettings.go index 05f93afa0..de6e5b65b 100644 --- a/platformclientv2/googledialogflowcustomsettings.go +++ b/platformclientv2/googledialogflowcustomsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Googledialogflowcustomsettings struct { } +func (u *Googledialogflowcustomsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Googledialogflowcustomsettings + + + + return json.Marshal(&struct { + Environment *string `json:"environment,omitempty"` + + EventName *string `json:"eventName,omitempty"` + + WebhookQueryParameters *map[string]string `json:"webhookQueryParameters,omitempty"` + + EventInputParameters *map[string]string `json:"eventInputParameters,omitempty"` + *Alias + }{ + Environment: u.Environment, + + EventName: u.EventName, + + WebhookQueryParameters: u.WebhookQueryParameters, + + EventInputParameters: u.EventInputParameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Googledialogflowcustomsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/greeting.go b/platformclientv2/greeting.go index 77ab331a3..4530b0b32 100644 --- a/platformclientv2/greeting.go +++ b/platformclientv2/greeting.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Greeting struct { } +func (u *Greeting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Greeting + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + OwnerType *string `json:"ownerType,omitempty"` + + Owner *Domainentity `json:"owner,omitempty"` + + AudioFile *Greetingaudiofile `json:"audioFile,omitempty"` + + AudioTTS *string `json:"audioTTS,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + OwnerType: u.OwnerType, + + Owner: u.Owner, + + AudioFile: u.AudioFile, + + AudioTTS: u.AudioTTS, + + CreatedDate: CreatedDate, + + CreatedBy: u.CreatedBy, + + ModifiedDate: ModifiedDate, + + ModifiedBy: u.ModifiedBy, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Greeting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/greetingaudiofile.go b/platformclientv2/greetingaudiofile.go index 9231d866d..a804217d4 100644 --- a/platformclientv2/greetingaudiofile.go +++ b/platformclientv2/greetingaudiofile.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Greetingaudiofile struct { } +func (u *Greetingaudiofile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Greetingaudiofile + + + + return json.Marshal(&struct { + DurationMilliseconds *int `json:"durationMilliseconds,omitempty"` + + SizeBytes *int `json:"sizeBytes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + DurationMilliseconds: u.DurationMilliseconds, + + SizeBytes: u.SizeBytes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Greetingaudiofile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/greetinglisting.go b/platformclientv2/greetinglisting.go index b1eb2f84b..9ee2a8927 100644 --- a/platformclientv2/greetinglisting.go +++ b/platformclientv2/greetinglisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Greetinglisting struct { } +func (u *Greetinglisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Greetinglisting + + + + return json.Marshal(&struct { + Entities *[]Greeting `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Greetinglisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/greetingmediainfo.go b/platformclientv2/greetingmediainfo.go index eb159b88e..be1f00572 100644 --- a/platformclientv2/greetingmediainfo.go +++ b/platformclientv2/greetingmediainfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Greetingmediainfo struct { } +func (u *Greetingmediainfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Greetingmediainfo + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MediaFileUri *string `json:"mediaFileUri,omitempty"` + + MediaImageUri *string `json:"mediaImageUri,omitempty"` + *Alias + }{ + Id: u.Id, + + MediaFileUri: u.MediaFileUri, + + MediaImageUri: u.MediaImageUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Greetingmediainfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/greetingowner.go b/platformclientv2/greetingowner.go index ce8fda66a..aa08e959d 100644 --- a/platformclientv2/greetingowner.go +++ b/platformclientv2/greetingowner.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Greetingowner struct { } +func (u *Greetingowner) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Greetingowner + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Greetingowner) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/group.go b/platformclientv2/group.go index 050896881..c0084975b 100644 --- a/platformclientv2/group.go +++ b/platformclientv2/group.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,82 @@ type Group struct { } +func (u *Group) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Group + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + State *string `json:"state,omitempty"` + + Version *int `json:"version,omitempty"` + + VarType *string `json:"type,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Addresses *[]Groupcontact `json:"addresses,omitempty"` + + RulesVisible *bool `json:"rulesVisible,omitempty"` + + Visibility *string `json:"visibility,omitempty"` + + Owners *[]User `json:"owners,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + DateModified: DateModified, + + MemberCount: u.MemberCount, + + State: u.State, + + Version: u.Version, + + VarType: u.VarType, + + Images: u.Images, + + Addresses: u.Addresses, + + RulesVisible: u.RulesVisible, + + Visibility: u.Visibility, + + Owners: u.Owners, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Group) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupcontact.go b/platformclientv2/groupcontact.go index 6e50a94b2..8f0524e73 100644 --- a/platformclientv2/groupcontact.go +++ b/platformclientv2/groupcontact.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Groupcontact struct { } +func (u *Groupcontact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupcontact + + + + return json.Marshal(&struct { + Address *string `json:"address,omitempty"` + + Extension *string `json:"extension,omitempty"` + + Display *string `json:"display,omitempty"` + + VarType *string `json:"type,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + *Alias + }{ + Address: u.Address, + + Extension: u.Extension, + + Display: u.Display, + + VarType: u.VarType, + + MediaType: u.MediaType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupcontact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupcreate.go b/platformclientv2/groupcreate.go index a224ad4cf..1a1e788e7 100644 --- a/platformclientv2/groupcreate.go +++ b/platformclientv2/groupcreate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,82 @@ type Groupcreate struct { } +func (u *Groupcreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupcreate + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + State *string `json:"state,omitempty"` + + Version *int `json:"version,omitempty"` + + VarType *string `json:"type,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Addresses *[]Groupcontact `json:"addresses,omitempty"` + + RulesVisible *bool `json:"rulesVisible,omitempty"` + + Visibility *string `json:"visibility,omitempty"` + + OwnerIds *[]string `json:"ownerIds,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + DateModified: DateModified, + + MemberCount: u.MemberCount, + + State: u.State, + + Version: u.Version, + + VarType: u.VarType, + + Images: u.Images, + + Addresses: u.Addresses, + + RulesVisible: u.RulesVisible, + + Visibility: u.Visibility, + + OwnerIds: u.OwnerIds, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupcreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupentitylisting.go b/platformclientv2/groupentitylisting.go index 139d78361..702416dee 100644 --- a/platformclientv2/groupentitylisting.go +++ b/platformclientv2/groupentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Groupentitylisting struct { } +func (u *Groupentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupentitylisting + + + + return json.Marshal(&struct { + Entities *[]Group `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupgreetingeventgreeting.go b/platformclientv2/groupgreetingeventgreeting.go index b4a47192f..89bed8171 100644 --- a/platformclientv2/groupgreetingeventgreeting.go +++ b/platformclientv2/groupgreetingeventgreeting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Groupgreetingeventgreeting struct { } +func (u *Groupgreetingeventgreeting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupgreetingeventgreeting + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + OwnerType *string `json:"ownerType,omitempty"` + + Owner *Groupgreetingeventgreetingowner `json:"owner,omitempty"` + + GreetingAudioFile *Groupgreetingeventgreetingaudiofile `json:"greetingAudioFile,omitempty"` + + AudioTTS *string `json:"audioTTS,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + OwnerType: u.OwnerType, + + Owner: u.Owner, + + GreetingAudioFile: u.GreetingAudioFile, + + AudioTTS: u.AudioTTS, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupgreetingeventgreeting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupgreetingeventgreetingaudiofile.go b/platformclientv2/groupgreetingeventgreetingaudiofile.go index 5ab4eeeb4..978fbca42 100644 --- a/platformclientv2/groupgreetingeventgreetingaudiofile.go +++ b/platformclientv2/groupgreetingeventgreetingaudiofile.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Groupgreetingeventgreetingaudiofile struct { } +func (u *Groupgreetingeventgreetingaudiofile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupgreetingeventgreetingaudiofile + + + + return json.Marshal(&struct { + DurationMilliseconds *int `json:"durationMilliseconds,omitempty"` + + SizeBytes *int `json:"sizeBytes,omitempty"` + *Alias + }{ + DurationMilliseconds: u.DurationMilliseconds, + + SizeBytes: u.SizeBytes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupgreetingeventgreetingaudiofile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupgreetingeventgreetingowner.go b/platformclientv2/groupgreetingeventgreetingowner.go index c4f3683aa..5c25f562e 100644 --- a/platformclientv2/groupgreetingeventgreetingowner.go +++ b/platformclientv2/groupgreetingeventgreetingowner.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Groupgreetingeventgreetingowner struct { } +func (u *Groupgreetingeventgreetingowner) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupgreetingeventgreetingowner + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupgreetingeventgreetingowner) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupmembersupdate.go b/platformclientv2/groupmembersupdate.go index 867228eb4..ccfef8b62 100644 --- a/platformclientv2/groupmembersupdate.go +++ b/platformclientv2/groupmembersupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Groupmembersupdate struct { } +func (u *Groupmembersupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupmembersupdate + + + + return json.Marshal(&struct { + MemberIds *[]string `json:"memberIds,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + MemberIds: u.MemberIds, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupmembersupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupprofile.go b/platformclientv2/groupprofile.go index bffdd3b1d..ab590cee2 100644 --- a/platformclientv2/groupprofile.go +++ b/platformclientv2/groupprofile.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Groupprofile struct { } +func (u *Groupprofile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupprofile + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + State *string `json:"state,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + State: u.State, + + DateModified: DateModified, + + Version: u.Version, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupprofile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupprofileentitylisting.go b/platformclientv2/groupprofileentitylisting.go index c5357e61a..058d9c656 100644 --- a/platformclientv2/groupprofileentitylisting.go +++ b/platformclientv2/groupprofileentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Groupprofileentitylisting struct { } +func (u *Groupprofileentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupprofileentitylisting + + + + return json.Marshal(&struct { + Entities *[]Groupprofile `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupprofileentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupsearchcriteria.go b/platformclientv2/groupsearchcriteria.go index 38a8002ed..c755db12f 100644 --- a/platformclientv2/groupsearchcriteria.go +++ b/platformclientv2/groupsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Groupsearchcriteria struct { } +func (u *Groupsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Groupsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupsearchrequest.go b/platformclientv2/groupsearchrequest.go index 99a6177b2..e7a20c013 100644 --- a/platformclientv2/groupsearchrequest.go +++ b/platformclientv2/groupsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Groupsearchrequest struct { } +func (u *Groupsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupsearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + Query *[]Groupsearchcriteria `json:"query,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupssearchresponse.go b/platformclientv2/groupssearchresponse.go index 692eac63b..0db4de6d5 100644 --- a/platformclientv2/groupssearchresponse.go +++ b/platformclientv2/groupssearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Groupssearchresponse struct { } +func (u *Groupssearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupssearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + CurrentPage *string `json:"currentPage,omitempty"` + + NextPage *string `json:"nextPage,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *[]Group `json:"results,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PreviousPage: u.PreviousPage, + + CurrentPage: u.CurrentPage, + + NextPage: u.NextPage, + + Types: u.Types, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupssearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/groupupdate.go b/platformclientv2/groupupdate.go index aaa83cfe1..c8585d26e 100644 --- a/platformclientv2/groupupdate.go +++ b/platformclientv2/groupupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Groupupdate struct { } +func (u *Groupupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Groupupdate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + State *string `json:"state,omitempty"` + + Version *int `json:"version,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Addresses *[]Groupcontact `json:"addresses,omitempty"` + + RulesVisible *bool `json:"rulesVisible,omitempty"` + + Visibility *string `json:"visibility,omitempty"` + + OwnerIds *[]string `json:"ownerIds,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + State: u.State, + + Version: u.Version, + + Images: u.Images, + + Addresses: u.Addresses, + + RulesVisible: u.RulesVisible, + + Visibility: u.Visibility, + + OwnerIds: u.OwnerIds, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Groupupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/gsuite.go b/platformclientv2/gsuite.go index 571eb5cc0..9d084e183 100644 --- a/platformclientv2/gsuite.go +++ b/platformclientv2/gsuite.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Gsuite struct { } +func (u *Gsuite) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Gsuite + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + RelyingPartyIdentifier *string `json:"relyingPartyIdentifier,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + RelyingPartyIdentifier: u.RelyingPartyIdentifier, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Gsuite) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/guestmemberinfo.go b/platformclientv2/guestmemberinfo.go index 5558fdfa0..6fa7353e5 100644 --- a/platformclientv2/guestmemberinfo.go +++ b/platformclientv2/guestmemberinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Guestmemberinfo struct { } +func (u *Guestmemberinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Guestmemberinfo + + + + return json.Marshal(&struct { + DisplayName *string `json:"displayName,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Email *string `json:"email,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + + CustomFields *map[string]string `json:"customFields,omitempty"` + *Alias + }{ + DisplayName: u.DisplayName, + + FirstName: u.FirstName, + + LastName: u.LastName, + + Email: u.Email, + + PhoneNumber: u.PhoneNumber, + + AvatarImageUrl: u.AvatarImageUrl, + + CustomFields: u.CustomFields, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Guestmemberinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/headcountforecast.go b/platformclientv2/headcountforecast.go index cee96b4ed..215908044 100644 --- a/platformclientv2/headcountforecast.go +++ b/platformclientv2/headcountforecast.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Headcountforecast struct { } +func (u *Headcountforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Headcountforecast + + + + return json.Marshal(&struct { + Required *[]Headcountinterval `json:"required,omitempty"` + + RequiredWithoutShrinkage *[]Headcountinterval `json:"requiredWithoutShrinkage,omitempty"` + *Alias + }{ + Required: u.Required, + + RequiredWithoutShrinkage: u.RequiredWithoutShrinkage, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Headcountforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/headcountinterval.go b/platformclientv2/headcountinterval.go index 80f1979be..f5858dede 100644 --- a/platformclientv2/headcountinterval.go +++ b/platformclientv2/headcountinterval.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Headcountinterval struct { } +func (u *Headcountinterval) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Headcountinterval + + + Interval := new(string) + if u.Interval != nil { + + *Interval = timeutil.Strftime(u.Interval, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Interval = nil + } + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Value *float64 `json:"value,omitempty"` + *Alias + }{ + Interval: Interval, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Headcountinterval) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/helplink.go b/platformclientv2/helplink.go index afc5aace7..d7a7e3068 100644 --- a/platformclientv2/helplink.go +++ b/platformclientv2/helplink.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Helplink struct { } +func (u *Helplink) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Helplink + + + + return json.Marshal(&struct { + Uri *string `json:"uri,omitempty"` + + Title *string `json:"title,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + Uri: u.Uri, + + Title: u.Title, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Helplink) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historicaladherenceactuals.go b/platformclientv2/historicaladherenceactuals.go index 8f57d4459..73f942dc1 100644 --- a/platformclientv2/historicaladherenceactuals.go +++ b/platformclientv2/historicaladherenceactuals.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Historicaladherenceactuals struct { } +func (u *Historicaladherenceactuals) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historicaladherenceactuals + + + + return json.Marshal(&struct { + ActualActivityCategory *string `json:"actualActivityCategory,omitempty"` + + StartOffsetSeconds *int `json:"startOffsetSeconds,omitempty"` + + EndOffsetSeconds *int `json:"endOffsetSeconds,omitempty"` + *Alias + }{ + ActualActivityCategory: u.ActualActivityCategory, + + StartOffsetSeconds: u.StartOffsetSeconds, + + EndOffsetSeconds: u.EndOffsetSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historicaladherenceactuals) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historicaladherencedaymetrics.go b/platformclientv2/historicaladherencedaymetrics.go index ae92b6a0a..3cd28c6e2 100644 --- a/platformclientv2/historicaladherencedaymetrics.go +++ b/platformclientv2/historicaladherencedaymetrics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Historicaladherencedaymetrics struct { } +func (u *Historicaladherencedaymetrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historicaladherencedaymetrics + + + + return json.Marshal(&struct { + DayStartOffsetSecs *int `json:"dayStartOffsetSecs,omitempty"` + + AdherenceScheduleSecs *int `json:"adherenceScheduleSecs,omitempty"` + + ConformanceScheduleSecs *int `json:"conformanceScheduleSecs,omitempty"` + + ConformanceActualSecs *int `json:"conformanceActualSecs,omitempty"` + + ExceptionCount *int `json:"exceptionCount,omitempty"` + + ExceptionDurationSecs *int `json:"exceptionDurationSecs,omitempty"` + + ImpactSeconds *int `json:"impactSeconds,omitempty"` + + ScheduleLengthSecs *int `json:"scheduleLengthSecs,omitempty"` + + ActualLengthSecs *int `json:"actualLengthSecs,omitempty"` + + AdherencePercentage *float64 `json:"adherencePercentage,omitempty"` + + ConformancePercentage *float64 `json:"conformancePercentage,omitempty"` + *Alias + }{ + DayStartOffsetSecs: u.DayStartOffsetSecs, + + AdherenceScheduleSecs: u.AdherenceScheduleSecs, + + ConformanceScheduleSecs: u.ConformanceScheduleSecs, + + ConformanceActualSecs: u.ConformanceActualSecs, + + ExceptionCount: u.ExceptionCount, + + ExceptionDurationSecs: u.ExceptionDurationSecs, + + ImpactSeconds: u.ImpactSeconds, + + ScheduleLengthSecs: u.ScheduleLengthSecs, + + ActualLengthSecs: u.ActualLengthSecs, + + AdherencePercentage: u.AdherencePercentage, + + ConformancePercentage: u.ConformancePercentage, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historicaladherencedaymetrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historicaladherenceexceptioninfo.go b/platformclientv2/historicaladherenceexceptioninfo.go index 5a5280729..71a1e4dda 100644 --- a/platformclientv2/historicaladherenceexceptioninfo.go +++ b/platformclientv2/historicaladherenceexceptioninfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Historicaladherenceexceptioninfo struct { } +func (u *Historicaladherenceexceptioninfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historicaladherenceexceptioninfo + + + + return json.Marshal(&struct { + StartOffsetSeconds *int `json:"startOffsetSeconds,omitempty"` + + EndOffsetSeconds *int `json:"endOffsetSeconds,omitempty"` + + ScheduledActivityCodeId *string `json:"scheduledActivityCodeId,omitempty"` + + ScheduledActivityCategory *string `json:"scheduledActivityCategory,omitempty"` + + ActualActivityCategory *string `json:"actualActivityCategory,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + RoutingStatus *Routingstatus `json:"routingStatus,omitempty"` + + Impact *string `json:"impact,omitempty"` + + SecondaryPresenceLookupId *string `json:"secondaryPresenceLookupId,omitempty"` + *Alias + }{ + StartOffsetSeconds: u.StartOffsetSeconds, + + EndOffsetSeconds: u.EndOffsetSeconds, + + ScheduledActivityCodeId: u.ScheduledActivityCodeId, + + ScheduledActivityCategory: u.ScheduledActivityCategory, + + ActualActivityCategory: u.ActualActivityCategory, + + SystemPresence: u.SystemPresence, + + RoutingStatus: u.RoutingStatus, + + Impact: u.Impact, + + SecondaryPresenceLookupId: u.SecondaryPresenceLookupId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historicaladherenceexceptioninfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historicaladherencequeryresult.go b/platformclientv2/historicaladherencequeryresult.go index ea86e331a..acc2494a7 100644 --- a/platformclientv2/historicaladherencequeryresult.go +++ b/platformclientv2/historicaladherencequeryresult.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Historicaladherencequeryresult struct { } +func (u *Historicaladherencequeryresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historicaladherencequeryresult + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + AdherencePercentage *float64 `json:"adherencePercentage,omitempty"` + + ConformancePercentage *float64 `json:"conformancePercentage,omitempty"` + + Impact *string `json:"impact,omitempty"` + + ExceptionInfo *[]Historicaladherenceexceptioninfo `json:"exceptionInfo,omitempty"` + + DayMetrics *[]Historicaladherencedaymetrics `json:"dayMetrics,omitempty"` + + Actuals *[]Historicaladherenceactuals `json:"actuals,omitempty"` + *Alias + }{ + UserId: u.UserId, + + StartDate: StartDate, + + EndDate: EndDate, + + AdherencePercentage: u.AdherencePercentage, + + ConformancePercentage: u.ConformancePercentage, + + Impact: u.Impact, + + ExceptionInfo: u.ExceptionInfo, + + DayMetrics: u.DayMetrics, + + Actuals: u.Actuals, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historicaladherencequeryresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historicalimportdeletejobresponse.go b/platformclientv2/historicalimportdeletejobresponse.go index b75fffc50..1d91d71c1 100644 --- a/platformclientv2/historicalimportdeletejobresponse.go +++ b/platformclientv2/historicalimportdeletejobresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Historicalimportdeletejobresponse struct { } +func (u *Historicalimportdeletejobresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historicalimportdeletejobresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Status *string `json:"status,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Status: u.Status, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historicalimportdeletejobresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historicalimportstatus.go b/platformclientv2/historicalimportstatus.go index 8b0c09818..0fd9896fd 100644 --- a/platformclientv2/historicalimportstatus.go +++ b/platformclientv2/historicalimportstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,86 @@ type Historicalimportstatus struct { } +func (u *Historicalimportstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historicalimportstatus + + + DateImportEnded := new(string) + if u.DateImportEnded != nil { + + *DateImportEnded = timeutil.Strftime(u.DateImportEnded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateImportEnded = nil + } + + DateImportStarted := new(string) + if u.DateImportStarted != nil { + + *DateImportStarted = timeutil.Strftime(u.DateImportStarted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateImportStarted = nil + } + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + RequestId *string `json:"requestId,omitempty"` + + DateImportEnded *string `json:"dateImportEnded,omitempty"` + + DateImportStarted *string `json:"dateImportStarted,omitempty"` + + Status *string `json:"status,omitempty"` + + VarError *string `json:"error,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Active *bool `json:"active,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + RequestId: u.RequestId, + + DateImportEnded: DateImportEnded, + + DateImportStarted: DateImportStarted, + + Status: u.Status, + + VarError: u.VarError, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Active: u.Active, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historicalimportstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historicalimportstatuslisting.go b/platformclientv2/historicalimportstatuslisting.go index 4a2e805be..f4cbeb916 100644 --- a/platformclientv2/historicalimportstatuslisting.go +++ b/platformclientv2/historicalimportstatuslisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Historicalimportstatuslisting struct { } +func (u *Historicalimportstatuslisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historicalimportstatuslisting + + + + return json.Marshal(&struct { + Entities *[]Historicalimportstatus `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historicalimportstatuslisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historyentry.go b/platformclientv2/historyentry.go index 5ff9a9fe4..3b2212457 100644 --- a/platformclientv2/historyentry.go +++ b/platformclientv2/historyentry.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Historyentry struct { } +func (u *Historyentry) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historyentry + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Action *string `json:"action,omitempty"` + + Resource *string `json:"resource,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + User *User `json:"user,omitempty"` + + Client *Domainentityref `json:"client,omitempty"` + + Version *string `json:"version,omitempty"` + + Secure *bool `json:"secure,omitempty"` + *Alias + }{ + Action: u.Action, + + Resource: u.Resource, + + Timestamp: Timestamp, + + User: u.User, + + Client: u.Client, + + Version: u.Version, + + Secure: u.Secure, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historyentry) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/historylisting.go b/platformclientv2/historylisting.go index 351b7cb17..665d9a1f5 100644 --- a/platformclientv2/historylisting.go +++ b/platformclientv2/historylisting.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -89,6 +90,114 @@ type Historylisting struct { } +func (u *Historylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Historylisting + + + Started := new(string) + if u.Started != nil { + + *Started = timeutil.Strftime(u.Started, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Started = nil + } + + Completed := new(string) + if u.Completed != nil { + + *Completed = timeutil.Strftime(u.Completed, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Completed = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Complete *bool `json:"complete,omitempty"` + + User *User `json:"user,omitempty"` + + Client *Domainentityref `json:"client,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + + ErrorDetails *[]Detail `json:"errorDetails,omitempty"` + + ErrorMessageParams *map[string]string `json:"errorMessageParams,omitempty"` + + ActionName *string `json:"actionName,omitempty"` + + ActionStatus *string `json:"actionStatus,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + System *bool `json:"system,omitempty"` + + Started *string `json:"started,omitempty"` + + Completed *string `json:"completed,omitempty"` + + Entities *[]Historyentry `json:"entities,omitempty"` + + Total *int `json:"total,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Id: u.Id, + + Complete: u.Complete, + + User: u.User, + + Client: u.Client, + + ErrorMessage: u.ErrorMessage, + + ErrorCode: u.ErrorCode, + + ErrorDetails: u.ErrorDetails, + + ErrorMessageParams: u.ErrorMessageParams, + + ActionName: u.ActionName, + + ActionStatus: u.ActionStatus, + + Name: u.Name, + + Description: u.Description, + + System: u.System, + + Started: Started, + + Completed: Completed, + + Entities: u.Entities, + + Total: u.Total, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Historylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/homerrecord.go b/platformclientv2/homerrecord.go index b35b7bdae..a73a08126 100644 --- a/platformclientv2/homerrecord.go +++ b/platformclientv2/homerrecord.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -213,6 +214,230 @@ type Homerrecord struct { } +func (u *Homerrecord) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Homerrecord + + + Date := new(string) + if u.Date != nil { + + *Date = timeutil.Strftime(u.Date, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Date = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Date *string `json:"date,omitempty"` + + MilliTs *string `json:"milliTs,omitempty"` + + MicroTs *string `json:"microTs,omitempty"` + + Method *string `json:"method,omitempty"` + + ReplyReason *string `json:"replyReason,omitempty"` + + Ruri *string `json:"ruri,omitempty"` + + RuriUser *string `json:"ruriUser,omitempty"` + + RuriDomain *string `json:"ruriDomain,omitempty"` + + FromUser *string `json:"fromUser,omitempty"` + + FromDomain *string `json:"fromDomain,omitempty"` + + FromTag *string `json:"fromTag,omitempty"` + + ToUser *string `json:"toUser,omitempty"` + + ToDomain *string `json:"toDomain,omitempty"` + + ToTag *string `json:"toTag,omitempty"` + + PidUser *string `json:"pidUser,omitempty"` + + ContactUser *string `json:"contactUser,omitempty"` + + AuthUser *string `json:"authUser,omitempty"` + + Callid *string `json:"callid,omitempty"` + + CallidAleg *string `json:"callidAleg,omitempty"` + + Via1 *string `json:"via1,omitempty"` + + Via1Branch *string `json:"via1Branch,omitempty"` + + Cseq *string `json:"cseq,omitempty"` + + Diversion *string `json:"diversion,omitempty"` + + Reason *string `json:"reason,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + Auth *string `json:"auth,omitempty"` + + UserAgent *string `json:"userAgent,omitempty"` + + SourceIp *string `json:"sourceIp,omitempty"` + + SourcePort *string `json:"sourcePort,omitempty"` + + DestinationIp *string `json:"destinationIp,omitempty"` + + DestinationPort *string `json:"destinationPort,omitempty"` + + ContactIp *string `json:"contactIp,omitempty"` + + ContactPort *string `json:"contactPort,omitempty"` + + OriginatorIp *string `json:"originatorIp,omitempty"` + + OriginatorPort *string `json:"originatorPort,omitempty"` + + CorrelationId *string `json:"correlationId,omitempty"` + + Proto *string `json:"proto,omitempty"` + + Family *string `json:"family,omitempty"` + + RtpStat *string `json:"rtpStat,omitempty"` + + VarType *string `json:"type,omitempty"` + + Node *string `json:"node,omitempty"` + + Trans *string `json:"trans,omitempty"` + + Dbnode *string `json:"dbnode,omitempty"` + + Msg *string `json:"msg,omitempty"` + + SourceAlias *string `json:"sourceAlias,omitempty"` + + DestinationAlias *string `json:"destinationAlias,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + ParticipantId *string `json:"participantId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Date: Date, + + MilliTs: u.MilliTs, + + MicroTs: u.MicroTs, + + Method: u.Method, + + ReplyReason: u.ReplyReason, + + Ruri: u.Ruri, + + RuriUser: u.RuriUser, + + RuriDomain: u.RuriDomain, + + FromUser: u.FromUser, + + FromDomain: u.FromDomain, + + FromTag: u.FromTag, + + ToUser: u.ToUser, + + ToDomain: u.ToDomain, + + ToTag: u.ToTag, + + PidUser: u.PidUser, + + ContactUser: u.ContactUser, + + AuthUser: u.AuthUser, + + Callid: u.Callid, + + CallidAleg: u.CallidAleg, + + Via1: u.Via1, + + Via1Branch: u.Via1Branch, + + Cseq: u.Cseq, + + Diversion: u.Diversion, + + Reason: u.Reason, + + ContentType: u.ContentType, + + Auth: u.Auth, + + UserAgent: u.UserAgent, + + SourceIp: u.SourceIp, + + SourcePort: u.SourcePort, + + DestinationIp: u.DestinationIp, + + DestinationPort: u.DestinationPort, + + ContactIp: u.ContactIp, + + ContactPort: u.ContactPort, + + OriginatorIp: u.OriginatorIp, + + OriginatorPort: u.OriginatorPort, + + CorrelationId: u.CorrelationId, + + Proto: u.Proto, + + Family: u.Family, + + RtpStat: u.RtpStat, + + VarType: u.VarType, + + Node: u.Node, + + Trans: u.Trans, + + Dbnode: u.Dbnode, + + Msg: u.Msg, + + SourceAlias: u.SourceAlias, + + DestinationAlias: u.DestinationAlias, + + ConversationId: u.ConversationId, + + ParticipantId: u.ParticipantId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Homerrecord) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/identitynow.go b/platformclientv2/identitynow.go index 00e0b296c..85c4aefa1 100644 --- a/platformclientv2/identitynow.go +++ b/platformclientv2/identitynow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Identitynow struct { } +func (u *Identitynow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Identitynow + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + RelyingPartyIdentifier *string `json:"relyingPartyIdentifier,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + RelyingPartyIdentifier: u.RelyingPartyIdentifier, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Identitynow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/idleeventtrigger.go b/platformclientv2/idleeventtrigger.go index b01e1aeef..2107a4e5a 100644 --- a/platformclientv2/idleeventtrigger.go +++ b/platformclientv2/idleeventtrigger.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Idleeventtrigger struct { } +func (u *Idleeventtrigger) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Idleeventtrigger + + + + return json.Marshal(&struct { + EventName *string `json:"eventName,omitempty"` + + IdleAfterSeconds *int `json:"idleAfterSeconds,omitempty"` + *Alias + }{ + EventName: u.EventName, + + IdleAfterSeconds: u.IdleAfterSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Idleeventtrigger) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ignoredactivitycategories.go b/platformclientv2/ignoredactivitycategories.go index 9dfc88c98..94b2dfffa 100644 --- a/platformclientv2/ignoredactivitycategories.go +++ b/platformclientv2/ignoredactivitycategories.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Ignoredactivitycategories struct { } +func (u *Ignoredactivitycategories) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ignoredactivitycategories + + + + return json.Marshal(&struct { + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ignoredactivitycategories) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/importerror.go b/platformclientv2/importerror.go index 771622b12..3bd4e32bc 100644 --- a/platformclientv2/importerror.go +++ b/platformclientv2/importerror.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Importerror struct { } +func (u *Importerror) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Importerror + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Line *int `json:"line,omitempty"` + *Alias + }{ + Message: u.Message, + + Line: u.Line, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Importerror) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/importreport.go b/platformclientv2/importreport.go index 24a6d202e..ee8f94a38 100644 --- a/platformclientv2/importreport.go +++ b/platformclientv2/importreport.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Importreport struct { } +func (u *Importreport) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Importreport + + + + return json.Marshal(&struct { + Errors *[]Importerror `json:"errors,omitempty"` + + Validated *Resultcounters `json:"validated,omitempty"` + + Imported *Resultcounters `json:"imported,omitempty"` + + TotalDocuments *int `json:"totalDocuments,omitempty"` + *Alias + }{ + Errors: u.Errors, + + Validated: u.Validated, + + Imported: u.Imported, + + TotalDocuments: u.TotalDocuments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Importreport) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/importscriptstatusresponse.go b/platformclientv2/importscriptstatusresponse.go index 410c34440..8e9540901 100644 --- a/platformclientv2/importscriptstatusresponse.go +++ b/platformclientv2/importscriptstatusresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Importscriptstatusresponse struct { } +func (u *Importscriptstatusresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Importscriptstatusresponse + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Succeeded *bool `json:"succeeded,omitempty"` + + Message *string `json:"message,omitempty"` + *Alias + }{ + Url: u.Url, + + Succeeded: u.Succeeded, + + Message: u.Message, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Importscriptstatusresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/importstatus.go b/platformclientv2/importstatus.go index 82b1732cb..901d5b78a 100644 --- a/platformclientv2/importstatus.go +++ b/platformclientv2/importstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Importstatus struct { } +func (u *Importstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Importstatus + + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + TotalRecords *int `json:"totalRecords,omitempty"` + + CompletedRecords *int `json:"completedRecords,omitempty"` + + PercentComplete *int `json:"percentComplete,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + *Alias + }{ + State: u.State, + + TotalRecords: u.TotalRecords, + + CompletedRecords: u.CompletedRecords, + + PercentComplete: u.PercentComplete, + + FailureReason: u.FailureReason, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Importstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/importstatusrequest.go b/platformclientv2/importstatusrequest.go index 7feb78ea0..2d1d7f4e4 100644 --- a/platformclientv2/importstatusrequest.go +++ b/platformclientv2/importstatusrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Importstatusrequest struct { } +func (u *Importstatusrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Importstatusrequest + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + *Alias + }{ + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Importstatusrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/inbounddomain.go b/platformclientv2/inbounddomain.go index 1dea0ed03..f32ed4a4f 100644 --- a/platformclientv2/inbounddomain.go +++ b/platformclientv2/inbounddomain.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Inbounddomain struct { } +func (u *Inbounddomain) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Inbounddomain + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + MxRecordStatus *string `json:"mxRecordStatus,omitempty"` + + SubDomain *bool `json:"subDomain,omitempty"` + + MailFromSettings *Mailfromresult `json:"mailFromSettings,omitempty"` + + CustomSMTPServer *Domainentityref `json:"customSMTPServer,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + MxRecordStatus: u.MxRecordStatus, + + SubDomain: u.SubDomain, + + MailFromSettings: u.MailFromSettings, + + CustomSMTPServer: u.CustomSMTPServer, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Inbounddomain) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/inbounddomainentitylisting.go b/platformclientv2/inbounddomainentitylisting.go index 2d0a67e38..a70305fd0 100644 --- a/platformclientv2/inbounddomainentitylisting.go +++ b/platformclientv2/inbounddomainentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Inbounddomainentitylisting struct { } +func (u *Inbounddomainentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Inbounddomainentitylisting + + + + return json.Marshal(&struct { + Entities *[]Inbounddomain `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Inbounddomainentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/inbounddomainpatchrequest.go b/platformclientv2/inbounddomainpatchrequest.go index 8bce45fd4..74ac0a26a 100644 --- a/platformclientv2/inbounddomainpatchrequest.go +++ b/platformclientv2/inbounddomainpatchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Inbounddomainpatchrequest struct { } +func (u *Inbounddomainpatchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Inbounddomainpatchrequest + + + + return json.Marshal(&struct { + MailFromSettings *Mailfromresult `json:"mailFromSettings,omitempty"` + + CustomSMTPServer *Domainentityref `json:"customSMTPServer,omitempty"` + *Alias + }{ + MailFromSettings: u.MailFromSettings, + + CustomSMTPServer: u.CustomSMTPServer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Inbounddomainpatchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/inboundmessagerequest.go b/platformclientv2/inboundmessagerequest.go index 3dc94eee6..98c15c208 100644 --- a/platformclientv2/inboundmessagerequest.go +++ b/platformclientv2/inboundmessagerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Inboundmessagerequest struct { } +func (u *Inboundmessagerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Inboundmessagerequest + + + + return json.Marshal(&struct { + QueueId *string `json:"queueId,omitempty"` + + FlowId *string `json:"flowId,omitempty"` + + Provider *string `json:"provider,omitempty"` + + SkillIds *[]string `json:"skillIds,omitempty"` + + LanguageId *string `json:"languageId,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ToAddress *string `json:"toAddress,omitempty"` + + ToName *string `json:"toName,omitempty"` + + FromAddress *string `json:"fromAddress,omitempty"` + + FromName *string `json:"fromName,omitempty"` + + Subject *string `json:"subject,omitempty"` + *Alias + }{ + QueueId: u.QueueId, + + FlowId: u.FlowId, + + Provider: u.Provider, + + SkillIds: u.SkillIds, + + LanguageId: u.LanguageId, + + Priority: u.Priority, + + Attributes: u.Attributes, + + ToAddress: u.ToAddress, + + ToName: u.ToName, + + FromAddress: u.FromAddress, + + FromName: u.FromName, + + Subject: u.Subject, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Inboundmessagerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/inboundroute.go b/platformclientv2/inboundroute.go index cb7a460f4..ccecb194d 100644 --- a/platformclientv2/inboundroute.go +++ b/platformclientv2/inboundroute.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Inboundroute struct { } +func (u *Inboundroute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Inboundroute + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Pattern *string `json:"pattern,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Domainentityref `json:"skills,omitempty"` + + Language *Domainentityref `json:"language,omitempty"` + + FromName *string `json:"fromName,omitempty"` + + FromEmail *string `json:"fromEmail,omitempty"` + + Flow *Domainentityref `json:"flow,omitempty"` + + ReplyEmailAddress **Queueemailaddress `json:"replyEmailAddress,omitempty"` + + AutoBcc *[]Emailaddress `json:"autoBcc,omitempty"` + + SpamFlow *Domainentityref `json:"spamFlow,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Pattern: u.Pattern, + + Queue: u.Queue, + + Priority: u.Priority, + + Skills: u.Skills, + + Language: u.Language, + + FromName: u.FromName, + + FromEmail: u.FromEmail, + + Flow: u.Flow, + + ReplyEmailAddress: u.ReplyEmailAddress, + + AutoBcc: u.AutoBcc, + + SpamFlow: u.SpamFlow, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Inboundroute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/inboundrouteentitylisting.go b/platformclientv2/inboundrouteentitylisting.go index b737b0c63..ec1e1bf33 100644 --- a/platformclientv2/inboundrouteentitylisting.go +++ b/platformclientv2/inboundrouteentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Inboundrouteentitylisting struct { } +func (u *Inboundrouteentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Inboundrouteentitylisting + + + + return json.Marshal(&struct { + Entities *[]Inboundroute `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Inboundrouteentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/initiatescreenrecording.go b/platformclientv2/initiatescreenrecording.go index 2bbbb8248..00855ae23 100644 --- a/platformclientv2/initiatescreenrecording.go +++ b/platformclientv2/initiatescreenrecording.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Initiatescreenrecording struct { } +func (u *Initiatescreenrecording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Initiatescreenrecording + + + + return json.Marshal(&struct { + RecordACW *bool `json:"recordACW,omitempty"` + + ArchiveRetention *Archiveretention `json:"archiveRetention,omitempty"` + + DeleteRetention *Deleteretention `json:"deleteRetention,omitempty"` + *Alias + }{ + RecordACW: u.RecordACW, + + ArchiveRetention: u.ArchiveRetention, + + DeleteRetention: u.DeleteRetention, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Initiatescreenrecording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integration.go b/platformclientv2/integration.go index a6cf95843..58359e4a2 100644 --- a/platformclientv2/integration.go +++ b/platformclientv2/integration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Integration struct { } +func (u *Integration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integration + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + IntegrationType *Integrationtype `json:"integrationType,omitempty"` + + Notes *string `json:"notes,omitempty"` + + IntendedState *string `json:"intendedState,omitempty"` + + Config *Integrationconfigurationinfo `json:"config,omitempty"` + + ReportedState *Integrationstatusinfo `json:"reportedState,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + IntegrationType: u.IntegrationType, + + Notes: u.Notes, + + IntendedState: u.IntendedState, + + Config: u.Config, + + ReportedState: u.ReportedState, + + Attributes: u.Attributes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationaction.go b/platformclientv2/integrationaction.go index c963098e6..e2e3563a6 100644 --- a/platformclientv2/integrationaction.go +++ b/platformclientv2/integrationaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Integrationaction struct { } +func (u *Integrationaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationactionfields.go b/platformclientv2/integrationactionfields.go index 381dd8110..ac1e72cf6 100644 --- a/platformclientv2/integrationactionfields.go +++ b/platformclientv2/integrationactionfields.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Integrationactionfields struct { } +func (u *Integrationactionfields) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationactionfields + + + + return json.Marshal(&struct { + IntegrationAction *Integrationaction `json:"integrationAction,omitempty"` + + RequestMappings *[]Requestmapping `json:"requestMappings,omitempty"` + *Alias + }{ + IntegrationAction: u.IntegrationAction, + + RequestMappings: u.RequestMappings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationactionfields) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationconfiguration.go b/platformclientv2/integrationconfiguration.go index bc47e80d9..5b16585c1 100644 --- a/platformclientv2/integrationconfiguration.go +++ b/platformclientv2/integrationconfiguration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Integrationconfiguration struct { } +func (u *Integrationconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationconfiguration + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + Properties *interface{} `json:"properties,omitempty"` + + Advanced *interface{} `json:"advanced,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Credentials *map[string]Credentialinfo `json:"credentials,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + Properties: u.Properties, + + Advanced: u.Advanced, + + Notes: u.Notes, + + Credentials: u.Credentials, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationconfigurationinfo.go b/platformclientv2/integrationconfigurationinfo.go index ab1168c9b..2eaaf9ad8 100644 --- a/platformclientv2/integrationconfigurationinfo.go +++ b/platformclientv2/integrationconfigurationinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Integrationconfigurationinfo struct { } +func (u *Integrationconfigurationinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationconfigurationinfo + + + + return json.Marshal(&struct { + Current *Integrationconfiguration `json:"current,omitempty"` + *Alias + }{ + Current: u.Current, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationconfigurationinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationentitylisting.go b/platformclientv2/integrationentitylisting.go index 628fe3b42..500a32721 100644 --- a/platformclientv2/integrationentitylisting.go +++ b/platformclientv2/integrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Integrationentitylisting struct { } +func (u *Integrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Integration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationevent.go b/platformclientv2/integrationevent.go index b9681b6eb..f08d103e0 100644 --- a/platformclientv2/integrationevent.go +++ b/platformclientv2/integrationevent.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Integrationevent struct { } +func (u *Integrationevent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationevent + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CorrelationId *string `json:"correlationId,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + Level *string `json:"level,omitempty"` + + EventCode *string `json:"eventCode,omitempty"` + + Message *Messageinfo `json:"message,omitempty"` + + Entities *[]Evententity `json:"entities,omitempty"` + + ContextAttributes *map[string]string `json:"contextAttributes,omitempty"` + + DetailMessage *Messageinfo `json:"detailMessage,omitempty"` + + User *User `json:"user,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + + CorrelationId: u.CorrelationId, + + Timestamp: Timestamp, + + Level: u.Level, + + EventCode: u.EventCode, + + Message: u.Message, + + Entities: u.Entities, + + ContextAttributes: u.ContextAttributes, + + DetailMessage: u.DetailMessage, + + User: u.User, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationevent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationevententitylisting.go b/platformclientv2/integrationevententitylisting.go index 4dd39d0aa..e034f306a 100644 --- a/platformclientv2/integrationevententitylisting.go +++ b/platformclientv2/integrationevententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Integrationevententitylisting struct { } +func (u *Integrationevententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationevententitylisting + + + + return json.Marshal(&struct { + Entities *[]Integrationevent `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationevententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationexport.go b/platformclientv2/integrationexport.go index f0c2a63d8..2751a9131 100644 --- a/platformclientv2/integrationexport.go +++ b/platformclientv2/integrationexport.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Integrationexport struct { } +func (u *Integrationexport) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationexport + + + + return json.Marshal(&struct { + Integration *Domainentityref `json:"integration,omitempty"` + + ShouldExportScreenRecordings *bool `json:"shouldExportScreenRecordings,omitempty"` + *Alias + }{ + Integration: u.Integration, + + ShouldExportScreenRecordings: u.ShouldExportScreenRecordings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationexport) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationstatusinfo.go b/platformclientv2/integrationstatusinfo.go index a20fdbff1..c9bbb8ac3 100644 --- a/platformclientv2/integrationstatusinfo.go +++ b/platformclientv2/integrationstatusinfo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Integrationstatusinfo struct { } +func (u *Integrationstatusinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationstatusinfo + + + LastUpdated := new(string) + if u.LastUpdated != nil { + + *LastUpdated = timeutil.Strftime(u.LastUpdated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + LastUpdated = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Effective *string `json:"effective,omitempty"` + + Detail *Messageinfo `json:"detail,omitempty"` + + LastUpdated *string `json:"lastUpdated,omitempty"` + *Alias + }{ + Code: u.Code, + + Effective: u.Effective, + + Detail: u.Detail, + + LastUpdated: LastUpdated, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationstatusinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationtype.go b/platformclientv2/integrationtype.go index 8e5fc01bb..fea6e133b 100644 --- a/platformclientv2/integrationtype.go +++ b/platformclientv2/integrationtype.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -104,6 +105,114 @@ type Integrationtype struct { } +func (u *Integrationtype) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationtype + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Provider *string `json:"provider,omitempty"` + + Category *string `json:"category,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + ConfigPropertiesSchemaUri *string `json:"configPropertiesSchemaUri,omitempty"` + + ConfigAdvancedSchemaUri *string `json:"configAdvancedSchemaUri,omitempty"` + + HelpUri *string `json:"helpUri,omitempty"` + + TermsOfServiceUri *string `json:"termsOfServiceUri,omitempty"` + + VendorName *string `json:"vendorName,omitempty"` + + VendorWebsiteUri *string `json:"vendorWebsiteUri,omitempty"` + + MarketplaceUri *string `json:"marketplaceUri,omitempty"` + + FaqUri *string `json:"faqUri,omitempty"` + + PrivacyPolicyUri *string `json:"privacyPolicyUri,omitempty"` + + SupportContactUri *string `json:"supportContactUri,omitempty"` + + SalesContactUri *string `json:"salesContactUri,omitempty"` + + HelpLinks *[]Helplink `json:"helpLinks,omitempty"` + + Credentials *map[string]Credentialspecification `json:"credentials,omitempty"` + + NonInstallable *bool `json:"nonInstallable,omitempty"` + + MaxInstances *int `json:"maxInstances,omitempty"` + + UserPermissions *[]string `json:"userPermissions,omitempty"` + + VendorOAuthClientIds *[]string `json:"vendorOAuthClientIds,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Provider: u.Provider, + + Category: u.Category, + + Images: u.Images, + + ConfigPropertiesSchemaUri: u.ConfigPropertiesSchemaUri, + + ConfigAdvancedSchemaUri: u.ConfigAdvancedSchemaUri, + + HelpUri: u.HelpUri, + + TermsOfServiceUri: u.TermsOfServiceUri, + + VendorName: u.VendorName, + + VendorWebsiteUri: u.VendorWebsiteUri, + + MarketplaceUri: u.MarketplaceUri, + + FaqUri: u.FaqUri, + + PrivacyPolicyUri: u.PrivacyPolicyUri, + + SupportContactUri: u.SupportContactUri, + + SalesContactUri: u.SalesContactUri, + + HelpLinks: u.HelpLinks, + + Credentials: u.Credentials, + + NonInstallable: u.NonInstallable, + + MaxInstances: u.MaxInstances, + + UserPermissions: u.UserPermissions, + + VendorOAuthClientIds: u.VendorOAuthClientIds, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationtype) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/integrationtypeentitylisting.go b/platformclientv2/integrationtypeentitylisting.go index 8460b43e0..f8f5a298a 100644 --- a/platformclientv2/integrationtypeentitylisting.go +++ b/platformclientv2/integrationtypeentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Integrationtypeentitylisting struct { } +func (u *Integrationtypeentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Integrationtypeentitylisting + + + + return json.Marshal(&struct { + Entities *[]Integrationtype `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Integrationtypeentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/intent.go b/platformclientv2/intent.go index 925b5b308..0da8bd4f0 100644 --- a/platformclientv2/intent.go +++ b/platformclientv2/intent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Intent struct { } +func (u *Intent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Intent + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Intent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/intentdefinition.go b/platformclientv2/intentdefinition.go index 5361826fd..d6aa8aaa7 100644 --- a/platformclientv2/intentdefinition.go +++ b/platformclientv2/intentdefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Intentdefinition struct { } +func (u *Intentdefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Intentdefinition + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + EntityTypeBindings *[]Namedentitytypebinding `json:"entityTypeBindings,omitempty"` + + EntityNameReferences *[]string `json:"entityNameReferences,omitempty"` + + Utterances *[]Nluutterance `json:"utterances,omitempty"` + *Alias + }{ + Name: u.Name, + + EntityTypeBindings: u.EntityTypeBindings, + + EntityNameReferences: u.EntityNameReferences, + + Utterances: u.Utterances, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Intentdefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/intentfeedback.go b/platformclientv2/intentfeedback.go index 118d16bf7..19e6df594 100644 --- a/platformclientv2/intentfeedback.go +++ b/platformclientv2/intentfeedback.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Intentfeedback struct { } +func (u *Intentfeedback) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Intentfeedback + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Probability *float64 `json:"probability,omitempty"` + + Entities *[]Detectednamedentity `json:"entities,omitempty"` + + Assessment *string `json:"assessment,omitempty"` + *Alias + }{ + Name: u.Name, + + Probability: u.Probability, + + Entities: u.Entities, + + Assessment: u.Assessment, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Intentfeedback) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/interactionstatsalert.go b/platformclientv2/interactionstatsalert.go index 5c840c73b..2cbdd9d5f 100644 --- a/platformclientv2/interactionstatsalert.go +++ b/platformclientv2/interactionstatsalert.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,102 @@ type Interactionstatsalert struct { } +func (u *Interactionstatsalert) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Interactionstatsalert + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + DimensionValue *string `json:"dimensionValue,omitempty"` + + Metric *string `json:"metric,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + NumericRange *string `json:"numericRange,omitempty"` + + Statistic *string `json:"statistic,omitempty"` + + Value *float64 `json:"value,omitempty"` + + RuleId *string `json:"ruleId,omitempty"` + + Unread *bool `json:"unread,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + NotificationUsers *[]User `json:"notificationUsers,omitempty"` + + AlertTypes *[]string `json:"alertTypes,omitempty"` + + RuleUri *string `json:"ruleUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Dimension: u.Dimension, + + DimensionValue: u.DimensionValue, + + Metric: u.Metric, + + MediaType: u.MediaType, + + NumericRange: u.NumericRange, + + Statistic: u.Statistic, + + Value: u.Value, + + RuleId: u.RuleId, + + Unread: u.Unread, + + StartDate: StartDate, + + EndDate: EndDate, + + NotificationUsers: u.NotificationUsers, + + AlertTypes: u.AlertTypes, + + RuleUri: u.RuleUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Interactionstatsalert) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/interactionstatsalertcontainer.go b/platformclientv2/interactionstatsalertcontainer.go index 46fa82e72..51f66dda4 100644 --- a/platformclientv2/interactionstatsalertcontainer.go +++ b/platformclientv2/interactionstatsalertcontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Interactionstatsalertcontainer struct { } +func (u *Interactionstatsalertcontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Interactionstatsalertcontainer + + + + return json.Marshal(&struct { + Entities *[]Interactionstatsalert `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Interactionstatsalertcontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/interactionstatsrule.go b/platformclientv2/interactionstatsrule.go index 9a0ffe806..5ba1bfa47 100644 --- a/platformclientv2/interactionstatsrule.go +++ b/platformclientv2/interactionstatsrule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Interactionstatsrule struct { } +func (u *Interactionstatsrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Interactionstatsrule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + DimensionValue *string `json:"dimensionValue,omitempty"` + + Metric *string `json:"metric,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + NumericRange *string `json:"numericRange,omitempty"` + + Statistic *string `json:"statistic,omitempty"` + + Value *float64 `json:"value,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + InAlarm *bool `json:"inAlarm,omitempty"` + + NotificationUsers *[]User `json:"notificationUsers,omitempty"` + + AlertTypes *[]string `json:"alertTypes,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Dimension: u.Dimension, + + DimensionValue: u.DimensionValue, + + Metric: u.Metric, + + MediaType: u.MediaType, + + NumericRange: u.NumericRange, + + Statistic: u.Statistic, + + Value: u.Value, + + Enabled: u.Enabled, + + InAlarm: u.InAlarm, + + NotificationUsers: u.NotificationUsers, + + AlertTypes: u.AlertTypes, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Interactionstatsrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/interactionstatsrulecontainer.go b/platformclientv2/interactionstatsrulecontainer.go index 9cf3cd33b..a10b4d3c2 100644 --- a/platformclientv2/interactionstatsrulecontainer.go +++ b/platformclientv2/interactionstatsrulecontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Interactionstatsrulecontainer struct { } +func (u *Interactionstatsrulecontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Interactionstatsrulecontainer + + + + return json.Marshal(&struct { + Entities *[]Interactionstatsrule `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Interactionstatsrulecontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/intradayperformancepredictiondata.go b/platformclientv2/intradayperformancepredictiondata.go index e9b668155..029ff58e9 100644 --- a/platformclientv2/intradayperformancepredictiondata.go +++ b/platformclientv2/intradayperformancepredictiondata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Intradayperformancepredictiondata struct { } +func (u *Intradayperformancepredictiondata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Intradayperformancepredictiondata + + + + return json.Marshal(&struct { + ServiceLevelPercent *float64 `json:"serviceLevelPercent,omitempty"` + + AverageSpeedOfAnswerSeconds *float64 `json:"averageSpeedOfAnswerSeconds,omitempty"` + + OccupancyPercent *float64 `json:"occupancyPercent,omitempty"` + *Alias + }{ + ServiceLevelPercent: u.ServiceLevelPercent, + + AverageSpeedOfAnswerSeconds: u.AverageSpeedOfAnswerSeconds, + + OccupancyPercent: u.OccupancyPercent, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Intradayperformancepredictiondata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/intradayplanninggrouprequest.go b/platformclientv2/intradayplanninggrouprequest.go index 9bc356e48..554334626 100644 --- a/platformclientv2/intradayplanninggrouprequest.go +++ b/platformclientv2/intradayplanninggrouprequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,41 @@ type Intradayplanninggrouprequest struct { } +func (u *Intradayplanninggrouprequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Intradayplanninggrouprequest + + + BusinessUnitDate := new(string) + if u.BusinessUnitDate != nil { + *BusinessUnitDate = timeutil.Strftime(u.BusinessUnitDate, "%Y-%m-%d") + } else { + BusinessUnitDate = nil + } + + + return json.Marshal(&struct { + BusinessUnitDate *string `json:"businessUnitDate,omitempty"` + + Categories *[]string `json:"categories,omitempty"` + + PlanningGroupIds *[]string `json:"planningGroupIds,omitempty"` + + IntervalLengthMinutes *int `json:"intervalLengthMinutes,omitempty"` + *Alias + }{ + BusinessUnitDate: BusinessUnitDate, + + Categories: u.Categories, + + PlanningGroupIds: u.PlanningGroupIds, + + IntervalLengthMinutes: u.IntervalLengthMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Intradayplanninggrouprequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ipaddressauthentication.go b/platformclientv2/ipaddressauthentication.go index e24f67c26..2f6d02845 100644 --- a/platformclientv2/ipaddressauthentication.go +++ b/platformclientv2/ipaddressauthentication.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Ipaddressauthentication struct { } +func (u *Ipaddressauthentication) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ipaddressauthentication + + + + return json.Marshal(&struct { + NetworkWhitelist *[]string `json:"networkWhitelist,omitempty"` + *Alias + }{ + NetworkWhitelist: u.NetworkWhitelist, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ipaddressauthentication) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ipaddressrange.go b/platformclientv2/ipaddressrange.go index d49fe9ee2..222d03aaf 100644 --- a/platformclientv2/ipaddressrange.go +++ b/platformclientv2/ipaddressrange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Ipaddressrange struct { } +func (u *Ipaddressrange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ipaddressrange + + + + return json.Marshal(&struct { + Cidr *string `json:"cidr,omitempty"` + + Service *string `json:"service,omitempty"` + + Region *string `json:"region,omitempty"` + *Alias + }{ + Cidr: u.Cidr, + + Service: u.Service, + + Region: u.Region, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ipaddressrange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ipaddressrangelisting.go b/platformclientv2/ipaddressrangelisting.go index b1639066f..2d4a8dd38 100644 --- a/platformclientv2/ipaddressrangelisting.go +++ b/platformclientv2/ipaddressrangelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Ipaddressrangelisting struct { } +func (u *Ipaddressrangelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ipaddressrangelisting + + + + return json.Marshal(&struct { + Entities *[]Ipaddressrange `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ipaddressrangelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/items.go b/platformclientv2/items.go index 0861e0f16..fba3e706b 100644 --- a/platformclientv2/items.go +++ b/platformclientv2/items.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Items struct { } +func (u *Items) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Items + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Pattern *string `json:"pattern,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Pattern: u.Pattern, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Items) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/itemvalidationlimits.go b/platformclientv2/itemvalidationlimits.go index 4dadf2c23..26093dbe2 100644 --- a/platformclientv2/itemvalidationlimits.go +++ b/platformclientv2/itemvalidationlimits.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Itemvalidationlimits struct { } +func (u *Itemvalidationlimits) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Itemvalidationlimits + + + + return json.Marshal(&struct { + MinLength *Minlength `json:"minLength,omitempty"` + + MaxLength *Maxlength `json:"maxLength,omitempty"` + *Alias + }{ + MinLength: u.MinLength, + + MaxLength: u.MaxLength, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Itemvalidationlimits) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ivr.go b/platformclientv2/ivr.go index 68163e60a..9ed1dfffb 100644 --- a/platformclientv2/ivr.go +++ b/platformclientv2/ivr.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,102 @@ type Ivr struct { } +func (u *Ivr) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ivr + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Dnis *[]string `json:"dnis,omitempty"` + + OpenHoursFlow *Domainentityref `json:"openHoursFlow,omitempty"` + + ClosedHoursFlow *Domainentityref `json:"closedHoursFlow,omitempty"` + + HolidayHoursFlow *Domainentityref `json:"holidayHoursFlow,omitempty"` + + ScheduleGroup *Domainentityref `json:"scheduleGroup,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Dnis: u.Dnis, + + OpenHoursFlow: u.OpenHoursFlow, + + ClosedHoursFlow: u.ClosedHoursFlow, + + HolidayHoursFlow: u.HolidayHoursFlow, + + ScheduleGroup: u.ScheduleGroup, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ivr) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ivrentitylisting.go b/platformclientv2/ivrentitylisting.go index 4d8469859..679eb636c 100644 --- a/platformclientv2/ivrentitylisting.go +++ b/platformclientv2/ivrentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Ivrentitylisting struct { } +func (u *Ivrentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ivrentitylisting + + + + return json.Marshal(&struct { + Entities *[]Ivr `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ivrentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journey.go b/platformclientv2/journey.go index 34e3b8115..ade2b9110 100644 --- a/platformclientv2/journey.go +++ b/platformclientv2/journey.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Journey struct { } +func (u *Journey) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journey + + + + return json.Marshal(&struct { + Patterns *[]Journeypattern `json:"patterns,omitempty"` + *Alias + }{ + Patterns: u.Patterns, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journey) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaction.go b/platformclientv2/journeyaction.go index 54b25eafe..fc658a82e 100644 --- a/platformclientv2/journeyaction.go +++ b/platformclientv2/journeyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Journeyaction struct { } +func (u *Journeyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Journeyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyactionmap.go b/platformclientv2/journeyactionmap.go index 838936d7d..a152eb407 100644 --- a/platformclientv2/journeyactionmap.go +++ b/platformclientv2/journeyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Journeyactionmap struct { } +func (u *Journeyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaggregatedatacontainer.go b/platformclientv2/journeyaggregatedatacontainer.go index cb70e7b4f..01a515205 100644 --- a/platformclientv2/journeyaggregatedatacontainer.go +++ b/platformclientv2/journeyaggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Journeyaggregatedatacontainer struct { } +func (u *Journeyaggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaggregatequeryclause.go b/platformclientv2/journeyaggregatequeryclause.go index 956bf9804..adec9ac59 100644 --- a/platformclientv2/journeyaggregatequeryclause.go +++ b/platformclientv2/journeyaggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Journeyaggregatequeryclause struct { } +func (u *Journeyaggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Journeyaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaggregatequeryfilter.go b/platformclientv2/journeyaggregatequeryfilter.go index 40fc41ff4..b7d86e7b5 100644 --- a/platformclientv2/journeyaggregatequeryfilter.go +++ b/platformclientv2/journeyaggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Journeyaggregatequeryfilter struct { } +func (u *Journeyaggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Journeyaggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Journeyaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaggregatequerypredicate.go b/platformclientv2/journeyaggregatequerypredicate.go index e0567ae85..df3017646 100644 --- a/platformclientv2/journeyaggregatequerypredicate.go +++ b/platformclientv2/journeyaggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Journeyaggregatequerypredicate struct { } +func (u *Journeyaggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaggregatequeryresponse.go b/platformclientv2/journeyaggregatequeryresponse.go index 47c8d2361..8d2d1e1a6 100644 --- a/platformclientv2/journeyaggregatequeryresponse.go +++ b/platformclientv2/journeyaggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Journeyaggregatequeryresponse struct { } +func (u *Journeyaggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaggregatequeryresponse + + + + return json.Marshal(&struct { + Results *[]Journeyaggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaggregationquery.go b/platformclientv2/journeyaggregationquery.go index 6ce7ab1a1..7c95bd9a7 100644 --- a/platformclientv2/journeyaggregationquery.go +++ b/platformclientv2/journeyaggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Journeyaggregationquery struct { } +func (u *Journeyaggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Journeyaggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Journeyaggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyaggregationview.go b/platformclientv2/journeyaggregationview.go index ac86722ab..853465b40 100644 --- a/platformclientv2/journeyaggregationview.go +++ b/platformclientv2/journeyaggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Journeyaggregationview struct { } +func (u *Journeyaggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyaggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyaggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeycontext.go b/platformclientv2/journeycontext.go index 1d8a1b13c..fb732133b 100644 --- a/platformclientv2/journeycontext.go +++ b/platformclientv2/journeycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Journeycontext struct { } +func (u *Journeycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeycontext + + + + return json.Marshal(&struct { + Customer *Journeycustomer `json:"customer,omitempty"` + + CustomerSession *Journeycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Journeyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeycustomer.go b/platformclientv2/journeycustomer.go index f4e86b1e6..942c8348a 100644 --- a/platformclientv2/journeycustomer.go +++ b/platformclientv2/journeycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Journeycustomer struct { } +func (u *Journeycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeycustomersession.go b/platformclientv2/journeycustomersession.go index 39f65397d..c0d9c8ef0 100644 --- a/platformclientv2/journeycustomersession.go +++ b/platformclientv2/journeycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Journeycustomersession struct { } +func (u *Journeycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeyeventssettings.go b/platformclientv2/journeyeventssettings.go index d52ec110c..85fd72d71 100644 --- a/platformclientv2/journeyeventssettings.go +++ b/platformclientv2/journeyeventssettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Journeyeventssettings struct { } +func (u *Journeyeventssettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeyeventssettings + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + ExcludedQueryParameters *[]string `json:"excludedQueryParameters,omitempty"` + + ShouldKeepUrlFragment *bool `json:"shouldKeepUrlFragment,omitempty"` + + SearchQueryParameters *[]string `json:"searchQueryParameters,omitempty"` + + PageviewConfig *string `json:"pageviewConfig,omitempty"` + + ClickEvents *[]Selectoreventtrigger `json:"clickEvents,omitempty"` + + FormsTrackEvents *[]Formstracktrigger `json:"formsTrackEvents,omitempty"` + + IdleEvents *[]Idleeventtrigger `json:"idleEvents,omitempty"` + + InViewportEvents *[]Selectoreventtrigger `json:"inViewportEvents,omitempty"` + + ScrollDepthEvents *[]Scrollpercentageeventtrigger `json:"scrollDepthEvents,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + ExcludedQueryParameters: u.ExcludedQueryParameters, + + ShouldKeepUrlFragment: u.ShouldKeepUrlFragment, + + SearchQueryParameters: u.SearchQueryParameters, + + PageviewConfig: u.PageviewConfig, + + ClickEvents: u.ClickEvents, + + FormsTrackEvents: u.FormsTrackEvents, + + IdleEvents: u.IdleEvents, + + InViewportEvents: u.InViewportEvents, + + ScrollDepthEvents: u.ScrollDepthEvents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeyeventssettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeypattern.go b/platformclientv2/journeypattern.go index 38ea4a213..837f212cf 100644 --- a/platformclientv2/journeypattern.go +++ b/platformclientv2/journeypattern.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Journeypattern struct { } +func (u *Journeypattern) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeypattern + + + + return json.Marshal(&struct { + Criteria *[]Criteria `json:"criteria,omitempty"` + + Count *int `json:"count,omitempty"` + + StreamType *string `json:"streamType,omitempty"` + + SessionType *string `json:"sessionType,omitempty"` + + EventName *string `json:"eventName,omitempty"` + *Alias + }{ + Criteria: u.Criteria, + + Count: u.Count, + + StreamType: u.StreamType, + + SessionType: u.SessionType, + + EventName: u.EventName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeypattern) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeysegment.go b/platformclientv2/journeysegment.go index 5b85c6588..d58a64108 100644 --- a/platformclientv2/journeysegment.go +++ b/platformclientv2/journeysegment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Journeysegment struct { } +func (u *Journeysegment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeysegment + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + Version *int `json:"version,omitempty"` + + Description *string `json:"description,omitempty"` + + Color *string `json:"color,omitempty"` + + Scope *string `json:"scope,omitempty"` + + ShouldDisplayToAgent *bool `json:"shouldDisplayToAgent,omitempty"` + + Context *Context `json:"context,omitempty"` + + Journey *Journey `json:"journey,omitempty"` + + ExternalSegment *Externalsegment `json:"externalSegment,omitempty"` + + AssignmentExpirationDays *int `json:"assignmentExpirationDays,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Id: u.Id, + + IsActive: u.IsActive, + + DisplayName: u.DisplayName, + + Version: u.Version, + + Description: u.Description, + + Color: u.Color, + + Scope: u.Scope, + + ShouldDisplayToAgent: u.ShouldDisplayToAgent, + + Context: u.Context, + + Journey: u.Journey, + + ExternalSegment: u.ExternalSegment, + + AssignmentExpirationDays: u.AssignmentExpirationDays, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeysegment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/journeysurveyquestion.go b/platformclientv2/journeysurveyquestion.go index 0b7e74b3a..d772f3283 100644 --- a/platformclientv2/journeysurveyquestion.go +++ b/platformclientv2/journeysurveyquestion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Journeysurveyquestion struct { } +func (u *Journeysurveyquestion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Journeysurveyquestion + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Label *string `json:"label,omitempty"` + + CustomerProperty *string `json:"customerProperty,omitempty"` + + Choices *[]string `json:"choices,omitempty"` + + IsMandatory *bool `json:"isMandatory,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Label: u.Label, + + CustomerProperty: u.CustomerProperty, + + Choices: u.Choices, + + IsMandatory: u.IsMandatory, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Journeysurveyquestion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/jsonnode.go b/platformclientv2/jsonnode.go index 328aa78eb..b20b805be 100644 --- a/platformclientv2/jsonnode.go +++ b/platformclientv2/jsonnode.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Jsonnode type Jsonnode struct { } +func (u *Jsonnode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Jsonnode + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Jsonnode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/jsonnodesearchresponse.go b/platformclientv2/jsonnodesearchresponse.go index a54e3bc5b..f7d2e7b1c 100644 --- a/platformclientv2/jsonnodesearchresponse.go +++ b/platformclientv2/jsonnodesearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Jsonnodesearchresponse struct { } +func (u *Jsonnodesearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Jsonnodesearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + CurrentPage *string `json:"currentPage,omitempty"` + + NextPage *string `json:"nextPage,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *Arraynode `json:"results,omitempty"` + + Aggregations *Arraynode `json:"aggregations,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PreviousPage: u.PreviousPage, + + CurrentPage: u.CurrentPage, + + NextPage: u.NextPage, + + Types: u.Types, + + Results: u.Results, + + Aggregations: u.Aggregations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Jsonnodesearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/jsonschemadocument.go b/platformclientv2/jsonschemadocument.go index 6996468a1..1001e3955 100644 --- a/platformclientv2/jsonschemadocument.go +++ b/platformclientv2/jsonschemadocument.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Jsonschemadocument struct { } +func (u *Jsonschemadocument) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Jsonschemadocument + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Schema *string `json:"$schema,omitempty"` + + Title *string `json:"title,omitempty"` + + Description *string `json:"description,omitempty"` + + VarType *string `json:"type,omitempty"` + + Required *[]string `json:"required,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + Schema: u.Schema, + + Title: u.Title, + + Description: u.Description, + + VarType: u.VarType, + + Required: u.Required, + + Properties: u.Properties, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Jsonschemadocument) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/jsonsearchresponse.go b/platformclientv2/jsonsearchresponse.go index fc6296a4d..4c410a28e 100644 --- a/platformclientv2/jsonsearchresponse.go +++ b/platformclientv2/jsonsearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Jsonsearchresponse struct { } +func (u *Jsonsearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Jsonsearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *Arraynode `json:"results,omitempty"` + + Aggregations *Arraynode `json:"aggregations,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Types: u.Types, + + Results: u.Results, + + Aggregations: u.Aggregations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Jsonsearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/keyperformanceindicator.go b/platformclientv2/keyperformanceindicator.go index a1b7f27e9..c1a828d25 100644 --- a/platformclientv2/keyperformanceindicator.go +++ b/platformclientv2/keyperformanceindicator.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Keyperformanceindicator struct { } +func (u *Keyperformanceindicator) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Keyperformanceindicator + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Keyperformanceindicator) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/keyperformanceindicatorassessment.go b/platformclientv2/keyperformanceindicatorassessment.go index da728b077..2ade0a9ff 100644 --- a/platformclientv2/keyperformanceindicatorassessment.go +++ b/platformclientv2/keyperformanceindicatorassessment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Keyperformanceindicatorassessment struct { } +func (u *Keyperformanceindicatorassessment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Keyperformanceindicatorassessment + + + + return json.Marshal(&struct { + Kpi *string `json:"kpi,omitempty"` + + AssessmentResult *string `json:"assessmentResult,omitempty"` + + Checks *[]Check `json:"checks,omitempty"` + *Alias + }{ + Kpi: u.Kpi, + + AssessmentResult: u.AssessmentResult, + + Checks: u.Checks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Keyperformanceindicatorassessment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/keyrotationschedule.go b/platformclientv2/keyrotationschedule.go index 747a174b2..8b3ab0950 100644 --- a/platformclientv2/keyrotationschedule.go +++ b/platformclientv2/keyrotationschedule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Keyrotationschedule struct { } +func (u *Keyrotationschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Keyrotationschedule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Period *string `json:"period,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Period: u.Period, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Keyrotationschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/keyvalue.go b/platformclientv2/keyvalue.go index 244cf94ce..be5a91322 100644 --- a/platformclientv2/keyvalue.go +++ b/platformclientv2/keyvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Keyvalue struct { } +func (u *Keyvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Keyvalue + + + + return json.Marshal(&struct { + Key *string `json:"key,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Key: u.Key, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Keyvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxonheartbeatalertstopicheartbeatalert.go b/platformclientv2/klaxonheartbeatalertstopicheartbeatalert.go index 3b5ac3a9d..c72e6f164 100644 --- a/platformclientv2/klaxonheartbeatalertstopicheartbeatalert.go +++ b/platformclientv2/klaxonheartbeatalertstopicheartbeatalert.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Klaxonheartbeatalertstopicheartbeatalert struct { } +func (u *Klaxonheartbeatalertstopicheartbeatalert) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxonheartbeatalertstopicheartbeatalert + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SenderId *string `json:"senderId,omitempty"` + + HeartBeatTimeoutInMinutes *float32 `json:"heartBeatTimeoutInMinutes,omitempty"` + + RuleId *string `json:"ruleId,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + NotificationUsers *[]Klaxonheartbeatalertstopicnotificationuser `json:"notificationUsers,omitempty"` + + AlertTypes *[]string `json:"alertTypes,omitempty"` + + RuleType *string `json:"ruleType,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SenderId: u.SenderId, + + HeartBeatTimeoutInMinutes: u.HeartBeatTimeoutInMinutes, + + RuleId: u.RuleId, + + StartDate: StartDate, + + EndDate: EndDate, + + NotificationUsers: u.NotificationUsers, + + AlertTypes: u.AlertTypes, + + RuleType: u.RuleType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxonheartbeatalertstopicheartbeatalert) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxonheartbeatalertstopicnotificationuser.go b/platformclientv2/klaxonheartbeatalertstopicnotificationuser.go index 892667b85..b930cc184 100644 --- a/platformclientv2/klaxonheartbeatalertstopicnotificationuser.go +++ b/platformclientv2/klaxonheartbeatalertstopicnotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Klaxonheartbeatalertstopicnotificationuser struct { } +func (u *Klaxonheartbeatalertstopicnotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxonheartbeatalertstopicnotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + Id: u.Id, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxonheartbeatalertstopicnotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxonheartbeatrulestopicheartbeatrule.go b/platformclientv2/klaxonheartbeatrulestopicheartbeatrule.go index 94bb5673d..b1b0c8095 100644 --- a/platformclientv2/klaxonheartbeatrulestopicheartbeatrule.go +++ b/platformclientv2/klaxonheartbeatrulestopicheartbeatrule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Klaxonheartbeatrulestopicheartbeatrule struct { } +func (u *Klaxonheartbeatrulestopicheartbeatrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxonheartbeatrulestopicheartbeatrule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SenderId *string `json:"senderId,omitempty"` + + HeartBeatTimeoutInMinutes *float32 `json:"heartBeatTimeoutInMinutes,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + InAlarm *bool `json:"inAlarm,omitempty"` + + NotificationUsers *[]Klaxonheartbeatrulestopicnotificationuser `json:"notificationUsers,omitempty"` + + AlertTypes *[]string `json:"alertTypes,omitempty"` + + RuleType *string `json:"ruleType,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SenderId: u.SenderId, + + HeartBeatTimeoutInMinutes: u.HeartBeatTimeoutInMinutes, + + Enabled: u.Enabled, + + InAlarm: u.InAlarm, + + NotificationUsers: u.NotificationUsers, + + AlertTypes: u.AlertTypes, + + RuleType: u.RuleType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxonheartbeatrulestopicheartbeatrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxonheartbeatrulestopicnotificationuser.go b/platformclientv2/klaxonheartbeatrulestopicnotificationuser.go index daef483c9..c06f6ec12 100644 --- a/platformclientv2/klaxonheartbeatrulestopicnotificationuser.go +++ b/platformclientv2/klaxonheartbeatrulestopicnotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Klaxonheartbeatrulestopicnotificationuser struct { } +func (u *Klaxonheartbeatrulestopicnotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxonheartbeatrulestopicnotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + Id: u.Id, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxonheartbeatrulestopicnotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxoninteractionstatsalertstopicinteractionstatalert.go b/platformclientv2/klaxoninteractionstatsalertstopicinteractionstatalert.go index ad403b740..896b0dec9 100644 --- a/platformclientv2/klaxoninteractionstatsalertstopicinteractionstatalert.go +++ b/platformclientv2/klaxoninteractionstatsalertstopicinteractionstatalert.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Klaxoninteractionstatsalertstopicinteractionstatalert struct { } +func (u *Klaxoninteractionstatsalertstopicinteractionstatalert) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxoninteractionstatsalertstopicinteractionstatalert + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + RuleId *string `json:"ruleId,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + DimensionValue *string `json:"dimensionValue,omitempty"` + + DimensionValueName *string `json:"dimensionValueName,omitempty"` + + Metric *string `json:"metric,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + NumericRange *string `json:"numericRange,omitempty"` + + Statistic *string `json:"statistic,omitempty"` + + Value *float32 `json:"value,omitempty"` + + Unread *bool `json:"unread,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + NotificationUsers *[]Klaxoninteractionstatsalertstopicnotificationuser `json:"notificationUsers,omitempty"` + + AlertTypes *[]string `json:"alertTypes,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + RuleId: u.RuleId, + + Dimension: u.Dimension, + + DimensionValue: u.DimensionValue, + + DimensionValueName: u.DimensionValueName, + + Metric: u.Metric, + + MediaType: u.MediaType, + + NumericRange: u.NumericRange, + + Statistic: u.Statistic, + + Value: u.Value, + + Unread: u.Unread, + + StartDate: StartDate, + + EndDate: EndDate, + + NotificationUsers: u.NotificationUsers, + + AlertTypes: u.AlertTypes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxoninteractionstatsalertstopicinteractionstatalert) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxoninteractionstatsalertstopicnotificationuser.go b/platformclientv2/klaxoninteractionstatsalertstopicnotificationuser.go index d0a902276..a7e20f080 100644 --- a/platformclientv2/klaxoninteractionstatsalertstopicnotificationuser.go +++ b/platformclientv2/klaxoninteractionstatsalertstopicnotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Klaxoninteractionstatsalertstopicnotificationuser struct { } +func (u *Klaxoninteractionstatsalertstopicnotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxoninteractionstatsalertstopicnotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + Id: u.Id, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxoninteractionstatsalertstopicnotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxoninteractionstatsrulestopicinteractionstatrule.go b/platformclientv2/klaxoninteractionstatsrulestopicinteractionstatrule.go index bd4f64e51..f4687534e 100644 --- a/platformclientv2/klaxoninteractionstatsrulestopicinteractionstatrule.go +++ b/platformclientv2/klaxoninteractionstatsrulestopicinteractionstatrule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Klaxoninteractionstatsrulestopicinteractionstatrule struct { } +func (u *Klaxoninteractionstatsrulestopicinteractionstatrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxoninteractionstatsrulestopicinteractionstatrule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + DimensionValue *string `json:"dimensionValue,omitempty"` + + DimensionValueName *string `json:"dimensionValueName,omitempty"` + + Metric *string `json:"metric,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + NumericRange *string `json:"numericRange,omitempty"` + + Statistic *string `json:"statistic,omitempty"` + + Value *float32 `json:"value,omitempty"` + + InAlarm *bool `json:"inAlarm,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + NotificationUsers *[]Klaxoninteractionstatsrulestopicnotificationuser `json:"notificationUsers,omitempty"` + + AlertTypes *[]string `json:"alertTypes,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Dimension: u.Dimension, + + DimensionValue: u.DimensionValue, + + DimensionValueName: u.DimensionValueName, + + Metric: u.Metric, + + MediaType: u.MediaType, + + NumericRange: u.NumericRange, + + Statistic: u.Statistic, + + Value: u.Value, + + InAlarm: u.InAlarm, + + Enabled: u.Enabled, + + NotificationUsers: u.NotificationUsers, + + AlertTypes: u.AlertTypes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxoninteractionstatsrulestopicinteractionstatrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/klaxoninteractionstatsrulestopicnotificationuser.go b/platformclientv2/klaxoninteractionstatsrulestopicnotificationuser.go index c15234db8..8ddc01f81 100644 --- a/platformclientv2/klaxoninteractionstatsrulestopicnotificationuser.go +++ b/platformclientv2/klaxoninteractionstatsrulestopicnotificationuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Klaxoninteractionstatsrulestopicnotificationuser struct { } +func (u *Klaxoninteractionstatsrulestopicnotificationuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Klaxoninteractionstatsrulestopicnotificationuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + Id: u.Id, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Klaxoninteractionstatsrulestopicnotificationuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgebase.go b/platformclientv2/knowledgebase.go index 8f89f32eb..1027812be 100644 --- a/platformclientv2/knowledgebase.go +++ b/platformclientv2/knowledgebase.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,86 @@ type Knowledgebase struct { } +func (u *Knowledgebase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgebase + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateDocumentLastModified := new(string) + if u.DateDocumentLastModified != nil { + + *DateDocumentLastModified = timeutil.Strftime(u.DateDocumentLastModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateDocumentLastModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + CoreLanguage *string `json:"coreLanguage,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + FaqCount *int `json:"faqCount,omitempty"` + + DateDocumentLastModified *string `json:"dateDocumentLastModified,omitempty"` + + ArticleCount *int `json:"articleCount,omitempty"` + + Published *bool `json:"published,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + CoreLanguage: u.CoreLanguage, + + DateCreated: DateCreated, + + DateModified: DateModified, + + FaqCount: u.FaqCount, + + DateDocumentLastModified: DateDocumentLastModified, + + ArticleCount: u.ArticleCount, + + Published: u.Published, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgebase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgebaselisting.go b/platformclientv2/knowledgebaselisting.go index 1b41b6b15..e875a854b 100644 --- a/platformclientv2/knowledgebaselisting.go +++ b/platformclientv2/knowledgebaselisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Knowledgebaselisting struct { } +func (u *Knowledgebaselisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgebaselisting + + + + return json.Marshal(&struct { + Entities *[]Knowledgebase `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgebaselisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgecategory.go b/platformclientv2/knowledgecategory.go index e4327569c..021d540f8 100644 --- a/platformclientv2/knowledgecategory.go +++ b/platformclientv2/knowledgecategory.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Knowledgecategory struct { } +func (u *Knowledgecategory) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgecategory + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + KnowledgeBase *Knowledgebase `json:"knowledgeBase,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + KnowledgeBase: u.KnowledgeBase, + + LanguageCode: u.LanguageCode, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgecategory) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgecategoryrequest.go b/platformclientv2/knowledgecategoryrequest.go index 781cceba2..2a7873ed4 100644 --- a/platformclientv2/knowledgecategoryrequest.go +++ b/platformclientv2/knowledgecategoryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Knowledgecategoryrequest struct { } +func (u *Knowledgecategoryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgecategoryrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Parent *Documentcategoryinput `json:"parent,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Parent: u.Parent, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgecategoryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgedocument.go b/platformclientv2/knowledgedocument.go index baadd4eda..4432a674e 100644 --- a/platformclientv2/knowledgedocument.go +++ b/platformclientv2/knowledgedocument.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Knowledgedocument struct { } +func (u *Knowledgedocument) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgedocument + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + VarType *string `json:"type,omitempty"` + + Faq *Documentfaq `json:"faq,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Categories *[]Knowledgecategory `json:"categories,omitempty"` + + KnowledgeBase *Knowledgebase `json:"knowledgeBase,omitempty"` + + ExternalUrl *string `json:"externalUrl,omitempty"` + + Article *Documentarticle `json:"article,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + LanguageCode: u.LanguageCode, + + VarType: u.VarType, + + Faq: u.Faq, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Categories: u.Categories, + + KnowledgeBase: u.KnowledgeBase, + + ExternalUrl: u.ExternalUrl, + + Article: u.Article, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgedocument) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgedocumentbulkrequest.go b/platformclientv2/knowledgedocumentbulkrequest.go index 883e08e69..7225e1e10 100644 --- a/platformclientv2/knowledgedocumentbulkrequest.go +++ b/platformclientv2/knowledgedocumentbulkrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Knowledgedocumentbulkrequest struct { } +func (u *Knowledgedocumentbulkrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgedocumentbulkrequest + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + ExternalUrl *string `json:"externalUrl,omitempty"` + + Faq *Documentfaq `json:"faq,omitempty"` + + Categories *[]Documentcategoryinput `json:"categories,omitempty"` + + Article *Documentarticle `json:"article,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + VarType: u.VarType, + + ExternalUrl: u.ExternalUrl, + + Faq: u.Faq, + + Categories: u.Categories, + + Article: u.Article, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgedocumentbulkrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgedocumentrequest.go b/platformclientv2/knowledgedocumentrequest.go index 99675a367..6e679de70 100644 --- a/platformclientv2/knowledgedocumentrequest.go +++ b/platformclientv2/knowledgedocumentrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Knowledgedocumentrequest struct { } +func (u *Knowledgedocumentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgedocumentrequest + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + ExternalUrl *string `json:"externalUrl,omitempty"` + + Faq *Documentfaq `json:"faq,omitempty"` + + Categories *[]Documentcategoryinput `json:"categories,omitempty"` + + Article *Documentarticle `json:"article,omitempty"` + *Alias + }{ + VarType: u.VarType, + + ExternalUrl: u.ExternalUrl, + + Faq: u.Faq, + + Categories: u.Categories, + + Article: u.Article, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgedocumentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgeextendedcategory.go b/platformclientv2/knowledgeextendedcategory.go index 1dcb659f9..1dd5eb445 100644 --- a/platformclientv2/knowledgeextendedcategory.go +++ b/platformclientv2/knowledgeextendedcategory.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Knowledgeextendedcategory struct { } +func (u *Knowledgeextendedcategory) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgeextendedcategory + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + KnowledgeBase *Knowledgebase `json:"knowledgeBase,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Parent *Knowledgecategory `json:"parent,omitempty"` + + Children *[]Knowledgecategory `json:"children,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + KnowledgeBase: u.KnowledgeBase, + + LanguageCode: u.LanguageCode, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Parent: u.Parent, + + Children: u.Children, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgeextendedcategory) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgeimport.go b/platformclientv2/knowledgeimport.go index 2f4a7128a..213bd53f8 100644 --- a/platformclientv2/knowledgeimport.go +++ b/platformclientv2/knowledgeimport.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Knowledgeimport struct { } +func (u *Knowledgeimport) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgeimport + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + UploadKey *string `json:"uploadKey,omitempty"` + + FileType *string `json:"fileType,omitempty"` + + IgnoreHeaders *bool `json:"ignoreHeaders,omitempty"` + + Status *string `json:"status,omitempty"` + + Report *Importreport `json:"report,omitempty"` + + KnowledgeBase *Knowledgebase `json:"knowledgeBase,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + UploadKey: u.UploadKey, + + FileType: u.FileType, + + IgnoreHeaders: u.IgnoreHeaders, + + Status: u.Status, + + Report: u.Report, + + KnowledgeBase: u.KnowledgeBase, + + LanguageCode: u.LanguageCode, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgeimport) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgesearchdocument.go b/platformclientv2/knowledgesearchdocument.go index dd80d241f..cbacbdc06 100644 --- a/platformclientv2/knowledgesearchdocument.go +++ b/platformclientv2/knowledgesearchdocument.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Knowledgesearchdocument struct { } +func (u *Knowledgesearchdocument) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgesearchdocument + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + VarType *string `json:"type,omitempty"` + + Faq *Documentfaq `json:"faq,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Categories *[]Knowledgecategory `json:"categories,omitempty"` + + KnowledgeBase *Knowledgebase `json:"knowledgeBase,omitempty"` + + ExternalUrl *string `json:"externalUrl,omitempty"` + + Article *Documentarticle `json:"article,omitempty"` + + Confidence *float64 `json:"confidence,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + LanguageCode: u.LanguageCode, + + VarType: u.VarType, + + Faq: u.Faq, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Categories: u.Categories, + + KnowledgeBase: u.KnowledgeBase, + + ExternalUrl: u.ExternalUrl, + + Article: u.Article, + + Confidence: u.Confidence, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgesearchdocument) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgesearchrequest.go b/platformclientv2/knowledgesearchrequest.go index c320c5685..a262e2d95 100644 --- a/platformclientv2/knowledgesearchrequest.go +++ b/platformclientv2/knowledgesearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Knowledgesearchrequest struct { } +func (u *Knowledgesearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgesearchrequest + + + + return json.Marshal(&struct { + Query *string `json:"query,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + DocumentType *string `json:"documentType,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + SearchOnDraftDocuments *bool `json:"searchOnDraftDocuments,omitempty"` + *Alias + }{ + Query: u.Query, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + DocumentType: u.DocumentType, + + LanguageCode: u.LanguageCode, + + SearchOnDraftDocuments: u.SearchOnDraftDocuments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgesearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgesearchresponse.go b/platformclientv2/knowledgesearchresponse.go index a6c152228..bc4f41fd2 100644 --- a/platformclientv2/knowledgesearchresponse.go +++ b/platformclientv2/knowledgesearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Knowledgesearchresponse struct { } +func (u *Knowledgesearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgesearchresponse + + + + return json.Marshal(&struct { + SearchId *string `json:"searchId,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Results *[]Knowledgesearchdocument `json:"results,omitempty"` + *Alias + }{ + SearchId: u.SearchId, + + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgesearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/knowledgetraining.go b/platformclientv2/knowledgetraining.go index 3ded96753..d2e4782fa 100644 --- a/platformclientv2/knowledgetraining.go +++ b/platformclientv2/knowledgetraining.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,82 @@ type Knowledgetraining struct { } +func (u *Knowledgetraining) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Knowledgetraining + + + DateTriggered := new(string) + if u.DateTriggered != nil { + + *DateTriggered = timeutil.Strftime(u.DateTriggered, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateTriggered = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + DatePromoted := new(string) + if u.DatePromoted != nil { + + *DatePromoted = timeutil.Strftime(u.DatePromoted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DatePromoted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DateTriggered *string `json:"dateTriggered,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + Status *string `json:"status,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + KnowledgeBase *Knowledgebase `json:"knowledgeBase,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + KnowledgeDocumentsState *string `json:"knowledgeDocumentsState,omitempty"` + + DatePromoted *string `json:"datePromoted,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + DateTriggered: DateTriggered, + + DateCompleted: DateCompleted, + + Status: u.Status, + + LanguageCode: u.LanguageCode, + + KnowledgeBase: u.KnowledgeBase, + + ErrorMessage: u.ErrorMessage, + + KnowledgeDocumentsState: u.KnowledgeDocumentsState, + + DatePromoted: DatePromoted, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Knowledgetraining) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/language.go b/platformclientv2/language.go index d10c1c0fe..6a01c3c60 100644 --- a/platformclientv2/language.go +++ b/platformclientv2/language.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Language struct { } +func (u *Language) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Language + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + State *string `json:"state,omitempty"` + + Version *string `json:"version,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateModified: DateModified, + + State: u.State, + + Version: u.Version, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Language) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/languageentitylisting.go b/platformclientv2/languageentitylisting.go index 3900bb707..ed8c62649 100644 --- a/platformclientv2/languageentitylisting.go +++ b/platformclientv2/languageentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Languageentitylisting struct { } +func (u *Languageentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Languageentitylisting + + + + return json.Marshal(&struct { + Entities *[]Language `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Languageentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/languageoverride.go b/platformclientv2/languageoverride.go index 0ae4fef00..97efef2f9 100644 --- a/platformclientv2/languageoverride.go +++ b/platformclientv2/languageoverride.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Languageoverride struct { } +func (u *Languageoverride) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Languageoverride + + + + return json.Marshal(&struct { + Language *string `json:"language,omitempty"` + + Engine *string `json:"engine,omitempty"` + + Voice *string `json:"voice,omitempty"` + *Alias + }{ + Language: u.Language, + + Engine: u.Engine, + + Voice: u.Voice, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Languageoverride) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/languagereference.go b/platformclientv2/languagereference.go index 557211480..ae1581724 100644 --- a/platformclientv2/languagereference.go +++ b/platformclientv2/languagereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Languagereference struct { } +func (u *Languagereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Languagereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Languagereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/launcherbuttonsettings.go b/platformclientv2/launcherbuttonsettings.go index ec34f5b8e..49a731944 100644 --- a/platformclientv2/launcherbuttonsettings.go +++ b/platformclientv2/launcherbuttonsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Launcherbuttonsettings struct { } +func (u *Launcherbuttonsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Launcherbuttonsettings + + + + return json.Marshal(&struct { + Visibility *string `json:"visibility,omitempty"` + *Alias + }{ + Visibility: u.Visibility, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Launcherbuttonsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/leaderboard.go b/platformclientv2/leaderboard.go index e7fd6a8e9..0b3c03e85 100644 --- a/platformclientv2/leaderboard.go +++ b/platformclientv2/leaderboard.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,56 @@ type Leaderboard struct { } +func (u *Leaderboard) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Leaderboard + + + DateStartWorkday := new(string) + if u.DateStartWorkday != nil { + *DateStartWorkday = timeutil.Strftime(u.DateStartWorkday, "%Y-%m-%d") + } else { + DateStartWorkday = nil + } + + DateEndWorkday := new(string) + if u.DateEndWorkday != nil { + *DateEndWorkday = timeutil.Strftime(u.DateEndWorkday, "%Y-%m-%d") + } else { + DateEndWorkday = nil + } + + + return json.Marshal(&struct { + Division *Division `json:"division,omitempty"` + + Metric *Addressableentityref `json:"metric,omitempty"` + + DateStartWorkday *string `json:"dateStartWorkday,omitempty"` + + DateEndWorkday *string `json:"dateEndWorkday,omitempty"` + + Leaders *[]Leaderboarditem `json:"leaders,omitempty"` + + UserRank *Leaderboarditem `json:"userRank,omitempty"` + *Alias + }{ + Division: u.Division, + + Metric: u.Metric, + + DateStartWorkday: DateStartWorkday, + + DateEndWorkday: DateEndWorkday, + + Leaders: u.Leaders, + + UserRank: u.UserRank, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Leaderboard) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/leaderboarditem.go b/platformclientv2/leaderboarditem.go index 1bb9578d9..a03628690 100644 --- a/platformclientv2/leaderboarditem.go +++ b/platformclientv2/leaderboarditem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Leaderboarditem struct { } +func (u *Leaderboarditem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Leaderboarditem + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + Rank *int `json:"rank,omitempty"` + + Points *int `json:"points,omitempty"` + *Alias + }{ + User: u.User, + + Rank: u.Rank, + + Points: u.Points, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Leaderboarditem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassessment.go b/platformclientv2/learningassessment.go index 0eb671304..067a6b9b5 100644 --- a/platformclientv2/learningassessment.go +++ b/platformclientv2/learningassessment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,74 @@ type Learningassessment struct { } +func (u *Learningassessment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassessment + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateSubmitted := new(string) + if u.DateSubmitted != nil { + + *DateSubmitted = timeutil.Strftime(u.DateSubmitted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateSubmitted = nil + } + + + return json.Marshal(&struct { + AssessmentId *string `json:"assessmentId,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + AssessmentFormId *string `json:"assessmentFormId,omitempty"` + + Status *string `json:"status,omitempty"` + + Answers *Assessmentscoringset `json:"answers,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + DateSubmitted *string `json:"dateSubmitted,omitempty"` + *Alias + }{ + AssessmentId: u.AssessmentId, + + ContextId: u.ContextId, + + AssessmentFormId: u.AssessmentFormId, + + Status: u.Status, + + Answers: u.Answers, + + DateCreated: DateCreated, + + DateModified: DateModified, + + DateSubmitted: DateSubmitted, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassessment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassessmentscoringrequest.go b/platformclientv2/learningassessmentscoringrequest.go index 9c17f4207..a76c6a794 100644 --- a/platformclientv2/learningassessmentscoringrequest.go +++ b/platformclientv2/learningassessmentscoringrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassessmentscoringrequest struct { } +func (u *Learningassessmentscoringrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassessmentscoringrequest + + + + return json.Marshal(&struct { + AssessmentForm *Assessmentform `json:"assessmentForm,omitempty"` + + Answers *Assessmentscoringset `json:"answers,omitempty"` + *Alias + }{ + AssessmentForm: u.AssessmentForm, + + Answers: u.Answers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassessmentscoringrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignment.go b/platformclientv2/learningassignment.go index 450ff868c..0e7e8de45 100644 --- a/platformclientv2/learningassignment.go +++ b/platformclientv2/learningassignment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,114 @@ type Learningassignment struct { } +func (u *Learningassignment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignment + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateRecommendedForCompletion := new(string) + if u.DateRecommendedForCompletion != nil { + + *DateRecommendedForCompletion = timeutil.Strftime(u.DateRecommendedForCompletion, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateRecommendedForCompletion = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Assessment *Learningassessment `json:"assessment,omitempty"` + + CreatedBy *Userreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + IsOverdue *bool `json:"isOverdue,omitempty"` + + PercentageScore *float32 `json:"percentageScore,omitempty"` + + IsRule *bool `json:"isRule,omitempty"` + + IsManual *bool `json:"isManual,omitempty"` + + IsPassed *bool `json:"isPassed,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + State *string `json:"state,omitempty"` + + DateRecommendedForCompletion *string `json:"dateRecommendedForCompletion,omitempty"` + + Version *int `json:"version,omitempty"` + + Module *Learningmodule `json:"module,omitempty"` + + User *Userreference `json:"user,omitempty"` + + AssessmentForm *Assessmentform `json:"assessmentForm,omitempty"` + *Alias + }{ + Id: u.Id, + + Assessment: u.Assessment, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + IsOverdue: u.IsOverdue, + + PercentageScore: u.PercentageScore, + + IsRule: u.IsRule, + + IsManual: u.IsManual, + + IsPassed: u.IsPassed, + + SelfUri: u.SelfUri, + + State: u.State, + + DateRecommendedForCompletion: DateRecommendedForCompletion, + + Version: u.Version, + + Module: u.Module, + + User: u.User, + + AssessmentForm: u.AssessmentForm, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregateparam.go b/platformclientv2/learningassignmentaggregateparam.go index 3750233eb..1020601e9 100644 --- a/platformclientv2/learningassignmentaggregateparam.go +++ b/platformclientv2/learningassignmentaggregateparam.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Learningassignmentaggregateparam struct { } +func (u *Learningassignmentaggregateparam) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregateparam + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Learningassignmentaggregatequeryrequestfilter `json:"filter,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregateparam) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregatequeryrequestclause.go b/platformclientv2/learningassignmentaggregatequeryrequestclause.go index 7dc9354bc..0ed36b0d3 100644 --- a/platformclientv2/learningassignmentaggregatequeryrequestclause.go +++ b/platformclientv2/learningassignmentaggregatequeryrequestclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentaggregatequeryrequestclause struct { } +func (u *Learningassignmentaggregatequeryrequestclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregatequeryrequestclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Learningassignmentaggregatequeryrequestpredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregatequeryrequestclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregatequeryrequestfilter.go b/platformclientv2/learningassignmentaggregatequeryrequestfilter.go index 38228fd0f..fe932b2cf 100644 --- a/platformclientv2/learningassignmentaggregatequeryrequestfilter.go +++ b/platformclientv2/learningassignmentaggregatequeryrequestfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentaggregatequeryrequestfilter struct { } +func (u *Learningassignmentaggregatequeryrequestfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregatequeryrequestfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Learningassignmentaggregatequeryrequestclause `json:"clauses,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregatequeryrequestfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregatequeryrequestpredicate.go b/platformclientv2/learningassignmentaggregatequeryrequestpredicate.go index 316a376ab..f8590ab07 100644 --- a/platformclientv2/learningassignmentaggregatequeryrequestpredicate.go +++ b/platformclientv2/learningassignmentaggregatequeryrequestpredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentaggregatequeryrequestpredicate struct { } +func (u *Learningassignmentaggregatequeryrequestpredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregatequeryrequestpredicate + + + + return json.Marshal(&struct { + Dimension *string `json:"dimension,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Dimension: u.Dimension, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregatequeryrequestpredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregatequeryresponsedata.go b/platformclientv2/learningassignmentaggregatequeryresponsedata.go index cbdae8869..d6d898765 100644 --- a/platformclientv2/learningassignmentaggregatequeryresponsedata.go +++ b/platformclientv2/learningassignmentaggregatequeryresponsedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentaggregatequeryresponsedata struct { } +func (u *Learningassignmentaggregatequeryresponsedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregatequeryresponsedata + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Learningassignmentaggregatequeryresponsemetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregatequeryresponsedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregatequeryresponsegroupeddata.go b/platformclientv2/learningassignmentaggregatequeryresponsegroupeddata.go index 793990958..9c50958f0 100644 --- a/platformclientv2/learningassignmentaggregatequeryresponsegroupeddata.go +++ b/platformclientv2/learningassignmentaggregatequeryresponsegroupeddata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentaggregatequeryresponsegroupeddata struct { } +func (u *Learningassignmentaggregatequeryresponsegroupeddata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregatequeryresponsegroupeddata + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Learningassignmentaggregatequeryresponsedata `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregatequeryresponsegroupeddata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregatequeryresponsemetric.go b/platformclientv2/learningassignmentaggregatequeryresponsemetric.go index 1d87dd1fe..9aa897169 100644 --- a/platformclientv2/learningassignmentaggregatequeryresponsemetric.go +++ b/platformclientv2/learningassignmentaggregatequeryresponsemetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentaggregatequeryresponsemetric struct { } +func (u *Learningassignmentaggregatequeryresponsemetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregatequeryresponsemetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Stats *Learningassignmentaggregatequeryresponsestats `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregatequeryresponsemetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregatequeryresponsestats.go b/platformclientv2/learningassignmentaggregatequeryresponsestats.go index 84a394e6b..d7b15b38d 100644 --- a/platformclientv2/learningassignmentaggregatequeryresponsestats.go +++ b/platformclientv2/learningassignmentaggregatequeryresponsestats.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Learningassignmentaggregatequeryresponsestats struct { } +func (u *Learningassignmentaggregatequeryresponsestats) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregatequeryresponsestats + + + + return json.Marshal(&struct { + Count *int `json:"count,omitempty"` + + Min *int `json:"min,omitempty"` + + Max *int `json:"max,omitempty"` + + Sum *int `json:"sum,omitempty"` + *Alias + }{ + Count: u.Count, + + Min: u.Min, + + Max: u.Max, + + Sum: u.Sum, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregatequeryresponsestats) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentaggregateresponse.go b/platformclientv2/learningassignmentaggregateresponse.go index d40f1ff23..57b97ff77 100644 --- a/platformclientv2/learningassignmentaggregateresponse.go +++ b/platformclientv2/learningassignmentaggregateresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Learningassignmentaggregateresponse struct { } +func (u *Learningassignmentaggregateresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentaggregateresponse + + + + return json.Marshal(&struct { + Results *[]Learningassignmentaggregatequeryresponsegroupeddata `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentaggregateresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentbulkaddresponse.go b/platformclientv2/learningassignmentbulkaddresponse.go index 40459ab3e..0c500d387 100644 --- a/platformclientv2/learningassignmentbulkaddresponse.go +++ b/platformclientv2/learningassignmentbulkaddresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentbulkaddresponse struct { } +func (u *Learningassignmentbulkaddresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentbulkaddresponse + + + + return json.Marshal(&struct { + Entities *[]Learningassignment `json:"entities,omitempty"` + + DisallowedEntities *[]Disallowedentitylearningassignmentitem `json:"disallowedEntities,omitempty"` + *Alias + }{ + Entities: u.Entities, + + DisallowedEntities: u.DisallowedEntities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentbulkaddresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentbulkremoveresponse.go b/platformclientv2/learningassignmentbulkremoveresponse.go index cc4f75e45..8fb515a99 100644 --- a/platformclientv2/learningassignmentbulkremoveresponse.go +++ b/platformclientv2/learningassignmentbulkremoveresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentbulkremoveresponse struct { } +func (u *Learningassignmentbulkremoveresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentbulkremoveresponse + + + + return json.Marshal(&struct { + Entities *[]Learningassignmententity `json:"entities,omitempty"` + + DisallowedEntities *[]Disallowedentitylearningassignmentreference `json:"disallowedEntities,omitempty"` + *Alias + }{ + Entities: u.Entities, + + DisallowedEntities: u.DisallowedEntities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentbulkremoveresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentcreate.go b/platformclientv2/learningassignmentcreate.go index 7eb12d359..2661cd1aa 100644 --- a/platformclientv2/learningassignmentcreate.go +++ b/platformclientv2/learningassignmentcreate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Learningassignmentcreate struct { } +func (u *Learningassignmentcreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentcreate + + + RecommendedCompletionDate := new(string) + if u.RecommendedCompletionDate != nil { + + *RecommendedCompletionDate = timeutil.Strftime(u.RecommendedCompletionDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RecommendedCompletionDate = nil + } + + + return json.Marshal(&struct { + ModuleId *string `json:"moduleId,omitempty"` + + UserId *string `json:"userId,omitempty"` + + RecommendedCompletionDate *string `json:"recommendedCompletionDate,omitempty"` + *Alias + }{ + ModuleId: u.ModuleId, + + UserId: u.UserId, + + RecommendedCompletionDate: RecommendedCompletionDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentcreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmententity.go b/platformclientv2/learningassignmententity.go index bb390404d..26f0a0ac4 100644 --- a/platformclientv2/learningassignmententity.go +++ b/platformclientv2/learningassignmententity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Learningassignmententity struct { } +func (u *Learningassignmententity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmententity + + + + return json.Marshal(&struct { + AssignmentId *string `json:"assignmentId,omitempty"` + *Alias + }{ + AssignmentId: u.AssignmentId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmententity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentitem.go b/platformclientv2/learningassignmentitem.go index 620be58e6..ede94f2fa 100644 --- a/platformclientv2/learningassignmentitem.go +++ b/platformclientv2/learningassignmentitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentitem struct { } +func (u *Learningassignmentitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentitem + + + + return json.Marshal(&struct { + ModuleId *string `json:"moduleId,omitempty"` + + UserId *string `json:"userId,omitempty"` + *Alias + }{ + ModuleId: u.ModuleId, + + UserId: u.UserId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentreference.go b/platformclientv2/learningassignmentreference.go index d66c6a0f8..fdbdddfa8 100644 --- a/platformclientv2/learningassignmentreference.go +++ b/platformclientv2/learningassignmentreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentreference struct { } +func (u *Learningassignmentreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentruleruntopiclearningassignmentrulerunnotification.go b/platformclientv2/learningassignmentruleruntopiclearningassignmentrulerunnotification.go index ae4c5fae2..618b9e5a3 100644 --- a/platformclientv2/learningassignmentruleruntopiclearningassignmentrulerunnotification.go +++ b/platformclientv2/learningassignmentruleruntopiclearningassignmentrulerunnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentruleruntopiclearningassignmentrulerunnotification struct } +func (u *Learningassignmentruleruntopiclearningassignmentrulerunnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentruleruntopiclearningassignmentrulerunnotification + + + + return json.Marshal(&struct { + Entities *[]Learningassignmentruleruntopiclearningassignmentscreated `json:"entities,omitempty"` + + Total *int `json:"total,omitempty"` + *Alias + }{ + Entities: u.Entities, + + Total: u.Total, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentruleruntopiclearningassignmentrulerunnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentruleruntopiclearningassignmentscreated.go b/platformclientv2/learningassignmentruleruntopiclearningassignmentscreated.go index cd6ba28af..ada051c69 100644 --- a/platformclientv2/learningassignmentruleruntopiclearningassignmentscreated.go +++ b/platformclientv2/learningassignmentruleruntopiclearningassignmentscreated.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Learningassignmentruleruntopiclearningassignmentscreated struct { } +func (u *Learningassignmentruleruntopiclearningassignmentscreated) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentruleruntopiclearningassignmentscreated + + + + return json.Marshal(&struct { + Module *Learningassignmentruleruntopiclearningmodulereference `json:"module,omitempty"` + *Alias + }{ + Module: u.Module, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentruleruntopiclearningassignmentscreated) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentruleruntopiclearningmodulereference.go b/platformclientv2/learningassignmentruleruntopiclearningmodulereference.go index 0d9f87ec6..da72e0b83 100644 --- a/platformclientv2/learningassignmentruleruntopiclearningmodulereference.go +++ b/platformclientv2/learningassignmentruleruntopiclearningmodulereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentruleruntopiclearningmodulereference struct { } +func (u *Learningassignmentruleruntopiclearningmodulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentruleruntopiclearningmodulereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentruleruntopiclearningmodulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentsdomainentity.go b/platformclientv2/learningassignmentsdomainentity.go index 9ce3f2e95..cd0dc6c1c 100644 --- a/platformclientv2/learningassignmentsdomainentity.go +++ b/platformclientv2/learningassignmentsdomainentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Learningassignmentsdomainentity struct { } +func (u *Learningassignmentsdomainentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentsdomainentity + + + + return json.Marshal(&struct { + Entities *[]Learningassignment `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentsdomainentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmenttopiclearningassignmentnotification.go b/platformclientv2/learningassignmenttopiclearningassignmentnotification.go index 24e17368a..d5a45e2b3 100644 --- a/platformclientv2/learningassignmenttopiclearningassignmentnotification.go +++ b/platformclientv2/learningassignmenttopiclearningassignmentnotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,86 @@ type Learningassignmenttopiclearningassignmentnotification struct { } +func (u *Learningassignmenttopiclearningassignmentnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmenttopiclearningassignmentnotification + + + DateRecommendedForCompletion := new(string) + if u.DateRecommendedForCompletion != nil { + + *DateRecommendedForCompletion = timeutil.Strftime(u.DateRecommendedForCompletion, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateRecommendedForCompletion = nil + } + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *Learningassignmenttopicuserreference `json:"user,omitempty"` + + Module *Learningassignmenttopiclearningmodulereference `json:"module,omitempty"` + + Version *int `json:"version,omitempty"` + + State *string `json:"state,omitempty"` + + DateRecommendedForCompletion *string `json:"dateRecommendedForCompletion,omitempty"` + + CreatedBy *Learningassignmenttopicuserreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ModifiedBy *Learningassignmenttopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + IsOverdue *bool `json:"isOverdue,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + Module: u.Module, + + Version: u.Version, + + State: u.State, + + DateRecommendedForCompletion: DateRecommendedForCompletion, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + IsOverdue: u.IsOverdue, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmenttopiclearningassignmentnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmenttopiclearningmodulereference.go b/platformclientv2/learningassignmenttopiclearningmodulereference.go index edca84d6d..ea531f1f3 100644 --- a/platformclientv2/learningassignmenttopiclearningmodulereference.go +++ b/platformclientv2/learningassignmenttopiclearningmodulereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmenttopiclearningmodulereference struct { } +func (u *Learningassignmenttopiclearningmodulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmenttopiclearningmodulereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmenttopiclearningmodulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmenttopicuserreference.go b/platformclientv2/learningassignmenttopicuserreference.go index 24e2fb013..066cfa2b2 100644 --- a/platformclientv2/learningassignmenttopicuserreference.go +++ b/platformclientv2/learningassignmenttopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Learningassignmenttopicuserreference struct { } +func (u *Learningassignmenttopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmenttopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmenttopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentupdate.go b/platformclientv2/learningassignmentupdate.go index 028b851c4..df2f5fb07 100644 --- a/platformclientv2/learningassignmentupdate.go +++ b/platformclientv2/learningassignmentupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentupdate struct { } +func (u *Learningassignmentupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentupdate + + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Assessment *Learningassessment `json:"assessment,omitempty"` + *Alias + }{ + State: u.State, + + Assessment: u.Assessment, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentuser.go b/platformclientv2/learningassignmentuser.go index 8e778939d..c6a68f4bf 100644 --- a/platformclientv2/learningassignmentuser.go +++ b/platformclientv2/learningassignmentuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Learningassignmentuser struct { } +func (u *Learningassignmentuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentuserlisting.go b/platformclientv2/learningassignmentuserlisting.go index a74f1e0d8..ecaadf7c9 100644 --- a/platformclientv2/learningassignmentuserlisting.go +++ b/platformclientv2/learningassignmentuserlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Learningassignmentuserlisting struct { } +func (u *Learningassignmentuserlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentuserlisting + + + + return json.Marshal(&struct { + Entities *[]Learningassignmentuser `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + UnfilteredTotal *int `json:"unfilteredTotal,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + UnfilteredTotal: u.UnfilteredTotal, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentuserlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningassignmentuserquery.go b/platformclientv2/learningassignmentuserquery.go index 74ef45b6c..4726bd5bc 100644 --- a/platformclientv2/learningassignmentuserquery.go +++ b/platformclientv2/learningassignmentuserquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Learningassignmentuserquery struct { } +func (u *Learningassignmentuserquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningassignmentuserquery + + + + return json.Marshal(&struct { + Rule *Learningmodulerule `json:"rule,omitempty"` + + SearchTerm *string `json:"searchTerm,omitempty"` + *Alias + }{ + Rule: u.Rule, + + SearchTerm: u.SearchTerm, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningassignmentuserquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmodule.go b/platformclientv2/learningmodule.go index eed1f689b..6cec7ecbd 100644 --- a/platformclientv2/learningmodule.go +++ b/platformclientv2/learningmodule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,110 @@ type Learningmodule struct { } +func (u *Learningmodule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmodule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CreatedBy *Userreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ExternalId *string `json:"externalId,omitempty"` + + Source *string `json:"source,omitempty"` + + Rule *Learningmodulerule `json:"rule,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + IsArchived *bool `json:"isArchived,omitempty"` + + IsPublished *bool `json:"isPublished,omitempty"` + + Description *string `json:"description,omitempty"` + + CompletionTimeInDays *int `json:"completionTimeInDays,omitempty"` + + VarType *string `json:"type,omitempty"` + + InformSteps *[]Learningmoduleinformstep `json:"informSteps,omitempty"` + + AssessmentForm *Assessmentform `json:"assessmentForm,omitempty"` + + SummaryData *Learningmodulesummary `json:"summaryData,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + Version: u.Version, + + ExternalId: u.ExternalId, + + Source: u.Source, + + Rule: u.Rule, + + SelfUri: u.SelfUri, + + IsArchived: u.IsArchived, + + IsPublished: u.IsPublished, + + Description: u.Description, + + CompletionTimeInDays: u.CompletionTimeInDays, + + VarType: u.VarType, + + InformSteps: u.InformSteps, + + AssessmentForm: u.AssessmentForm, + + SummaryData: u.SummaryData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmodule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmoduleinformstep.go b/platformclientv2/learningmoduleinformstep.go index 5e3057ea7..021f9dbbb 100644 --- a/platformclientv2/learningmoduleinformstep.go +++ b/platformclientv2/learningmoduleinformstep.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Learningmoduleinformstep struct { } +func (u *Learningmoduleinformstep) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmoduleinformstep + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Name *string `json:"name,omitempty"` + + Value *string `json:"value,omitempty"` + + SharingUri *string `json:"sharingUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + Order *int `json:"order,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Name: u.Name, + + Value: u.Value, + + SharingUri: u.SharingUri, + + ContentType: u.ContentType, + + Order: u.Order, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmoduleinformstep) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmoduleinformsteprequest.go b/platformclientv2/learningmoduleinformsteprequest.go index 519fc8c7d..413ae380c 100644 --- a/platformclientv2/learningmoduleinformsteprequest.go +++ b/platformclientv2/learningmoduleinformsteprequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Learningmoduleinformsteprequest struct { } +func (u *Learningmoduleinformsteprequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmoduleinformsteprequest + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Name *string `json:"name,omitempty"` + + Value *string `json:"value,omitempty"` + + SharingUri *string `json:"sharingUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + Order *int `json:"order,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Name: u.Name, + + Value: u.Value, + + SharingUri: u.SharingUri, + + ContentType: u.ContentType, + + Order: u.Order, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmoduleinformsteprequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmodulepublishresponse.go b/platformclientv2/learningmodulepublishresponse.go index 0d8a68266..7985a38f7 100644 --- a/platformclientv2/learningmodulepublishresponse.go +++ b/platformclientv2/learningmodulepublishresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Learningmodulepublishresponse struct { } +func (u *Learningmodulepublishresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmodulepublishresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmodulepublishresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmodulerequest.go b/platformclientv2/learningmodulerequest.go index 901aaa2a3..7d7cbb4da 100644 --- a/platformclientv2/learningmodulerequest.go +++ b/platformclientv2/learningmodulerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Learningmodulerequest struct { } +func (u *Learningmodulerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmodulerequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + CompletionTimeInDays *int `json:"completionTimeInDays,omitempty"` + + InformSteps *[]Learningmoduleinformsteprequest `json:"informSteps,omitempty"` + + VarType *string `json:"type,omitempty"` + + AssessmentForm *Assessmentform `json:"assessmentForm,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + CompletionTimeInDays: u.CompletionTimeInDays, + + InformSteps: u.InformSteps, + + VarType: u.VarType, + + AssessmentForm: u.AssessmentForm, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmodulerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmodulerule.go b/platformclientv2/learningmodulerule.go index 8bed859ed..a7ea153e7 100644 --- a/platformclientv2/learningmodulerule.go +++ b/platformclientv2/learningmodulerule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Learningmodulerule struct { } +func (u *Learningmodulerule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmodulerule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + Parts *[]Learningmoduleruleparts `json:"parts,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + IsActive: u.IsActive, + + Parts: u.Parts, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmodulerule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmoduleruleparts.go b/platformclientv2/learningmoduleruleparts.go index 3f37c5d02..56cb065f7 100644 --- a/platformclientv2/learningmoduleruleparts.go +++ b/platformclientv2/learningmoduleruleparts.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Learningmoduleruleparts struct { } +func (u *Learningmoduleruleparts) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmoduleruleparts + + + + return json.Marshal(&struct { + Operation *string `json:"operation,omitempty"` + + Selector *string `json:"selector,omitempty"` + + Value *[]string `json:"value,omitempty"` + + Order *int `json:"order,omitempty"` + *Alias + }{ + Operation: u.Operation, + + Selector: u.Selector, + + Value: u.Value, + + Order: u.Order, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmoduleruleparts) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmodulesdomainentitylisting.go b/platformclientv2/learningmodulesdomainentitylisting.go index 5589b9191..ef07fa32a 100644 --- a/platformclientv2/learningmodulesdomainentitylisting.go +++ b/platformclientv2/learningmodulesdomainentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Learningmodulesdomainentitylisting struct { } +func (u *Learningmodulesdomainentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmodulesdomainentitylisting + + + + return json.Marshal(&struct { + Entities *[]Learningmodule `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmodulesdomainentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/learningmodulesummary.go b/platformclientv2/learningmodulesummary.go index 6ae70457d..480cbf545 100644 --- a/platformclientv2/learningmodulesummary.go +++ b/platformclientv2/learningmodulesummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Learningmodulesummary struct { } +func (u *Learningmodulesummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Learningmodulesummary + + + + return json.Marshal(&struct { + AssignedCount *int `json:"assignedCount,omitempty"` + + CompletedCount *int `json:"completedCount,omitempty"` + + PassedCount *int `json:"passedCount,omitempty"` + + CompletedSum *float32 `json:"completedSum,omitempty"` + *Alias + }{ + AssignedCount: u.AssignedCount, + + CompletedCount: u.CompletedCount, + + PassedCount: u.PassedCount, + + CompletedSum: u.CompletedSum, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Learningmodulesummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lexbot.go b/platformclientv2/lexbot.go index db317ec53..83ab950f3 100644 --- a/platformclientv2/lexbot.go +++ b/platformclientv2/lexbot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Lexbot struct { } +func (u *Lexbot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lexbot + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lexbot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lexbotalias.go b/platformclientv2/lexbotalias.go index d62b2bae1..400e30394 100644 --- a/platformclientv2/lexbotalias.go +++ b/platformclientv2/lexbotalias.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Lexbotalias struct { } +func (u *Lexbotalias) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lexbotalias + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Bot *Lexbot `json:"bot,omitempty"` + + BotVersion *string `json:"botVersion,omitempty"` + + Status *string `json:"status,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + + Language *string `json:"language,omitempty"` + + Intents *[]Lexintent `json:"intents,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Bot: u.Bot, + + BotVersion: u.BotVersion, + + Status: u.Status, + + FailureReason: u.FailureReason, + + Language: u.Language, + + Intents: u.Intents, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lexbotalias) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lexbotaliasentitylisting.go b/platformclientv2/lexbotaliasentitylisting.go index 0c0a46b31..607a3c07f 100644 --- a/platformclientv2/lexbotaliasentitylisting.go +++ b/platformclientv2/lexbotaliasentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Lexbotaliasentitylisting struct { } +func (u *Lexbotaliasentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lexbotaliasentitylisting + + + + return json.Marshal(&struct { + Entities *[]Lexbotalias `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lexbotaliasentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lexbotentitylisting.go b/platformclientv2/lexbotentitylisting.go index 36dc42c11..e08b67654 100644 --- a/platformclientv2/lexbotentitylisting.go +++ b/platformclientv2/lexbotentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Lexbotentitylisting struct { } +func (u *Lexbotentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lexbotentitylisting + + + + return json.Marshal(&struct { + Entities *[]Lexbot `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lexbotentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lexintent.go b/platformclientv2/lexintent.go index f6d0f6588..7260710a3 100644 --- a/platformclientv2/lexintent.go +++ b/platformclientv2/lexintent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Lexintent struct { } +func (u *Lexintent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lexintent + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Slots *map[string]Lexslot `json:"slots,omitempty"` + + Version *string `json:"version,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + Slots: u.Slots, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lexintent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lexslot.go b/platformclientv2/lexslot.go index 082ed82ab..958a1a81b 100644 --- a/platformclientv2/lexslot.go +++ b/platformclientv2/lexslot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Lexslot struct { } +func (u *Lexslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lexslot + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + VarType *string `json:"type,omitempty"` + + Priority *int `json:"priority,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + VarType: u.VarType, + + Priority: u.Priority, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lexslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/library.go b/platformclientv2/library.go index 9fd3324a1..92e126e2d 100644 --- a/platformclientv2/library.go +++ b/platformclientv2/library.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Library struct { } +func (u *Library) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Library + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ResponseType *string `json:"responseType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ResponseType: u.ResponseType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Library) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/libraryentitylisting.go b/platformclientv2/libraryentitylisting.go index 04b4bbb14..3dd823f27 100644 --- a/platformclientv2/libraryentitylisting.go +++ b/platformclientv2/libraryentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Libraryentitylisting struct { } +func (u *Libraryentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Libraryentitylisting + + + + return json.Marshal(&struct { + Entities *[]Library `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Libraryentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/licenseassignmentrequest.go b/platformclientv2/licenseassignmentrequest.go index ce46f8a0d..a52a84ea1 100644 --- a/platformclientv2/licenseassignmentrequest.go +++ b/platformclientv2/licenseassignmentrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Licenseassignmentrequest struct { } +func (u *Licenseassignmentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Licenseassignmentrequest + + + + return json.Marshal(&struct { + LicenseId *string `json:"licenseId,omitempty"` + + UserIdsAdd *[]string `json:"userIdsAdd,omitempty"` + + UserIdsRemove *[]string `json:"userIdsRemove,omitempty"` + *Alias + }{ + LicenseId: u.LicenseId, + + UserIdsAdd: u.UserIdsAdd, + + UserIdsRemove: u.UserIdsRemove, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Licenseassignmentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/licensebatchassignmentrequest.go b/platformclientv2/licensebatchassignmentrequest.go index bbc4b7025..e385b2ad8 100644 --- a/platformclientv2/licensebatchassignmentrequest.go +++ b/platformclientv2/licensebatchassignmentrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Licensebatchassignmentrequest struct { } +func (u *Licensebatchassignmentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Licensebatchassignmentrequest + + + + return json.Marshal(&struct { + Assignments *[]Licenseassignmentrequest `json:"assignments,omitempty"` + *Alias + }{ + Assignments: u.Assignments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Licensebatchassignmentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/licensedefinition.go b/platformclientv2/licensedefinition.go index 13300f22a..43008d465 100644 --- a/platformclientv2/licensedefinition.go +++ b/platformclientv2/licensedefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Licensedefinition struct { } +func (u *Licensedefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Licensedefinition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Description *string `json:"description,omitempty"` + + Permissions *Permissions `json:"permissions,omitempty"` + + Prerequisites *[]Addressablelicensedefinition `json:"prerequisites,omitempty"` + + Comprises *[]Licensedefinition `json:"comprises,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Description: u.Description, + + Permissions: u.Permissions, + + Prerequisites: u.Prerequisites, + + Comprises: u.Comprises, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Licensedefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/licenseorgtoggle.go b/platformclientv2/licenseorgtoggle.go index 3bb123be8..e532cf106 100644 --- a/platformclientv2/licenseorgtoggle.go +++ b/platformclientv2/licenseorgtoggle.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Licenseorgtoggle struct { } +func (u *Licenseorgtoggle) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Licenseorgtoggle + + + + return json.Marshal(&struct { + FeatureName *string `json:"featureName,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + *Alias + }{ + FeatureName: u.FeatureName, + + Enabled: u.Enabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Licenseorgtoggle) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/licenseupdatestatus.go b/platformclientv2/licenseupdatestatus.go index 98b5d4225..1b12760bb 100644 --- a/platformclientv2/licenseupdatestatus.go +++ b/platformclientv2/licenseupdatestatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Licenseupdatestatus struct { } +func (u *Licenseupdatestatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Licenseupdatestatus + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + LicenseId *string `json:"licenseId,omitempty"` + + Result *string `json:"result,omitempty"` + *Alias + }{ + UserId: u.UserId, + + LicenseId: u.LicenseId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Licenseupdatestatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/licenseuser.go b/platformclientv2/licenseuser.go index 5dddc8ddb..0a668a32d 100644 --- a/platformclientv2/licenseuser.go +++ b/platformclientv2/licenseuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Licenseuser struct { } +func (u *Licenseuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Licenseuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Licenses *[]Licensedefinition `json:"licenses,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Licenses: u.Licenses, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Licenseuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/limit.go b/platformclientv2/limit.go index 0550a9992..fa2439c35 100644 --- a/platformclientv2/limit.go +++ b/platformclientv2/limit.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Limit struct { } +func (u *Limit) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Limit + + + + return json.Marshal(&struct { + Key *string `json:"key,omitempty"` + + Value *float64 `json:"value,omitempty"` + *Alias + }{ + Key: u.Key, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Limit) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/limitchangerequestdetails.go b/platformclientv2/limitchangerequestdetails.go index c2d9eb0e7..02a51f059 100644 --- a/platformclientv2/limitchangerequestdetails.go +++ b/platformclientv2/limitchangerequestdetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Limitchangerequestdetails struct { } +func (u *Limitchangerequestdetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Limitchangerequestdetails + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Key *string `json:"key,omitempty"` + + Namespace *string `json:"namespace,omitempty"` + + RequestedValue *float64 `json:"requestedValue,omitempty"` + + Description *string `json:"description,omitempty"` + + SupportCaseUrl *string `json:"supportCaseUrl,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + Status *string `json:"status,omitempty"` + + CurrentValue *float64 `json:"currentValue,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + StatusHistory *[]Statuschange `json:"statusHistory,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + LastChangedBy *string `json:"lastChangedBy,omitempty"` + + RejectReason *string `json:"rejectReason,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Key: u.Key, + + Namespace: u.Namespace, + + RequestedValue: u.RequestedValue, + + Description: u.Description, + + SupportCaseUrl: u.SupportCaseUrl, + + CreatedBy: u.CreatedBy, + + Status: u.Status, + + CurrentValue: u.CurrentValue, + + DateCreated: DateCreated, + + StatusHistory: u.StatusHistory, + + DateCompleted: DateCompleted, + + LastChangedBy: u.LastChangedBy, + + RejectReason: u.RejectReason, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Limitchangerequestdetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/limitchangerequestsentitylisting.go b/platformclientv2/limitchangerequestsentitylisting.go index 517fd163d..598a44fbd 100644 --- a/platformclientv2/limitchangerequestsentitylisting.go +++ b/platformclientv2/limitchangerequestsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Limitchangerequestsentitylisting struct { } +func (u *Limitchangerequestsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Limitchangerequestsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Limitchangerequestdetails `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Limitchangerequestsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/limitsentitylisting.go b/platformclientv2/limitsentitylisting.go index c79670bca..91235690f 100644 --- a/platformclientv2/limitsentitylisting.go +++ b/platformclientv2/limitsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Limitsentitylisting struct { } +func (u *Limitsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Limitsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Limit `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Limitsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/line.go b/platformclientv2/line.go index bf66168ed..c2db87048 100644 --- a/platformclientv2/line.go +++ b/platformclientv2/line.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -93,6 +94,118 @@ type Line struct { } +func (u *Line) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Line + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + EdgeGroup *Domainentityref `json:"edgeGroup,omitempty"` + + Template *Domainentityref `json:"template,omitempty"` + + Site *Domainentityref `json:"site,omitempty"` + + LineBaseSettings *Domainentityref `json:"lineBaseSettings,omitempty"` + + PrimaryEdge *Edge `json:"primaryEdge,omitempty"` + + SecondaryEdge *Edge `json:"secondaryEdge,omitempty"` + + LoggedInUser *Domainentityref `json:"loggedInUser,omitempty"` + + DefaultForUser *Domainentityref `json:"defaultForUser,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Properties: u.Properties, + + EdgeGroup: u.EdgeGroup, + + Template: u.Template, + + Site: u.Site, + + LineBaseSettings: u.LineBaseSettings, + + PrimaryEdge: u.PrimaryEdge, + + SecondaryEdge: u.SecondaryEdge, + + LoggedInUser: u.LoggedInUser, + + DefaultForUser: u.DefaultForUser, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Line) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/linebase.go b/platformclientv2/linebase.go index d070c5b94..481c8e6d4 100644 --- a/platformclientv2/linebase.go +++ b/platformclientv2/linebase.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Linebase struct { } +func (u *Linebase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Linebase + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + LineMetaBase *Domainentityref `json:"lineMetaBase,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + LineMetaBase: u.LineMetaBase, + + Properties: u.Properties, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Linebase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/linebaseentitylisting.go b/platformclientv2/linebaseentitylisting.go index 6f8825bad..17a7409eb 100644 --- a/platformclientv2/linebaseentitylisting.go +++ b/platformclientv2/linebaseentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Linebaseentitylisting struct { } +func (u *Linebaseentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Linebaseentitylisting + + + + return json.Marshal(&struct { + Entities *[]Linebase `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Linebaseentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lineentitylisting.go b/platformclientv2/lineentitylisting.go index 1a2f4bbe6..efe7e70d6 100644 --- a/platformclientv2/lineentitylisting.go +++ b/platformclientv2/lineentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Lineentitylisting struct { } +func (u *Lineentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lineentitylisting + + + + return json.Marshal(&struct { + Entities *[]Line `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lineentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lineid.go b/platformclientv2/lineid.go index 751a4d6be..430e31733 100644 --- a/platformclientv2/lineid.go +++ b/platformclientv2/lineid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Lineid struct { } +func (u *Lineid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lineid + + + + return json.Marshal(&struct { + Ids *[]Lineuserid `json:"ids,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + Ids: u.Ids, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lineid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lineintegration.go b/platformclientv2/lineintegration.go index 21f4e52cc..443f3cc6e 100644 --- a/platformclientv2/lineintegration.go +++ b/platformclientv2/lineintegration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Lineintegration struct { } +func (u *Lineintegration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lineintegration + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ChannelId *string `json:"channelId,omitempty"` + + WebhookUri *string `json:"webhookUri,omitempty"` + + Status *string `json:"status,omitempty"` + + Recipient *Domainentityref `json:"recipient,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + Version *int `json:"version,omitempty"` + + CreateStatus *string `json:"createStatus,omitempty"` + + CreateError *Errorbody `json:"createError,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ChannelId: u.ChannelId, + + WebhookUri: u.WebhookUri, + + Status: u.Status, + + Recipient: u.Recipient, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Version: u.Version, + + CreateStatus: u.CreateStatus, + + CreateError: u.CreateError, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lineintegration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lineintegrationentitylisting.go b/platformclientv2/lineintegrationentitylisting.go index 374530073..ff11f4c31 100644 --- a/platformclientv2/lineintegrationentitylisting.go +++ b/platformclientv2/lineintegrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Lineintegrationentitylisting struct { } +func (u *Lineintegrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lineintegrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Lineintegration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lineintegrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lineintegrationrequest.go b/platformclientv2/lineintegrationrequest.go index ba6d6293d..3ece372c8 100644 --- a/platformclientv2/lineintegrationrequest.go +++ b/platformclientv2/lineintegrationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Lineintegrationrequest struct { } +func (u *Lineintegrationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lineintegrationrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ChannelId *string `json:"channelId,omitempty"` + + ChannelSecret *string `json:"channelSecret,omitempty"` + + SwitcherSecret *string `json:"switcherSecret,omitempty"` + + ServiceCode *string `json:"serviceCode,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ChannelId: u.ChannelId, + + ChannelSecret: u.ChannelSecret, + + SwitcherSecret: u.SwitcherSecret, + + ServiceCode: u.ServiceCode, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lineintegrationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/linestatus.go b/platformclientv2/linestatus.go index c21a07b61..5de4d73d3 100644 --- a/platformclientv2/linestatus.go +++ b/platformclientv2/linestatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Linestatus struct { } +func (u *Linestatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Linestatus + + + ReachableStateTime := new(string) + if u.ReachableStateTime != nil { + + *ReachableStateTime = timeutil.Strftime(u.ReachableStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReachableStateTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Reachable *bool `json:"reachable,omitempty"` + + AddressOfRecord *string `json:"addressOfRecord,omitempty"` + + ContactAddresses *[]string `json:"contactAddresses,omitempty"` + + ReachableStateTime *string `json:"reachableStateTime,omitempty"` + *Alias + }{ + Id: u.Id, + + Reachable: u.Reachable, + + AddressOfRecord: u.AddressOfRecord, + + ContactAddresses: u.ContactAddresses, + + ReachableStateTime: ReachableStateTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Linestatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lineuserid.go b/platformclientv2/lineuserid.go index 4ec5b155b..63e492cd9 100644 --- a/platformclientv2/lineuserid.go +++ b/platformclientv2/lineuserid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Lineuserid struct { } +func (u *Lineuserid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lineuserid + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + *Alias + }{ + UserId: u.UserId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lineuserid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/listedprogram.go b/platformclientv2/listedprogram.go index d4fe92ea9..fe80e7d30 100644 --- a/platformclientv2/listedprogram.go +++ b/platformclientv2/listedprogram.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,62 @@ type Listedprogram struct { } +func (u *Listedprogram) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Listedprogram + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + TopicsCount *int `json:"topicsCount,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + ModifiedBy *Addressableentityref `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Published: u.Published, + + TopicsCount: u.TopicsCount, + + Tags: u.Tags, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Listedprogram) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/listedtopic.go b/platformclientv2/listedtopic.go index b64f8cfbe..4915a78d2 100644 --- a/platformclientv2/listedtopic.go +++ b/platformclientv2/listedtopic.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Listedtopic struct { } +func (u *Listedtopic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Listedtopic + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + Strictness *string `json:"strictness,omitempty"` + + ProgramsCount *int `json:"programsCount,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + Dialect *string `json:"dialect,omitempty"` + + Participants *string `json:"participants,omitempty"` + + PhrasesCount *int `json:"phrasesCount,omitempty"` + + ModifiedBy *Addressableentityref `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Published: u.Published, + + Strictness: u.Strictness, + + ProgramsCount: u.ProgramsCount, + + Tags: u.Tags, + + Dialect: u.Dialect, + + Participants: u.Participants, + + PhrasesCount: u.PhrasesCount, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Listedtopic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/listitemcomponent.go b/platformclientv2/listitemcomponent.go index bb7f31c59..3a659c659 100644 --- a/platformclientv2/listitemcomponent.go +++ b/platformclientv2/listitemcomponent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Listitemcomponent struct { } +func (u *Listitemcomponent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Listitemcomponent + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Rmid *string `json:"rmid,omitempty"` + + VarType *string `json:"type,omitempty"` + + Image *string `json:"image,omitempty"` + + Title *string `json:"title,omitempty"` + + Description *string `json:"description,omitempty"` + + Actions *Contentactions `json:"actions,omitempty"` + *Alias + }{ + Id: u.Id, + + Rmid: u.Rmid, + + VarType: u.VarType, + + Image: u.Image, + + Title: u.Title, + + Description: u.Description, + + Actions: u.Actions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Listitemcomponent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/listwrapperinterval.go b/platformclientv2/listwrapperinterval.go index c6a8dcb0b..81ac2f2f9 100644 --- a/platformclientv2/listwrapperinterval.go +++ b/platformclientv2/listwrapperinterval.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Listwrapperinterval struct { } +func (u *Listwrapperinterval) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Listwrapperinterval + + + + return json.Marshal(&struct { + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Listwrapperinterval) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/listwrappershiftstartvariance.go b/platformclientv2/listwrappershiftstartvariance.go index 4a00339b2..0fb9ee328 100644 --- a/platformclientv2/listwrappershiftstartvariance.go +++ b/platformclientv2/listwrappershiftstartvariance.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Listwrappershiftstartvariance struct { } +func (u *Listwrappershiftstartvariance) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Listwrappershiftstartvariance + + + + return json.Marshal(&struct { + Values *[]Shiftstartvariance `json:"values,omitempty"` + *Alias + }{ + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Listwrappershiftstartvariance) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/localencryptionconfiguration.go b/platformclientv2/localencryptionconfiguration.go index c57796967..b0c7e6020 100644 --- a/platformclientv2/localencryptionconfiguration.go +++ b/platformclientv2/localencryptionconfiguration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Localencryptionconfiguration struct { } +func (u *Localencryptionconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Localencryptionconfiguration + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Url *string `json:"url,omitempty"` + + ApiId *string `json:"apiId,omitempty"` + + ApiKey *string `json:"apiKey,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Url: u.Url, + + ApiId: u.ApiId, + + ApiKey: u.ApiKey, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Localencryptionconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/localencryptionconfigurationlisting.go b/platformclientv2/localencryptionconfigurationlisting.go index 935ad6daa..757b9d003 100644 --- a/platformclientv2/localencryptionconfigurationlisting.go +++ b/platformclientv2/localencryptionconfigurationlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Localencryptionconfigurationlisting struct { } +func (u *Localencryptionconfigurationlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Localencryptionconfigurationlisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Localencryptionconfiguration `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Localencryptionconfigurationlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/localencryptionkeyrequest.go b/platformclientv2/localencryptionkeyrequest.go index a8fd3be1b..b255329fa 100644 --- a/platformclientv2/localencryptionkeyrequest.go +++ b/platformclientv2/localencryptionkeyrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Localencryptionkeyrequest struct { } +func (u *Localencryptionkeyrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Localencryptionkeyrequest + + + + return json.Marshal(&struct { + ConfigId *string `json:"configId,omitempty"` + + PublicKey *string `json:"publicKey,omitempty"` + + KeypairId *string `json:"keypairId,omitempty"` + *Alias + }{ + ConfigId: u.ConfigId, + + PublicKey: u.PublicKey, + + KeypairId: u.KeypairId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Localencryptionkeyrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/location.go b/platformclientv2/location.go index 8f18f5260..e99d45b91 100644 --- a/platformclientv2/location.go +++ b/platformclientv2/location.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Location struct { } +func (u *Location) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Location + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + FloorplanId *string `json:"floorplanId,omitempty"` + + Coordinates *map[string]float64 `json:"coordinates,omitempty"` + + Notes *string `json:"notes,omitempty"` + + LocationDefinition *Locationdefinition `json:"locationDefinition,omitempty"` + *Alias + }{ + Id: u.Id, + + FloorplanId: u.FloorplanId, + + Coordinates: u.Coordinates, + + Notes: u.Notes, + + LocationDefinition: u.LocationDefinition, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Location) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationaddress.go b/platformclientv2/locationaddress.go index 94d4a5b46..e709cff3e 100644 --- a/platformclientv2/locationaddress.go +++ b/platformclientv2/locationaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Locationaddress struct { } +func (u *Locationaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationaddress + + + + return json.Marshal(&struct { + City *string `json:"city,omitempty"` + + Country *string `json:"country,omitempty"` + + CountryName *string `json:"countryName,omitempty"` + + State *string `json:"state,omitempty"` + + Street1 *string `json:"street1,omitempty"` + + Street2 *string `json:"street2,omitempty"` + + Zipcode *string `json:"zipcode,omitempty"` + *Alias + }{ + City: u.City, + + Country: u.Country, + + CountryName: u.CountryName, + + State: u.State, + + Street1: u.Street1, + + Street2: u.Street2, + + Zipcode: u.Zipcode, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationaddressverificationdetails.go b/platformclientv2/locationaddressverificationdetails.go index ad8f264c5..a8bf85779 100644 --- a/platformclientv2/locationaddressverificationdetails.go +++ b/platformclientv2/locationaddressverificationdetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,50 @@ type Locationaddressverificationdetails struct { } +func (u *Locationaddressverificationdetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationaddressverificationdetails + + + DateFinished := new(string) + if u.DateFinished != nil { + + *DateFinished = timeutil.Strftime(u.DateFinished, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateFinished = nil + } + + DateStarted := new(string) + if u.DateStarted != nil { + + *DateStarted = timeutil.Strftime(u.DateStarted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStarted = nil + } + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + DateFinished *string `json:"dateFinished,omitempty"` + + DateStarted *string `json:"dateStarted,omitempty"` + + Service *string `json:"service,omitempty"` + *Alias + }{ + Status: u.Status, + + DateFinished: DateFinished, + + DateStarted: DateStarted, + + Service: u.Service, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationaddressverificationdetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationcreatedefinition.go b/platformclientv2/locationcreatedefinition.go index 7e3037aa6..e9a07fab5 100644 --- a/platformclientv2/locationcreatedefinition.go +++ b/platformclientv2/locationcreatedefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Locationcreatedefinition struct { } +func (u *Locationcreatedefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationcreatedefinition + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + State *string `json:"state,omitempty"` + + Path *[]string `json:"path,omitempty"` + + Notes *string `json:"notes,omitempty"` + + ContactUser *string `json:"contactUser,omitempty"` + + EmergencyNumber *Locationemergencynumber `json:"emergencyNumber,omitempty"` + + Address *Locationaddress `json:"address,omitempty"` + *Alias + }{ + Name: u.Name, + + Version: u.Version, + + State: u.State, + + Path: u.Path, + + Notes: u.Notes, + + ContactUser: u.ContactUser, + + EmergencyNumber: u.EmergencyNumber, + + Address: u.Address, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationcreatedefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationdefinition.go b/platformclientv2/locationdefinition.go index bfa5f723e..b8f67304f 100644 --- a/platformclientv2/locationdefinition.go +++ b/platformclientv2/locationdefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -72,6 +73,82 @@ type Locationdefinition struct { } +func (u *Locationdefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationdefinition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ContactUser *Addressableentityref `json:"contactUser,omitempty"` + + EmergencyNumber *Locationemergencynumber `json:"emergencyNumber,omitempty"` + + Address *Locationaddress `json:"address,omitempty"` + + State *string `json:"state,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Version *int `json:"version,omitempty"` + + Path *[]string `json:"path,omitempty"` + + ProfileImage *[]Locationimage `json:"profileImage,omitempty"` + + FloorplanImage *[]Locationimage `json:"floorplanImage,omitempty"` + + AddressVerificationDetails *Locationaddressverificationdetails `json:"addressVerificationDetails,omitempty"` + + AddressVerified *bool `json:"addressVerified,omitempty"` + + AddressStored *bool `json:"addressStored,omitempty"` + + Images *string `json:"images,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ContactUser: u.ContactUser, + + EmergencyNumber: u.EmergencyNumber, + + Address: u.Address, + + State: u.State, + + Notes: u.Notes, + + Version: u.Version, + + Path: u.Path, + + ProfileImage: u.ProfileImage, + + FloorplanImage: u.FloorplanImage, + + AddressVerificationDetails: u.AddressVerificationDetails, + + AddressVerified: u.AddressVerified, + + AddressStored: u.AddressStored, + + Images: u.Images, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationdefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationemergencynumber.go b/platformclientv2/locationemergencynumber.go index 72527f4f9..5f0003471 100644 --- a/platformclientv2/locationemergencynumber.go +++ b/platformclientv2/locationemergencynumber.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Locationemergencynumber struct { } +func (u *Locationemergencynumber) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationemergencynumber + + + + return json.Marshal(&struct { + E164 *string `json:"e164,omitempty"` + + Number *string `json:"number,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + E164: u.E164, + + Number: u.Number, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationemergencynumber) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationentitylisting.go b/platformclientv2/locationentitylisting.go index ca134a42e..74727d990 100644 --- a/platformclientv2/locationentitylisting.go +++ b/platformclientv2/locationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Locationentitylisting struct { } +func (u *Locationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Locationdefinition `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationimage.go b/platformclientv2/locationimage.go index 603c7c937..4ce5d8a17 100644 --- a/platformclientv2/locationimage.go +++ b/platformclientv2/locationimage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Locationimage struct { } +func (u *Locationimage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationimage + + + + return json.Marshal(&struct { + Resolution *string `json:"resolution,omitempty"` + + ImageUri *string `json:"imageUri,omitempty"` + *Alias + }{ + Resolution: u.Resolution, + + ImageUri: u.ImageUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationimage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationsearchcriteria.go b/platformclientv2/locationsearchcriteria.go index f23440cc3..53f7bd23b 100644 --- a/platformclientv2/locationsearchcriteria.go +++ b/platformclientv2/locationsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Locationsearchcriteria struct { } +func (u *Locationsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Locationsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationsearchrequest.go b/platformclientv2/locationsearchrequest.go index 918b29c2f..9330ad2f4 100644 --- a/platformclientv2/locationsearchrequest.go +++ b/platformclientv2/locationsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Locationsearchrequest struct { } +func (u *Locationsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationsearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + Expand *[]string `json:"expand,omitempty"` + + Query *[]Locationsearchcriteria `json:"query,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + Expand: u.Expand, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationssearchresponse.go b/platformclientv2/locationssearchresponse.go index e7ee33b4c..e6b38faae 100644 --- a/platformclientv2/locationssearchresponse.go +++ b/platformclientv2/locationssearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Locationssearchresponse struct { } +func (u *Locationssearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationssearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + CurrentPage *string `json:"currentPage,omitempty"` + + NextPage *string `json:"nextPage,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *[]Locationdefinition `json:"results,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PreviousPage: u.PreviousPage, + + CurrentPage: u.CurrentPage, + + NextPage: u.NextPage, + + Types: u.Types, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationssearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/locationupdatedefinition.go b/platformclientv2/locationupdatedefinition.go index ae2a2f65f..6f547f0cd 100644 --- a/platformclientv2/locationupdatedefinition.go +++ b/platformclientv2/locationupdatedefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Locationupdatedefinition struct { } +func (u *Locationupdatedefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Locationupdatedefinition + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + State *string `json:"state,omitempty"` + + Path *[]string `json:"path,omitempty"` + + Notes *string `json:"notes,omitempty"` + + ContactUser *string `json:"contactUser,omitempty"` + + EmergencyNumber *Locationemergencynumber `json:"emergencyNumber,omitempty"` + + Address *Locationaddress `json:"address,omitempty"` + *Alias + }{ + Name: u.Name, + + Version: u.Version, + + State: u.State, + + Path: u.Path, + + Notes: u.Notes, + + ContactUser: u.ContactUser, + + EmergencyNumber: u.EmergencyNumber, + + Address: u.Address, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Locationupdatedefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/lockinfo.go b/platformclientv2/lockinfo.go index d2a1b705f..6418387f1 100644 --- a/platformclientv2/lockinfo.go +++ b/platformclientv2/lockinfo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,50 @@ type Lockinfo struct { } +func (u *Lockinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Lockinfo + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateExpires := new(string) + if u.DateExpires != nil { + + *DateExpires = timeutil.Strftime(u.DateExpires, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpires = nil + } + + + return json.Marshal(&struct { + LockedBy *Domainentityref `json:"lockedBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateExpires *string `json:"dateExpires,omitempty"` + + Action *string `json:"action,omitempty"` + *Alias + }{ + LockedBy: u.LockedBy, + + DateCreated: DateCreated, + + DateExpires: DateExpires, + + Action: u.Action, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Lockinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/logcaptureuserconfiguration.go b/platformclientv2/logcaptureuserconfiguration.go index 9dbc581b5..2546bee5e 100644 --- a/platformclientv2/logcaptureuserconfiguration.go +++ b/platformclientv2/logcaptureuserconfiguration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Logcaptureuserconfiguration struct { } +func (u *Logcaptureuserconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Logcaptureuserconfiguration + + + DateExpired := new(string) + if u.DateExpired != nil { + + *DateExpired = timeutil.Strftime(u.DateExpired, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpired = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DateExpired *string `json:"dateExpired,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + DateExpired: DateExpired, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Logcaptureuserconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/logicalinterfaceentitylisting.go b/platformclientv2/logicalinterfaceentitylisting.go index 8cc1e1e2a..6a8b56234 100644 --- a/platformclientv2/logicalinterfaceentitylisting.go +++ b/platformclientv2/logicalinterfaceentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Logicalinterfaceentitylisting struct { } +func (u *Logicalinterfaceentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Logicalinterfaceentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainlogicalinterface `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Logicalinterfaceentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/longtermforecastplanninggroupdata.go b/platformclientv2/longtermforecastplanninggroupdata.go index fb5ed2cd5..193d7b097 100644 --- a/platformclientv2/longtermforecastplanninggroupdata.go +++ b/platformclientv2/longtermforecastplanninggroupdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Longtermforecastplanninggroupdata struct { } +func (u *Longtermforecastplanninggroupdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Longtermforecastplanninggroupdata + + + + return json.Marshal(&struct { + PlanningGroupId *string `json:"planningGroupId,omitempty"` + + OfferedPerDay *[]float64 `json:"offeredPerDay,omitempty"` + + AverageHandleTimeSecondsPerDay *[]float64 `json:"averageHandleTimeSecondsPerDay,omitempty"` + *Alias + }{ + PlanningGroupId: u.PlanningGroupId, + + OfferedPerDay: u.OfferedPerDay, + + AverageHandleTimeSecondsPerDay: u.AverageHandleTimeSecondsPerDay, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Longtermforecastplanninggroupdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/longtermforecastresult.go b/platformclientv2/longtermforecastresult.go index eeb1cd580..6e36ab221 100644 --- a/platformclientv2/longtermforecastresult.go +++ b/platformclientv2/longtermforecastresult.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,37 @@ type Longtermforecastresult struct { } +func (u *Longtermforecastresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Longtermforecastresult + + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%d") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + PlanningGroups *[]Longtermforecastplanninggroupdata `json:"planningGroups,omitempty"` + + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + *Alias + }{ + PlanningGroups: u.PlanningGroups, + + ReferenceStartDate: ReferenceStartDate, + + WeekCount: u.WeekCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Longtermforecastresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/longtermforecastresultresponse.go b/platformclientv2/longtermforecastresultresponse.go index 7defaa6cb..a3cb69138 100644 --- a/platformclientv2/longtermforecastresultresponse.go +++ b/platformclientv2/longtermforecastresultresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Longtermforecastresultresponse struct { } +func (u *Longtermforecastresultresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Longtermforecastresultresponse + + + + return json.Marshal(&struct { + Result *Longtermforecastresult `json:"result,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + Result: u.Result, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Longtermforecastresultresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mailfromresult.go b/platformclientv2/mailfromresult.go index 408692d06..8af485c8a 100644 --- a/platformclientv2/mailfromresult.go +++ b/platformclientv2/mailfromresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Mailfromresult struct { } +func (u *Mailfromresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mailfromresult + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + Records *[]Record `json:"records,omitempty"` + + MailFromDomain *string `json:"mailFromDomain,omitempty"` + *Alias + }{ + Status: u.Status, + + Records: u.Records, + + MailFromDomain: u.MailFromDomain, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mailfromresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/managementunit.go b/platformclientv2/managementunit.go index c482f1918..26c3c5bf1 100644 --- a/platformclientv2/managementunit.go +++ b/platformclientv2/managementunit.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,74 @@ type Managementunit struct { } +func (u *Managementunit) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Managementunit + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + BusinessUnit *Businessunitreference `json:"businessUnit,omitempty"` + + StartDayOfWeek *string `json:"startDayOfWeek,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + Settings *Managementunitsettingsresponse `json:"settings,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + Division *Divisionreference `json:"division,omitempty"` + + Version *int `json:"version,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + BusinessUnit: u.BusinessUnit, + + StartDayOfWeek: u.StartDayOfWeek, + + TimeZone: u.TimeZone, + + Settings: u.Settings, + + Metadata: u.Metadata, + + Division: u.Division, + + Version: u.Version, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Managementunit) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/managementunitlisting.go b/platformclientv2/managementunitlisting.go index 337d6fd48..cd01c4463 100644 --- a/platformclientv2/managementunitlisting.go +++ b/platformclientv2/managementunitlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Managementunitlisting struct { } +func (u *Managementunitlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Managementunitlisting + + + + return json.Marshal(&struct { + Entities *[]Managementunit `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + NextUri: u.NextUri, + + PageCount: u.PageCount, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Managementunitlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/managementunitreference.go b/platformclientv2/managementunitreference.go index db88a970a..03c3bcedc 100644 --- a/platformclientv2/managementunitreference.go +++ b/platformclientv2/managementunitreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Managementunitreference struct { } +func (u *Managementunitreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Managementunitreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Managementunitreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/managementunitsettingsrequest.go b/platformclientv2/managementunitsettingsrequest.go index 18e705152..153be8786 100644 --- a/platformclientv2/managementunitsettingsrequest.go +++ b/platformclientv2/managementunitsettingsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Managementunitsettingsrequest struct { } +func (u *Managementunitsettingsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Managementunitsettingsrequest + + + + return json.Marshal(&struct { + Adherence *Adherencesettings `json:"adherence,omitempty"` + + ShortTermForecasting *Shorttermforecastingsettings `json:"shortTermForecasting,omitempty"` + + TimeOff *Timeoffrequestsettings `json:"timeOff,omitempty"` + + Scheduling *Schedulingsettingsrequest `json:"scheduling,omitempty"` + + ShiftTrading *Shifttradesettings `json:"shiftTrading,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Adherence: u.Adherence, + + ShortTermForecasting: u.ShortTermForecasting, + + TimeOff: u.TimeOff, + + Scheduling: u.Scheduling, + + ShiftTrading: u.ShiftTrading, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Managementunitsettingsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/managementunitsettingsresponse.go b/platformclientv2/managementunitsettingsresponse.go index a35078b5d..c7915f9ac 100644 --- a/platformclientv2/managementunitsettingsresponse.go +++ b/platformclientv2/managementunitsettingsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Managementunitsettingsresponse struct { } +func (u *Managementunitsettingsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Managementunitsettingsresponse + + + + return json.Marshal(&struct { + Adherence *Adherencesettings `json:"adherence,omitempty"` + + ShortTermForecasting *Shorttermforecastingsettings `json:"shortTermForecasting,omitempty"` + + TimeOff *Timeoffrequestsettings `json:"timeOff,omitempty"` + + Scheduling *Schedulingsettingsresponse `json:"scheduling,omitempty"` + + ShiftTrading *Shifttradesettings `json:"shiftTrading,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Adherence: u.Adherence, + + ShortTermForecasting: u.ShortTermForecasting, + + TimeOff: u.TimeOff, + + Scheduling: u.Scheduling, + + ShiftTrading: u.ShiftTrading, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Managementunitsettingsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/manager.go b/platformclientv2/manager.go index c837df015..baea875a3 100644 --- a/platformclientv2/manager.go +++ b/platformclientv2/manager.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Manager struct { } +func (u *Manager) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Manager + + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + + Ref *string `json:"$ref,omitempty"` + *Alias + }{ + Value: u.Value, + + Ref: u.Ref, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Manager) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/matchshifttraderequest.go b/platformclientv2/matchshifttraderequest.go index 1ed74ebf5..84dd9a954 100644 --- a/platformclientv2/matchshifttraderequest.go +++ b/platformclientv2/matchshifttraderequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Matchshifttraderequest struct { } +func (u *Matchshifttraderequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Matchshifttraderequest + + + + return json.Marshal(&struct { + ReceivingScheduleId *string `json:"receivingScheduleId,omitempty"` + + ReceivingShiftId *string `json:"receivingShiftId,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + ReceivingScheduleId: u.ReceivingScheduleId, + + ReceivingShiftId: u.ReceivingShiftId, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Matchshifttraderequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/matchshifttraderesponse.go b/platformclientv2/matchshifttraderesponse.go index 727463698..5fd6eb460 100644 --- a/platformclientv2/matchshifttraderesponse.go +++ b/platformclientv2/matchshifttraderesponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Matchshifttraderesponse struct { } +func (u *Matchshifttraderesponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Matchshifttraderesponse + + + + return json.Marshal(&struct { + Trade *Shifttraderesponse `json:"trade,omitempty"` + + Violations *[]Shifttradematchviolation `json:"violations,omitempty"` + + AdminReviewViolations *[]Shifttradematchviolation `json:"adminReviewViolations,omitempty"` + *Alias + }{ + Trade: u.Trade, + + Violations: u.Violations, + + AdminReviewViolations: u.AdminReviewViolations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Matchshifttraderesponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/maxlength.go b/platformclientv2/maxlength.go index f64602f5f..8e0d48092 100644 --- a/platformclientv2/maxlength.go +++ b/platformclientv2/maxlength.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Maxlength struct { } +func (u *Maxlength) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Maxlength + + + + return json.Marshal(&struct { + Min *int `json:"min,omitempty"` + + Max *int `json:"max,omitempty"` + *Alias + }{ + Min: u.Min, + + Max: u.Max, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Maxlength) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/maxparticipants.go b/platformclientv2/maxparticipants.go index a3f8a76c2..57aa5d670 100644 --- a/platformclientv2/maxparticipants.go +++ b/platformclientv2/maxparticipants.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Maxparticipants struct { } +func (u *Maxparticipants) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Maxparticipants + + + + return json.Marshal(&struct { + MaxParticipants *int `json:"maxParticipants,omitempty"` + *Alias + }{ + MaxParticipants: u.MaxParticipants, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Maxparticipants) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediaparticipantrequest.go b/platformclientv2/mediaparticipantrequest.go index c2f01bed9..ff44af6da 100644 --- a/platformclientv2/mediaparticipantrequest.go +++ b/platformclientv2/mediaparticipantrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Mediaparticipantrequest struct { } +func (u *Mediaparticipantrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediaparticipantrequest + + + + return json.Marshal(&struct { + Wrapup *Wrapup `json:"wrapup,omitempty"` + + State *string `json:"state,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + *Alias + }{ + Wrapup: u.Wrapup, + + State: u.State, + + Recording: u.Recording, + + Muted: u.Muted, + + Confined: u.Confined, + + Held: u.Held, + + WrapupSkipped: u.WrapupSkipped, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediaparticipantrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediapolicies.go b/platformclientv2/mediapolicies.go index 6d29f0fbd..e1133f833 100644 --- a/platformclientv2/mediapolicies.go +++ b/platformclientv2/mediapolicies.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Mediapolicies struct { } +func (u *Mediapolicies) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediapolicies + + + + return json.Marshal(&struct { + CallPolicy *Callmediapolicy `json:"callPolicy,omitempty"` + + ChatPolicy *Chatmediapolicy `json:"chatPolicy,omitempty"` + + EmailPolicy *Emailmediapolicy `json:"emailPolicy,omitempty"` + + MessagePolicy *Messagemediapolicy `json:"messagePolicy,omitempty"` + *Alias + }{ + CallPolicy: u.CallPolicy, + + ChatPolicy: u.ChatPolicy, + + EmailPolicy: u.EmailPolicy, + + MessagePolicy: u.MessagePolicy, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediapolicies) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediaresult.go b/platformclientv2/mediaresult.go index 659c93313..e79472e94 100644 --- a/platformclientv2/mediaresult.go +++ b/platformclientv2/mediaresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Mediaresult struct { } +func (u *Mediaresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediaresult + + + + return json.Marshal(&struct { + MediaUri *string `json:"mediaUri,omitempty"` + + WaveformData *[]float32 `json:"waveformData,omitempty"` + *Alias + }{ + MediaUri: u.MediaUri, + + WaveformData: u.WaveformData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediaresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediasetting.go b/platformclientv2/mediasetting.go index fc4685f51..eaf51589d 100644 --- a/platformclientv2/mediasetting.go +++ b/platformclientv2/mediasetting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Mediasetting struct { } +func (u *Mediasetting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediasetting + + + + return json.Marshal(&struct { + AlertingTimeoutSeconds *int `json:"alertingTimeoutSeconds,omitempty"` + + ServiceLevel *Servicelevel `json:"serviceLevel,omitempty"` + *Alias + }{ + AlertingTimeoutSeconds: u.AlertingTimeoutSeconds, + + ServiceLevel: u.ServiceLevel, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediasetting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediasummary.go b/platformclientv2/mediasummary.go index 59a043adb..e1ad35f59 100644 --- a/platformclientv2/mediasummary.go +++ b/platformclientv2/mediasummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Mediasummary struct { } +func (u *Mediasummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediasummary + + + + return json.Marshal(&struct { + ContactCenter *Mediasummarydetail `json:"contactCenter,omitempty"` + + Enterprise *Mediasummarydetail `json:"enterprise,omitempty"` + *Alias + }{ + ContactCenter: u.ContactCenter, + + Enterprise: u.Enterprise, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediasummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediasummarydetail.go b/platformclientv2/mediasummarydetail.go index 8dda299a2..45b4dce65 100644 --- a/platformclientv2/mediasummarydetail.go +++ b/platformclientv2/mediasummarydetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Mediasummarydetail struct { } +func (u *Mediasummarydetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediasummarydetail + + + + return json.Marshal(&struct { + Active *int `json:"active,omitempty"` + + Acw *int `json:"acw,omitempty"` + *Alias + }{ + Active: u.Active, + + Acw: u.Acw, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediasummarydetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediatranscription.go b/platformclientv2/mediatranscription.go index 9338022b1..17cb32879 100644 --- a/platformclientv2/mediatranscription.go +++ b/platformclientv2/mediatranscription.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Mediatranscription struct { } +func (u *Mediatranscription) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediatranscription + + + + return json.Marshal(&struct { + DisplayName *string `json:"displayName,omitempty"` + + TranscriptionProvider *string `json:"transcriptionProvider,omitempty"` + + IntegrationId *string `json:"integrationId,omitempty"` + *Alias + }{ + DisplayName: u.DisplayName, + + TranscriptionProvider: u.TranscriptionProvider, + + IntegrationId: u.IntegrationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediatranscription) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediatype.go b/platformclientv2/mediatype.go index 0be4b043a..ad7be5393 100644 --- a/platformclientv2/mediatype.go +++ b/platformclientv2/mediatype.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Mediatype struct { } +func (u *Mediatype) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediatype + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + *Alias + }{ + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediatype) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediatypeaccess.go b/platformclientv2/mediatypeaccess.go index 7a67b60cd..42de817c8 100644 --- a/platformclientv2/mediatypeaccess.go +++ b/platformclientv2/mediatypeaccess.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Mediatypeaccess struct { } +func (u *Mediatypeaccess) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediatypeaccess + + + + return json.Marshal(&struct { + Inbound *[]Mediatype `json:"inbound,omitempty"` + + Outbound *[]Mediatype `json:"outbound,omitempty"` + *Alias + }{ + Inbound: u.Inbound, + + Outbound: u.Outbound, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediatypeaccess) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediatypes.go b/platformclientv2/mediatypes.go index b90dbb908..a5c9393a1 100644 --- a/platformclientv2/mediatypes.go +++ b/platformclientv2/mediatypes.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Mediatypes struct { } +func (u *Mediatypes) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediatypes + + + + return json.Marshal(&struct { + Allow *Mediatypeaccess `json:"allow,omitempty"` + *Alias + }{ + Allow: u.Allow, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediatypes) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mediautilization.go b/platformclientv2/mediautilization.go index 4dc9663b5..bdd25a6f9 100644 --- a/platformclientv2/mediautilization.go +++ b/platformclientv2/mediautilization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Mediautilization struct { } +func (u *Mediautilization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mediautilization + + + + return json.Marshal(&struct { + MaximumCapacity *int `json:"maximumCapacity,omitempty"` + + InterruptableMediaTypes *[]string `json:"interruptableMediaTypes,omitempty"` + + IncludeNonAcd *bool `json:"includeNonAcd,omitempty"` + *Alias + }{ + MaximumCapacity: u.MaximumCapacity, + + InterruptableMediaTypes: u.InterruptableMediaTypes, + + IncludeNonAcd: u.IncludeNonAcd, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mediautilization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/memberentity.go b/platformclientv2/memberentity.go index ac51ff4a2..4982d0671 100644 --- a/platformclientv2/memberentity.go +++ b/platformclientv2/memberentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Memberentity struct { } +func (u *Memberentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Memberentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Memberentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/mergeoperation.go b/platformclientv2/mergeoperation.go index aad8bfcb1..bf4cf2903 100644 --- a/platformclientv2/mergeoperation.go +++ b/platformclientv2/mergeoperation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Mergeoperation struct { } +func (u *Mergeoperation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Mergeoperation + + + + return json.Marshal(&struct { + SourceContact *Addressableentityref `json:"sourceContact,omitempty"` + + TargetContact *Addressableentityref `json:"targetContact,omitempty"` + + ResultingContact *Addressableentityref `json:"resultingContact,omitempty"` + *Alias + }{ + SourceContact: u.SourceContact, + + TargetContact: u.TargetContact, + + ResultingContact: u.ResultingContact, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Mergeoperation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/message.go b/platformclientv2/message.go index af1e25544..2b69322ce 100644 --- a/platformclientv2/message.go +++ b/platformclientv2/message.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -109,6 +110,150 @@ type Message struct { } +func (u *Message) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Message + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Held *bool `json:"held,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Direction *string `json:"direction,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + ErrorInfo *Errorbody `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Provider *string `json:"provider,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ToAddress *Address `json:"toAddress,omitempty"` + + FromAddress *Address `json:"fromAddress,omitempty"` + + Messages *[]Messagedetails `json:"messages,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Held: u.Held, + + Segments: u.Segments, + + Direction: u.Direction, + + RecordingId: u.RecordingId, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Provider: u.Provider, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ToAddress: u.ToAddress, + + FromAddress: u.FromAddress, + + Messages: u.Messages, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Message) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagecontent.go b/platformclientv2/messagecontent.go index 8d13cdc83..feaa012c1 100644 --- a/platformclientv2/messagecontent.go +++ b/platformclientv2/messagecontent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Messagecontent struct { } +func (u *Messagecontent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagecontent + + + + return json.Marshal(&struct { + ContentType *string `json:"contentType,omitempty"` + + Location *Contentlocation `json:"location,omitempty"` + + Attachment *Contentattachment `json:"attachment,omitempty"` + + QuickReply *Contentquickreply `json:"quickReply,omitempty"` + + ButtonResponse *Contentbuttonresponse `json:"buttonResponse,omitempty"` + + Generic *Contentgeneric `json:"generic,omitempty"` + + List *Contentlist `json:"list,omitempty"` + + Template *Contentnotificationtemplate `json:"template,omitempty"` + + Reactions *[]Contentreaction `json:"reactions,omitempty"` + + Mention *Messagingrecipient `json:"mention,omitempty"` + + Postback *Contentpostback `json:"postback,omitempty"` + *Alias + }{ + ContentType: u.ContentType, + + Location: u.Location, + + Attachment: u.Attachment, + + QuickReply: u.QuickReply, + + ButtonResponse: u.ButtonResponse, + + Generic: u.Generic, + + List: u.List, + + Template: u.Template, + + Reactions: u.Reactions, + + Mention: u.Mention, + + Postback: u.Postback, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagecontent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messageconversation.go b/platformclientv2/messageconversation.go index 8b323534a..ae2a0065b 100644 --- a/platformclientv2/messageconversation.go +++ b/platformclientv2/messageconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Messageconversation struct { } +func (u *Messageconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messageconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Messagemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messageconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messageconversationentitylisting.go b/platformclientv2/messageconversationentitylisting.go index 38ce0cb36..e75142bd0 100644 --- a/platformclientv2/messageconversationentitylisting.go +++ b/platformclientv2/messageconversationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Messageconversationentitylisting struct { } +func (u *Messageconversationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messageconversationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Emailconversation `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messageconversationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagedata.go b/platformclientv2/messagedata.go index 381660cc7..77c700562 100644 --- a/platformclientv2/messagedata.go +++ b/platformclientv2/messagedata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,82 @@ type Messagedata struct { } +func (u *Messagedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagedata + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ProviderMessageId *string `json:"providerMessageId,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + FromAddress *string `json:"fromAddress,omitempty"` + + ToAddress *string `json:"toAddress,omitempty"` + + Direction *string `json:"direction,omitempty"` + + MessengerType *string `json:"messengerType,omitempty"` + + TextBody *string `json:"textBody,omitempty"` + + Status *string `json:"status,omitempty"` + + Media *[]Messagemedia `json:"media,omitempty"` + + Stickers *[]Messagesticker `json:"stickers,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ProviderMessageId: u.ProviderMessageId, + + Timestamp: Timestamp, + + FromAddress: u.FromAddress, + + ToAddress: u.ToAddress, + + Direction: u.Direction, + + MessengerType: u.MessengerType, + + TextBody: u.TextBody, + + Status: u.Status, + + Media: u.Media, + + Stickers: u.Stickers, + + CreatedBy: u.CreatedBy, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagedetails.go b/platformclientv2/messagedetails.go index 24f8e5243..b06876c10 100644 --- a/platformclientv2/messagedetails.go +++ b/platformclientv2/messagedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Messagedetails struct { } +func (u *Messagedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagedetails + + + MessageTime := new(string) + if u.MessageTime != nil { + + *MessageTime = timeutil.Strftime(u.MessageTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + MessageTime = nil + } + + + return json.Marshal(&struct { + MessageId *string `json:"messageId,omitempty"` + + MessageURI *string `json:"messageURI,omitempty"` + + MessageStatus *string `json:"messageStatus,omitempty"` + + MessageSegmentCount *int `json:"messageSegmentCount,omitempty"` + + MessageTime *string `json:"messageTime,omitempty"` + + Media *[]Messagemedia `json:"media,omitempty"` + + Stickers *[]Messagesticker `json:"stickers,omitempty"` + *Alias + }{ + MessageId: u.MessageId, + + MessageURI: u.MessageURI, + + MessageStatus: u.MessageStatus, + + MessageSegmentCount: u.MessageSegmentCount, + + MessageTime: MessageTime, + + Media: u.Media, + + Stickers: u.Stickers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messageevaluation.go b/platformclientv2/messageevaluation.go index c9ab1205e..c64b3ce57 100644 --- a/platformclientv2/messageevaluation.go +++ b/platformclientv2/messageevaluation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Messageevaluation struct { } +func (u *Messageevaluation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messageevaluation + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + ContactColumn *string `json:"contactColumn,omitempty"` + + ContactAddress *string `json:"contactAddress,omitempty"` + + WrapupCodeId *string `json:"wrapupCodeId,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + *Alias + }{ + ContactColumn: u.ContactColumn, + + ContactAddress: u.ContactAddress, + + WrapupCodeId: u.WrapupCodeId, + + Timestamp: Timestamp, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messageevaluation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messageinfo.go b/platformclientv2/messageinfo.go index 0ecde3b33..60f84d26c 100644 --- a/platformclientv2/messageinfo.go +++ b/platformclientv2/messageinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Messageinfo struct { } +func (u *Messageinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messageinfo + + + + return json.Marshal(&struct { + LocalizableMessageCode *string `json:"localizableMessageCode,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + *Alias + }{ + LocalizableMessageCode: u.LocalizableMessageCode, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messageinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagemedia.go b/platformclientv2/messagemedia.go index 84afe8391..51fcff6ef 100644 --- a/platformclientv2/messagemedia.go +++ b/platformclientv2/messagemedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Messagemedia struct { } +func (u *Messagemedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagemedia + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagemedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagemediaattachment.go b/platformclientv2/messagemediaattachment.go index c2f40c53a..61ccaeaff 100644 --- a/platformclientv2/messagemediaattachment.go +++ b/platformclientv2/messagemediaattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Messagemediaattachment struct { } +func (u *Messagemediaattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagemediaattachment + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLength: u.ContentLength, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagemediaattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagemediadata.go b/platformclientv2/messagemediadata.go index 6f0d12c5f..766db958a 100644 --- a/platformclientv2/messagemediadata.go +++ b/platformclientv2/messagemediadata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Messagemediadata struct { } +func (u *Messagemediadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagemediadata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + UploadUrl *string `json:"uploadUrl,omitempty"` + + Status *string `json:"status,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + UploadUrl: u.UploadUrl, + + Status: u.Status, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagemediadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagemediaparticipant.go b/platformclientv2/messagemediaparticipant.go index 6504accf8..8db349970 100644 --- a/platformclientv2/messagemediaparticipant.go +++ b/platformclientv2/messagemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -165,6 +166,222 @@ type Messagemediaparticipant struct { } +func (u *Messagemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Team *Domainentityref `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Errorinfo `json:"errorInfo,omitempty"` + + Script *Domainentityref `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Domainentityref `json:"externalContact,omitempty"` + + ExternalOrganization *Domainentityref `json:"externalOrganization,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + Peer *string `json:"peer,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Journeycontext `json:"journeyContext,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + ToAddress *Address `json:"toAddress,omitempty"` + + FromAddress *Address `json:"fromAddress,omitempty"` + + Messages *[]Messagedetails `json:"messages,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + Peer: u.Peer, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + ConversationRoutingData: u.ConversationRoutingData, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + ToAddress: u.ToAddress, + + FromAddress: u.FromAddress, + + Messages: u.Messages, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagemediapolicy.go b/platformclientv2/messagemediapolicy.go index 993a35817..410562cd0 100644 --- a/platformclientv2/messagemediapolicy.go +++ b/platformclientv2/messagemediapolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Messagemediapolicy struct { } +func (u *Messagemediapolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagemediapolicy + + + + return json.Marshal(&struct { + Actions *Policyactions `json:"actions,omitempty"` + + Conditions *Messagemediapolicyconditions `json:"conditions,omitempty"` + *Alias + }{ + Actions: u.Actions, + + Conditions: u.Conditions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagemediapolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagemediapolicyconditions.go b/platformclientv2/messagemediapolicyconditions.go index 2d1caae00..537cff2d2 100644 --- a/platformclientv2/messagemediapolicyconditions.go +++ b/platformclientv2/messagemediapolicyconditions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Messagemediapolicyconditions struct { } +func (u *Messagemediapolicyconditions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagemediapolicyconditions + + + + return json.Marshal(&struct { + ForUsers *[]User `json:"forUsers,omitempty"` + + DateRanges *[]string `json:"dateRanges,omitempty"` + + ForQueues *[]Queue `json:"forQueues,omitempty"` + + WrapupCodes *[]Wrapupcode `json:"wrapupCodes,omitempty"` + + Languages *[]Language `json:"languages,omitempty"` + + TimeAllowed *Timeallowed `json:"timeAllowed,omitempty"` + *Alias + }{ + ForUsers: u.ForUsers, + + DateRanges: u.DateRanges, + + ForQueues: u.ForQueues, + + WrapupCodes: u.WrapupCodes, + + Languages: u.Languages, + + TimeAllowed: u.TimeAllowed, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagemediapolicyconditions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagesticker.go b/platformclientv2/messagesticker.go index 59d46b290..1d422927f 100644 --- a/platformclientv2/messagesticker.go +++ b/platformclientv2/messagesticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Messagesticker struct { } +func (u *Messagesticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagesticker + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagesticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagestickerattachment.go b/platformclientv2/messagestickerattachment.go index 49ecab70a..684739a92 100644 --- a/platformclientv2/messagestickerattachment.go +++ b/platformclientv2/messagestickerattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Messagestickerattachment struct { } +func (u *Messagestickerattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagestickerattachment + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagestickerattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingcampaign.go b/platformclientv2/messagingcampaign.go index dd331d054..29814c73c 100644 --- a/platformclientv2/messagingcampaign.go +++ b/platformclientv2/messagingcampaign.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Messagingcampaign struct { } +func (u *Messagingcampaign) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingcampaign + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Division *Domainentityref `json:"division,omitempty"` + + CampaignStatus *string `json:"campaignStatus,omitempty"` + + CallableTimeSet *Domainentityref `json:"callableTimeSet,omitempty"` + + ContactList *Domainentityref `json:"contactList,omitempty"` + + DncLists *[]Domainentityref `json:"dncLists,omitempty"` + + AlwaysRunning *bool `json:"alwaysRunning,omitempty"` + + ContactSorts *[]Contactsort `json:"contactSorts,omitempty"` + + MessagesPerMinute *int `json:"messagesPerMinute,omitempty"` + + Errors *[]Resterrordetail `json:"errors,omitempty"` + + SmsConfig *Smsconfig `json:"smsConfig,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Division: u.Division, + + CampaignStatus: u.CampaignStatus, + + CallableTimeSet: u.CallableTimeSet, + + ContactList: u.ContactList, + + DncLists: u.DncLists, + + AlwaysRunning: u.AlwaysRunning, + + ContactSorts: u.ContactSorts, + + MessagesPerMinute: u.MessagesPerMinute, + + Errors: u.Errors, + + SmsConfig: u.SmsConfig, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingcampaign) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingcampaigndivisionview.go b/platformclientv2/messagingcampaigndivisionview.go index a6037e76e..c10b2cfdc 100644 --- a/platformclientv2/messagingcampaigndivisionview.go +++ b/platformclientv2/messagingcampaigndivisionview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Messagingcampaigndivisionview struct { } +func (u *Messagingcampaigndivisionview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingcampaigndivisionview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingcampaigndivisionview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingcampaigndivisionviewentitylisting.go b/platformclientv2/messagingcampaigndivisionviewentitylisting.go index 92c999a65..648dca709 100644 --- a/platformclientv2/messagingcampaigndivisionviewentitylisting.go +++ b/platformclientv2/messagingcampaigndivisionviewentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Messagingcampaigndivisionviewentitylisting struct { } +func (u *Messagingcampaigndivisionviewentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingcampaigndivisionviewentitylisting + + + + return json.Marshal(&struct { + Entities *[]Messagingcampaigndivisionview `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingcampaigndivisionviewentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingcampaignentitylisting.go b/platformclientv2/messagingcampaignentitylisting.go index d9868963e..603bd08b5 100644 --- a/platformclientv2/messagingcampaignentitylisting.go +++ b/platformclientv2/messagingcampaignentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Messagingcampaignentitylisting struct { } +func (u *Messagingcampaignentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingcampaignentitylisting + + + + return json.Marshal(&struct { + Entities *[]Messagingcampaign `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingcampaignentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingintegration.go b/platformclientv2/messagingintegration.go index 26ee590b2..940eb8d7a 100644 --- a/platformclientv2/messagingintegration.go +++ b/platformclientv2/messagingintegration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Messagingintegration struct { } +func (u *Messagingintegration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingintegration + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Status *string `json:"status,omitempty"` + + MessengerType *string `json:"messengerType,omitempty"` + + Recipient *Domainentityref `json:"recipient,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + Version *int `json:"version,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Status: u.Status, + + MessengerType: u.MessengerType, + + Recipient: u.Recipient, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Version: u.Version, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingintegration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingintegrationentitylisting.go b/platformclientv2/messagingintegrationentitylisting.go index 8dadbd153..313d35421 100644 --- a/platformclientv2/messagingintegrationentitylisting.go +++ b/platformclientv2/messagingintegrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Messagingintegrationentitylisting struct { } +func (u *Messagingintegrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingintegrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Messagingintegration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingintegrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingrecipient.go b/platformclientv2/messagingrecipient.go index adff8e252..a05c107c5 100644 --- a/platformclientv2/messagingrecipient.go +++ b/platformclientv2/messagingrecipient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Messagingrecipient struct { } +func (u *Messagingrecipient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingrecipient + + + + return json.Marshal(&struct { + Nickname *string `json:"nickname,omitempty"` + + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + + Image *string `json:"image,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Email *string `json:"email,omitempty"` + *Alias + }{ + Nickname: u.Nickname, + + Id: u.Id, + + IdType: u.IdType, + + Image: u.Image, + + FirstName: u.FirstName, + + LastName: u.LastName, + + Email: u.Email, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingrecipient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingsticker.go b/platformclientv2/messagingsticker.go index 212e014eb..a872168f4 100644 --- a/platformclientv2/messagingsticker.go +++ b/platformclientv2/messagingsticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Messagingsticker struct { } +func (u *Messagingsticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingsticker + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ProviderStickerId *int `json:"providerStickerId,omitempty"` + + ProviderPackageId *int `json:"providerPackageId,omitempty"` + + PackageName *string `json:"packageName,omitempty"` + + MessengerType *string `json:"messengerType,omitempty"` + + StickerType *string `json:"stickerType,omitempty"` + + ProviderVersion *int `json:"providerVersion,omitempty"` + + UriLocation *string `json:"uriLocation,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ProviderStickerId: u.ProviderStickerId, + + ProviderPackageId: u.ProviderPackageId, + + PackageName: u.PackageName, + + MessengerType: u.MessengerType, + + StickerType: u.StickerType, + + ProviderVersion: u.ProviderVersion, + + UriLocation: u.UriLocation, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingsticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingstickerentitylisting.go b/platformclientv2/messagingstickerentitylisting.go index 370cb8b40..ac19bcbab 100644 --- a/platformclientv2/messagingstickerentitylisting.go +++ b/platformclientv2/messagingstickerentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Messagingstickerentitylisting struct { } +func (u *Messagingstickerentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingstickerentitylisting + + + + return json.Marshal(&struct { + Entities *[]Messagingsticker `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingstickerentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingtemplate.go b/platformclientv2/messagingtemplate.go index 1e336f97a..8b9cbcc94 100644 --- a/platformclientv2/messagingtemplate.go +++ b/platformclientv2/messagingtemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Messagingtemplate struct { } +func (u *Messagingtemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingtemplate + + + + return json.Marshal(&struct { + WhatsApp *Whatsappdefinition `json:"whatsApp,omitempty"` + *Alias + }{ + WhatsApp: u.WhatsApp, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingtemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messagingtemplaterequest.go b/platformclientv2/messagingtemplaterequest.go index 902f61613..a3025468f 100644 --- a/platformclientv2/messagingtemplaterequest.go +++ b/platformclientv2/messagingtemplaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Messagingtemplaterequest struct { } +func (u *Messagingtemplaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messagingtemplaterequest + + + + return json.Marshal(&struct { + ResponseId *string `json:"responseId,omitempty"` + + Parameters *[]Templateparameter `json:"parameters,omitempty"` + *Alias + }{ + ResponseId: u.ResponseId, + + Parameters: u.Parameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messagingtemplaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messengersettings.go b/platformclientv2/messengersettings.go index 62cb93fcf..a8ae389c2 100644 --- a/platformclientv2/messengersettings.go +++ b/platformclientv2/messengersettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Messengersettings struct { } +func (u *Messengersettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messengersettings + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + Styles *Messengerstyles `json:"styles,omitempty"` + + LauncherButton *Launcherbuttonsettings `json:"launcherButton,omitempty"` + + FileUpload *Fileuploadsettings `json:"fileUpload,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + Styles: u.Styles, + + LauncherButton: u.LauncherButton, + + FileUpload: u.FileUpload, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messengersettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/messengerstyles.go b/platformclientv2/messengerstyles.go index 8c25c6598..6e855b02b 100644 --- a/platformclientv2/messengerstyles.go +++ b/platformclientv2/messengerstyles.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Messengerstyles struct { } +func (u *Messengerstyles) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Messengerstyles + + + + return json.Marshal(&struct { + PrimaryColor *string `json:"primaryColor,omitempty"` + *Alias + }{ + PrimaryColor: u.PrimaryColor, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Messengerstyles) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/metabase.go b/platformclientv2/metabase.go index 2e79640cf..0fc24b625 100644 --- a/platformclientv2/metabase.go +++ b/platformclientv2/metabase.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Metabase struct { } +func (u *Metabase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Metabase + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + VarType *string `json:"type,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + VarType: u.VarType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Metabase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/metadata.go b/platformclientv2/metadata.go index c70275fb4..f85eb755d 100644 --- a/platformclientv2/metadata.go +++ b/platformclientv2/metadata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Metadata struct { } +func (u *Metadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Metadata + + + + return json.Marshal(&struct { + PairingToken *string `json:"pairing-token,omitempty"` + + PairingTrust *[]string `json:"pairing-trust,omitempty"` + + PairingUrl *string `json:"pairing-url,omitempty"` + *Alias + }{ + PairingToken: u.PairingToken, + + PairingTrust: u.PairingTrust, + + PairingUrl: u.PairingUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Metadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/meteredassignmentbyagent.go b/platformclientv2/meteredassignmentbyagent.go index b154057b0..a13e6ed79 100644 --- a/platformclientv2/meteredassignmentbyagent.go +++ b/platformclientv2/meteredassignmentbyagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Meteredassignmentbyagent struct { } +func (u *Meteredassignmentbyagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Meteredassignmentbyagent + + + + return json.Marshal(&struct { + EvaluationContextId *string `json:"evaluationContextId,omitempty"` + + Evaluators *[]User `json:"evaluators,omitempty"` + + MaxNumberEvaluations *int `json:"maxNumberEvaluations,omitempty"` + + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + TimeInterval *Timeinterval `json:"timeInterval,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + *Alias + }{ + EvaluationContextId: u.EvaluationContextId, + + Evaluators: u.Evaluators, + + MaxNumberEvaluations: u.MaxNumberEvaluations, + + EvaluationForm: u.EvaluationForm, + + TimeInterval: u.TimeInterval, + + TimeZone: u.TimeZone, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Meteredassignmentbyagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/meteredevaluationassignment.go b/platformclientv2/meteredevaluationassignment.go index e5747544d..36f3f885a 100644 --- a/platformclientv2/meteredevaluationassignment.go +++ b/platformclientv2/meteredevaluationassignment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Meteredevaluationassignment struct { } +func (u *Meteredevaluationassignment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Meteredevaluationassignment + + + + return json.Marshal(&struct { + EvaluationContextId *string `json:"evaluationContextId,omitempty"` + + Evaluators *[]User `json:"evaluators,omitempty"` + + MaxNumberEvaluations *int `json:"maxNumberEvaluations,omitempty"` + + EvaluationForm *Evaluationform `json:"evaluationForm,omitempty"` + + AssignToActiveUser *bool `json:"assignToActiveUser,omitempty"` + + TimeInterval *Timeinterval `json:"timeInterval,omitempty"` + *Alias + }{ + EvaluationContextId: u.EvaluationContextId, + + Evaluators: u.Evaluators, + + MaxNumberEvaluations: u.MaxNumberEvaluations, + + EvaluationForm: u.EvaluationForm, + + AssignToActiveUser: u.AssignToActiveUser, + + TimeInterval: u.TimeInterval, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Meteredevaluationassignment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/metric.go b/platformclientv2/metric.go index a107d32ef..cf5347e9b 100644 --- a/platformclientv2/metric.go +++ b/platformclientv2/metric.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,73 @@ type Metric struct { } +func (u *Metric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Metric + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateUnlinked := new(string) + if u.DateUnlinked != nil { + *DateUnlinked = timeutil.Strftime(u.DateUnlinked, "%Y-%m-%d") + } else { + DateUnlinked = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + MetricDefinitionId *string `json:"metricDefinitionId,omitempty"` + + Objective *Objective `json:"objective,omitempty"` + + PerformanceProfileId *string `json:"performanceProfileId,omitempty"` + + LinkedMetric *Addressableentityref `json:"linkedMetric,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateUnlinked *string `json:"dateUnlinked,omitempty"` + + SourcePerformanceProfile *Performanceprofile `json:"sourcePerformanceProfile,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + MetricDefinitionId: u.MetricDefinitionId, + + Objective: u.Objective, + + PerformanceProfileId: u.PerformanceProfileId, + + LinkedMetric: u.LinkedMetric, + + DateCreated: DateCreated, + + DateUnlinked: DateUnlinked, + + SourcePerformanceProfile: u.SourcePerformanceProfile, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Metric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/metricdefinition.go b/platformclientv2/metricdefinition.go index 19a460762..fe561b47b 100644 --- a/platformclientv2/metricdefinition.go +++ b/platformclientv2/metricdefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Metricdefinition struct { } +func (u *Metricdefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Metricdefinition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + UnitType *string `json:"unitType,omitempty"` + + ShortName *string `json:"shortName,omitempty"` + + DividendMetrics *[]string `json:"dividendMetrics,omitempty"` + + DivisorMetrics *[]string `json:"divisorMetrics,omitempty"` + + DefaultObjective *Defaultobjective `json:"defaultObjective,omitempty"` + + LockTemplateId *string `json:"lockTemplateId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + UnitType: u.UnitType, + + ShortName: u.ShortName, + + DividendMetrics: u.DividendMetrics, + + DivisorMetrics: u.DivisorMetrics, + + DefaultObjective: u.DefaultObjective, + + LockTemplateId: u.LockTemplateId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Metricdefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/metrics.go b/platformclientv2/metrics.go index 2b212e2c7..230f2732c 100644 --- a/platformclientv2/metrics.go +++ b/platformclientv2/metrics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Metrics struct { } +func (u *Metrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Metrics + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Order *int `json:"order,omitempty"` + + MetricDefinitionName *string `json:"metricDefinitionName,omitempty"` + + MetricDefinitionId *string `json:"metricDefinitionId,omitempty"` + + UnitType *string `json:"unitType,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + TemplateName *string `json:"templateName,omitempty"` + + MaxPoints *int `json:"maxPoints,omitempty"` + + PerformanceProfileId *string `json:"performanceProfileId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Order: u.Order, + + MetricDefinitionName: u.MetricDefinitionName, + + MetricDefinitionId: u.MetricDefinitionId, + + UnitType: u.UnitType, + + Enabled: u.Enabled, + + TemplateName: u.TemplateName, + + MaxPoints: u.MaxPoints, + + PerformanceProfileId: u.PerformanceProfileId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Metrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/minedintentslisting.go b/platformclientv2/minedintentslisting.go index c1a205799..c70d0405f 100644 --- a/platformclientv2/minedintentslisting.go +++ b/platformclientv2/minedintentslisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Minedintentslisting struct { } +func (u *Minedintentslisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Minedintentslisting + + + + return json.Marshal(&struct { + Entities *[]Minerintent `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Minedintentslisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/miner.go b/platformclientv2/miner.go index 2e7698737..6c1ce3f21 100644 --- a/platformclientv2/miner.go +++ b/platformclientv2/miner.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,128 @@ type Miner struct { } +func (u *Miner) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Miner + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + ConversationsDateRangeStart := new(string) + if u.ConversationsDateRangeStart != nil { + *ConversationsDateRangeStart = timeutil.Strftime(u.ConversationsDateRangeStart, "%Y-%m-%d") + } else { + ConversationsDateRangeStart = nil + } + + ConversationsDateRangeEnd := new(string) + if u.ConversationsDateRangeEnd != nil { + *ConversationsDateRangeEnd = timeutil.Strftime(u.ConversationsDateRangeEnd, "%Y-%m-%d") + } else { + ConversationsDateRangeEnd = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + DateTriggered := new(string) + if u.DateTriggered != nil { + + *DateTriggered = timeutil.Strftime(u.DateTriggered, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateTriggered = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Language *string `json:"language,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + Status *string `json:"status,omitempty"` + + ConversationsDateRangeStart *string `json:"conversationsDateRangeStart,omitempty"` + + ConversationsDateRangeEnd *string `json:"conversationsDateRangeEnd,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + Message *string `json:"message,omitempty"` + + ConversationDataUploaded *bool `json:"conversationDataUploaded,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + QueueIds *[]string `json:"queueIds,omitempty"` + + DateTriggered *string `json:"dateTriggered,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + LatestDraftVersion **Draft `json:"latestDraftVersion,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Language: u.Language, + + DateCreated: DateCreated, + + Status: u.Status, + + ConversationsDateRangeStart: ConversationsDateRangeStart, + + ConversationsDateRangeEnd: ConversationsDateRangeEnd, + + DateCompleted: DateCompleted, + + Message: u.Message, + + ConversationDataUploaded: u.ConversationDataUploaded, + + MediaType: u.MediaType, + + QueueIds: u.QueueIds, + + DateTriggered: DateTriggered, + + DateModified: DateModified, + + LatestDraftVersion: u.LatestDraftVersion, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Miner) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/minerexecuterequest.go b/platformclientv2/minerexecuterequest.go index 0e851bea8..e6670a0f2 100644 --- a/platformclientv2/minerexecuterequest.go +++ b/platformclientv2/minerexecuterequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,52 @@ type Minerexecuterequest struct { } +func (u *Minerexecuterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Minerexecuterequest + + + DateStart := new(string) + if u.DateStart != nil { + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%d") + } else { + DateStart = nil + } + + DateEnd := new(string) + if u.DateEnd != nil { + *DateEnd = timeutil.Strftime(u.DateEnd, "%Y-%m-%d") + } else { + DateEnd = nil + } + + + return json.Marshal(&struct { + DateStart *string `json:"dateStart,omitempty"` + + DateEnd *string `json:"dateEnd,omitempty"` + + UploadKey *string `json:"uploadKey,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + QueueIds *[]string `json:"queueIds,omitempty"` + *Alias + }{ + DateStart: DateStart, + + DateEnd: DateEnd, + + UploadKey: u.UploadKey, + + MediaType: u.MediaType, + + QueueIds: u.QueueIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Minerexecuterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/minerintent.go b/platformclientv2/minerintent.go index d4494f709..d04cb2271 100644 --- a/platformclientv2/minerintent.go +++ b/platformclientv2/minerintent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Minerintent struct { } +func (u *Minerintent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Minerintent + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Miner *Miner `json:"miner,omitempty"` + + Utterances *[]Utterance `json:"utterances,omitempty"` + + AnalyticVolumePercent *float64 `json:"analyticVolumePercent,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Miner: u.Miner, + + Utterances: u.Utterances, + + AnalyticVolumePercent: u.AnalyticVolumePercent, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Minerintent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/minerlisting.go b/platformclientv2/minerlisting.go index ed2de0122..6cc5e48ae 100644 --- a/platformclientv2/minerlisting.go +++ b/platformclientv2/minerlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Minerlisting struct { } +func (u *Minerlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Minerlisting + + + + return json.Marshal(&struct { + Entities *[]Miner `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Minerlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/minlength.go b/platformclientv2/minlength.go index d520a2155..01c67bab6 100644 --- a/platformclientv2/minlength.go +++ b/platformclientv2/minlength.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Minlength struct { } +func (u *Minlength) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Minlength + + + + return json.Marshal(&struct { + Min *int `json:"min,omitempty"` + + Max *int `json:"max,omitempty"` + *Alias + }{ + Min: u.Min, + + Max: u.Max, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Minlength) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/modelingprocessingerror.go b/platformclientv2/modelingprocessingerror.go index 5103a715b..2ac57a59d 100644 --- a/platformclientv2/modelingprocessingerror.go +++ b/platformclientv2/modelingprocessingerror.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Modelingprocessingerror struct { } +func (u *Modelingprocessingerror) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Modelingprocessingerror + + + + return json.Marshal(&struct { + InternalErrorCode *string `json:"internalErrorCode,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + InternalErrorCode: u.InternalErrorCode, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Modelingprocessingerror) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/modelingstatusresponse.go b/platformclientv2/modelingstatusresponse.go index a5fa5a220..11c6fb862 100644 --- a/platformclientv2/modelingstatusresponse.go +++ b/platformclientv2/modelingstatusresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Modelingstatusresponse struct { } +func (u *Modelingstatusresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Modelingstatusresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Status *string `json:"status,omitempty"` + + ErrorDetails *[]Modelingprocessingerror `json:"errorDetails,omitempty"` + + ModelingResultUri *string `json:"modelingResultUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Status: u.Status, + + ErrorDetails: u.ErrorDetails, + + ModelingResultUri: u.ModelingResultUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Modelingstatusresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/movemanagementunitrequest.go b/platformclientv2/movemanagementunitrequest.go index c4635a87c..6ea6ca71a 100644 --- a/platformclientv2/movemanagementunitrequest.go +++ b/platformclientv2/movemanagementunitrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Movemanagementunitrequest struct { } +func (u *Movemanagementunitrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Movemanagementunitrequest + + + + return json.Marshal(&struct { + BusinessUnitId *string `json:"businessUnitId,omitempty"` + *Alias + }{ + BusinessUnitId: u.BusinessUnitId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Movemanagementunitrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/movemanagementunitresponse.go b/platformclientv2/movemanagementunitresponse.go index 5a656c7a2..4fec5c5f4 100644 --- a/platformclientv2/movemanagementunitresponse.go +++ b/platformclientv2/movemanagementunitresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Movemanagementunitresponse struct { } +func (u *Movemanagementunitresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Movemanagementunitresponse + + + + return json.Marshal(&struct { + BusinessUnit *Businessunitreference `json:"businessUnit,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + BusinessUnit: u.BusinessUnit, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Movemanagementunitresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/murescheduleresultwrapper.go b/platformclientv2/murescheduleresultwrapper.go index dd033e104..69a98fa5e 100644 --- a/platformclientv2/murescheduleresultwrapper.go +++ b/platformclientv2/murescheduleresultwrapper.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Murescheduleresultwrapper struct { } +func (u *Murescheduleresultwrapper) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Murescheduleresultwrapper + + + + return json.Marshal(&struct { + AgentSchedules *[]Buagentschedulerescheduleresponse `json:"agentSchedules,omitempty"` + *Alias + }{ + AgentSchedules: u.AgentSchedules, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Murescheduleresultwrapper) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/namedentity.go b/platformclientv2/namedentity.go index f1012d126..6f3fe9b90 100644 --- a/platformclientv2/namedentity.go +++ b/platformclientv2/namedentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Namedentity struct { } +func (u *Namedentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Namedentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Namedentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/namedentityannotation.go b/platformclientv2/namedentityannotation.go index 68189fc79..d4421d0de 100644 --- a/platformclientv2/namedentityannotation.go +++ b/platformclientv2/namedentityannotation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Namedentityannotation struct { } +func (u *Namedentityannotation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Namedentityannotation + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Namedentityannotation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/namedentitydefinition.go b/platformclientv2/namedentitydefinition.go index 235c2521b..ef1669953 100644 --- a/platformclientv2/namedentitydefinition.go +++ b/platformclientv2/namedentitydefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Namedentitydefinition struct { } +func (u *Namedentitydefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Namedentitydefinition + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Namedentitydefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/namedentitytypebinding.go b/platformclientv2/namedentitytypebinding.go index f9f47f8cd..ebd2ef407 100644 --- a/platformclientv2/namedentitytypebinding.go +++ b/platformclientv2/namedentitytypebinding.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Namedentitytypebinding struct { } +func (u *Namedentitytypebinding) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Namedentitytypebinding + + + + return json.Marshal(&struct { + EntityType *string `json:"entityType,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + EntityType: u.EntityType, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Namedentitytypebinding) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/namedentitytypedefinition.go b/platformclientv2/namedentitytypedefinition.go index 522a0f516..c680b5d75 100644 --- a/platformclientv2/namedentitytypedefinition.go +++ b/platformclientv2/namedentitytypedefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Namedentitytypedefinition struct { } +func (u *Namedentitytypedefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Namedentitytypedefinition + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Mechanism *Namedentitytypemechanism `json:"mechanism,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + Mechanism: u.Mechanism, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Namedentitytypedefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/namedentitytypeitem.go b/platformclientv2/namedentitytypeitem.go index 7816d7260..87b7df347 100644 --- a/platformclientv2/namedentitytypeitem.go +++ b/platformclientv2/namedentitytypeitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Namedentitytypeitem struct { } +func (u *Namedentitytypeitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Namedentitytypeitem + + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + + Synonyms *[]string `json:"synonyms,omitempty"` + *Alias + }{ + Value: u.Value, + + Synonyms: u.Synonyms, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Namedentitytypeitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/namedentitytypemechanism.go b/platformclientv2/namedentitytypemechanism.go index b2f0068e9..235008196 100644 --- a/platformclientv2/namedentitytypemechanism.go +++ b/platformclientv2/namedentitytypemechanism.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Namedentitytypemechanism struct { } +func (u *Namedentitytypemechanism) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Namedentitytypemechanism + + + + return json.Marshal(&struct { + Items *[]Namedentitytypeitem `json:"items,omitempty"` + + Restricted *bool `json:"restricted,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Items: u.Items, + + Restricted: u.Restricted, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Namedentitytypemechanism) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nluconfusionmatrixcolumn.go b/platformclientv2/nluconfusionmatrixcolumn.go index a4494636d..f2f4b0af2 100644 --- a/platformclientv2/nluconfusionmatrixcolumn.go +++ b/platformclientv2/nluconfusionmatrixcolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nluconfusionmatrixcolumn struct { } +func (u *Nluconfusionmatrixcolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nluconfusionmatrixcolumn + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Value *float32 `json:"value,omitempty"` + *Alias + }{ + Name: u.Name, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nluconfusionmatrixcolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nluconfusionmatrixrow.go b/platformclientv2/nluconfusionmatrixrow.go index d227a0dd2..8a450b7a3 100644 --- a/platformclientv2/nluconfusionmatrixrow.go +++ b/platformclientv2/nluconfusionmatrixrow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nluconfusionmatrixrow struct { } +func (u *Nluconfusionmatrixrow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nluconfusionmatrixrow + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Columns *[]Nluconfusionmatrixcolumn `json:"columns,omitempty"` + *Alias + }{ + Name: u.Name, + + Columns: u.Columns, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nluconfusionmatrixrow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludetectioncontext.go b/platformclientv2/nludetectioncontext.go index 3db00ebf6..ee62889d5 100644 --- a/platformclientv2/nludetectioncontext.go +++ b/platformclientv2/nludetectioncontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nludetectioncontext struct { } +func (u *Nludetectioncontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludetectioncontext + + + + return json.Marshal(&struct { + Intent *Contextintent `json:"intent,omitempty"` + + Entity *Contextentity `json:"entity,omitempty"` + *Alias + }{ + Intent: u.Intent, + + Entity: u.Entity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludetectioncontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludetectioninput.go b/platformclientv2/nludetectioninput.go index e37801155..cb82dfb78 100644 --- a/platformclientv2/nludetectioninput.go +++ b/platformclientv2/nludetectioninput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Nludetectioninput struct { } +func (u *Nludetectioninput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludetectioninput + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + *Alias + }{ + Text: u.Text, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludetectioninput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludetectionoutput.go b/platformclientv2/nludetectionoutput.go index 10a30b9e5..0f0c21c60 100644 --- a/platformclientv2/nludetectionoutput.go +++ b/platformclientv2/nludetectionoutput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nludetectionoutput struct { } +func (u *Nludetectionoutput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludetectionoutput + + + + return json.Marshal(&struct { + Intents *[]Detectedintent `json:"intents,omitempty"` + + DialogActs *[]Detecteddialogact `json:"dialogActs,omitempty"` + *Alias + }{ + Intents: u.Intents, + + DialogActs: u.DialogActs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludetectionoutput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludetectionrequest.go b/platformclientv2/nludetectionrequest.go index 8108534c2..d09b7e3c8 100644 --- a/platformclientv2/nludetectionrequest.go +++ b/platformclientv2/nludetectionrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nludetectionrequest struct { } +func (u *Nludetectionrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludetectionrequest + + + + return json.Marshal(&struct { + Input *Nludetectioninput `json:"input,omitempty"` + + Context *Nludetectioncontext `json:"context,omitempty"` + *Alias + }{ + Input: u.Input, + + Context: u.Context, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludetectionrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludetectionresponse.go b/platformclientv2/nludetectionresponse.go index 1536c7782..5e49f60a6 100644 --- a/platformclientv2/nludetectionresponse.go +++ b/platformclientv2/nludetectionresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Nludetectionresponse struct { } +func (u *Nludetectionresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludetectionresponse + + + + return json.Marshal(&struct { + Version *Nludomainversion `json:"version,omitempty"` + + Output *Nludetectionoutput `json:"output,omitempty"` + + Input *Nludetectioninput `json:"input,omitempty"` + *Alias + }{ + Version: u.Version, + + Output: u.Output, + + Input: u.Input, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludetectionresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludomain.go b/platformclientv2/nludomain.go index 9efff35b4..2f05080d2 100644 --- a/platformclientv2/nludomain.go +++ b/platformclientv2/nludomain.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Nludomain struct { } +func (u *Nludomain) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludomain + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Language *string `json:"language,omitempty"` + + DraftVersion *Nludomainversion `json:"draftVersion,omitempty"` + + LastPublishedVersion *Nludomainversion `json:"lastPublishedVersion,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + EngineVersion *string `json:"engineVersion,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Language: u.Language, + + DraftVersion: u.DraftVersion, + + LastPublishedVersion: u.LastPublishedVersion, + + DateCreated: DateCreated, + + DateModified: DateModified, + + EngineVersion: u.EngineVersion, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludomain) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludomainlisting.go b/platformclientv2/nludomainlisting.go index cf49fa52b..f2834aedf 100644 --- a/platformclientv2/nludomainlisting.go +++ b/platformclientv2/nludomainlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Nludomainlisting struct { } +func (u *Nludomainlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludomainlisting + + + + return json.Marshal(&struct { + Entities *[]Nludomain `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludomainlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludomainversion.go b/platformclientv2/nludomainversion.go index 549ab0e76..5b4662020 100644 --- a/platformclientv2/nludomainversion.go +++ b/platformclientv2/nludomainversion.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,110 @@ type Nludomainversion struct { } +func (u *Nludomainversion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludomainversion + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateTrained := new(string) + if u.DateTrained != nil { + + *DateTrained = timeutil.Strftime(u.DateTrained, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateTrained = nil + } + + DatePublished := new(string) + if u.DatePublished != nil { + + *DatePublished = timeutil.Strftime(u.DatePublished, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DatePublished = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Domain **Nludomain `json:"domain,omitempty"` + + Description *string `json:"description,omitempty"` + + Language *string `json:"language,omitempty"` + + Published *bool `json:"published,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + DateTrained *string `json:"dateTrained,omitempty"` + + DatePublished *string `json:"datePublished,omitempty"` + + TrainingStatus *string `json:"trainingStatus,omitempty"` + + EvaluationStatus *string `json:"evaluationStatus,omitempty"` + + Intents *[]Intentdefinition `json:"intents,omitempty"` + + EntityTypes *[]Namedentitytypedefinition `json:"entityTypes,omitempty"` + + Entities *[]Namedentitydefinition `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Domain: u.Domain, + + Description: u.Description, + + Language: u.Language, + + Published: u.Published, + + DateCreated: DateCreated, + + DateModified: DateModified, + + DateTrained: DateTrained, + + DatePublished: DatePublished, + + TrainingStatus: u.TrainingStatus, + + EvaluationStatus: u.EvaluationStatus, + + Intents: u.Intents, + + EntityTypes: u.EntityTypes, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludomainversion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludomainversionlisting.go b/platformclientv2/nludomainversionlisting.go index 89def38b8..cf91861b5 100644 --- a/platformclientv2/nludomainversionlisting.go +++ b/platformclientv2/nludomainversionlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Nludomainversionlisting struct { } +func (u *Nludomainversionlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludomainversionlisting + + + + return json.Marshal(&struct { + Entities *[]Nludomainversion `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludomainversionlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludomainversionqualityreport.go b/platformclientv2/nludomainversionqualityreport.go index c4e8feadf..a41c07c2f 100644 --- a/platformclientv2/nludomainversionqualityreport.go +++ b/platformclientv2/nludomainversionqualityreport.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Nludomainversionqualityreport struct { } +func (u *Nludomainversionqualityreport) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludomainversionqualityreport + + + + return json.Marshal(&struct { + Version *Nludomainversion `json:"version,omitempty"` + + ConfusionMatrix *[]Nluconfusionmatrixrow `json:"confusionMatrix,omitempty"` + + Summary *Nluqualityreportsummary `json:"summary,omitempty"` + *Alias + }{ + Version: u.Version, + + ConfusionMatrix: u.ConfusionMatrix, + + Summary: u.Summary, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludomainversionqualityreport) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nludomainversiontrainingresponse.go b/platformclientv2/nludomainversiontrainingresponse.go index 4c128f15b..0c3a57680 100644 --- a/platformclientv2/nludomainversiontrainingresponse.go +++ b/platformclientv2/nludomainversiontrainingresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nludomainversiontrainingresponse struct { } +func (u *Nludomainversiontrainingresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nludomainversiontrainingresponse + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Version *Nludomainversion `json:"version,omitempty"` + *Alias + }{ + Message: u.Message, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nludomainversiontrainingresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nlufeedbacklisting.go b/platformclientv2/nlufeedbacklisting.go index b4d89b50e..cd5afe597 100644 --- a/platformclientv2/nlufeedbacklisting.go +++ b/platformclientv2/nlufeedbacklisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Nlufeedbacklisting struct { } +func (u *Nlufeedbacklisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nlufeedbacklisting + + + + return json.Marshal(&struct { + Entities *[]Nlufeedbackresponse `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nlufeedbacklisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nlufeedbackrequest.go b/platformclientv2/nlufeedbackrequest.go index cc6f3add2..8465db741 100644 --- a/platformclientv2/nlufeedbackrequest.go +++ b/platformclientv2/nlufeedbackrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Nlufeedbackrequest struct { } +func (u *Nlufeedbackrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nlufeedbackrequest + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Intents *[]Intentfeedback `json:"intents,omitempty"` + + VersionId *string `json:"versionId,omitempty"` + *Alias + }{ + Text: u.Text, + + Intents: u.Intents, + + VersionId: u.VersionId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nlufeedbackrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nlufeedbackresponse.go b/platformclientv2/nlufeedbackresponse.go index 9dea7d8d9..6e3a83af8 100644 --- a/platformclientv2/nlufeedbackresponse.go +++ b/platformclientv2/nlufeedbackresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Nlufeedbackresponse struct { } +func (u *Nlufeedbackresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nlufeedbackresponse + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Text *string `json:"text,omitempty"` + + Intents *[]Intentfeedback `json:"intents,omitempty"` + + Version *Nludomainversion `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Text: u.Text, + + Intents: u.Intents, + + Version: u.Version, + + DateCreated: DateCreated, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nlufeedbackresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nluinfo.go b/platformclientv2/nluinfo.go index b3c8d4da3..71a01a8b1 100644 --- a/platformclientv2/nluinfo.go +++ b/platformclientv2/nluinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Nluinfo struct { } +func (u *Nluinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nluinfo + + + + return json.Marshal(&struct { + Domain *Addressableentityref `json:"domain,omitempty"` + + Version **Nludomainversion `json:"version,omitempty"` + + Intents *[]Intent `json:"intents,omitempty"` + *Alias + }{ + Domain: u.Domain, + + Version: u.Version, + + Intents: u.Intents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nluinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nluqualityreportsummary.go b/platformclientv2/nluqualityreportsummary.go index 860aa9bf0..b8ffef5c9 100644 --- a/platformclientv2/nluqualityreportsummary.go +++ b/platformclientv2/nluqualityreportsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Nluqualityreportsummary struct { } +func (u *Nluqualityreportsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nluqualityreportsummary + + + + return json.Marshal(&struct { + Metrics *[]Nluqualityreportsummarymetric `json:"metrics,omitempty"` + *Alias + }{ + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nluqualityreportsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nluqualityreportsummarymetric.go b/platformclientv2/nluqualityreportsummarymetric.go index e153377d7..99eb3e25f 100644 --- a/platformclientv2/nluqualityreportsummarymetric.go +++ b/platformclientv2/nluqualityreportsummarymetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nluqualityreportsummarymetric struct { } +func (u *Nluqualityreportsummarymetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nluqualityreportsummarymetric + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Value *float32 `json:"value,omitempty"` + *Alias + }{ + Name: u.Name, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nluqualityreportsummarymetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nluutterance.go b/platformclientv2/nluutterance.go index 55de98eb6..1a5a10b1f 100644 --- a/platformclientv2/nluutterance.go +++ b/platformclientv2/nluutterance.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Nluutterance struct { } +func (u *Nluutterance) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nluutterance + + + + return json.Marshal(&struct { + Segments *[]Nluutterancesegment `json:"segments,omitempty"` + *Alias + }{ + Segments: u.Segments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nluutterance) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nluutterancesegment.go b/platformclientv2/nluutterancesegment.go index 86383d71d..191e0a43e 100644 --- a/platformclientv2/nluutterancesegment.go +++ b/platformclientv2/nluutterancesegment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nluutterancesegment struct { } +func (u *Nluutterancesegment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nluutterancesegment + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Entity *Namedentityannotation `json:"entity,omitempty"` + *Alias + }{ + Text: u.Text, + + Entity: u.Entity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nluutterancesegment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/note.go b/platformclientv2/note.go index 6546b0e3f..4301b4ecd 100644 --- a/platformclientv2/note.go +++ b/platformclientv2/note.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Note struct { } +func (u *Note) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Note + + + ModifyDate := new(string) + if u.ModifyDate != nil { + + *ModifyDate = timeutil.Strftime(u.ModifyDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifyDate = nil + } + + CreateDate := new(string) + if u.CreateDate != nil { + + *CreateDate = timeutil.Strftime(u.CreateDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreateDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + + NoteText *string `json:"noteText,omitempty"` + + ModifyDate *string `json:"modifyDate,omitempty"` + + CreateDate *string `json:"createDate,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + ExternalDataSources *[]Externaldatasource `json:"externalDataSources,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + EntityId: u.EntityId, + + EntityType: u.EntityType, + + NoteText: u.NoteText, + + ModifyDate: ModifyDate, + + CreateDate: CreateDate, + + CreatedBy: u.CreatedBy, + + ExternalDataSources: u.ExternalDataSources, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Note) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/notelisting.go b/platformclientv2/notelisting.go index 40efe673a..2b81c083c 100644 --- a/platformclientv2/notelisting.go +++ b/platformclientv2/notelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Notelisting struct { } +func (u *Notelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Notelisting + + + + return json.Marshal(&struct { + Entities *[]Note `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Notelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/notificationsresponse.go b/platformclientv2/notificationsresponse.go index 2406df5cb..a36f567a1 100644 --- a/platformclientv2/notificationsresponse.go +++ b/platformclientv2/notificationsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Notificationsresponse struct { } +func (u *Notificationsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Notificationsresponse + + + + return json.Marshal(&struct { + Entities *[]Wfmusernotification `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Notificationsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/notificationtemplatebody.go b/platformclientv2/notificationtemplatebody.go index 8ae99f6f8..77ae86e1f 100644 --- a/platformclientv2/notificationtemplatebody.go +++ b/platformclientv2/notificationtemplatebody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Notificationtemplatebody struct { } +func (u *Notificationtemplatebody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Notificationtemplatebody + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Parameters *[]Notificationtemplateparameter `json:"parameters,omitempty"` + *Alias + }{ + Text: u.Text, + + Parameters: u.Parameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Notificationtemplatebody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/notificationtemplatefooter.go b/platformclientv2/notificationtemplatefooter.go index 1068aa43e..ab54cb79b 100644 --- a/platformclientv2/notificationtemplatefooter.go +++ b/platformclientv2/notificationtemplatefooter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Notificationtemplatefooter struct { } +func (u *Notificationtemplatefooter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Notificationtemplatefooter + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + *Alias + }{ + Text: u.Text, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Notificationtemplatefooter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/notificationtemplateheader.go b/platformclientv2/notificationtemplateheader.go index af39dc7de..78a25948a 100644 --- a/platformclientv2/notificationtemplateheader.go +++ b/platformclientv2/notificationtemplateheader.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Notificationtemplateheader struct { } +func (u *Notificationtemplateheader) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Notificationtemplateheader + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Media *Contentattachment `json:"media,omitempty"` + + Parameters *[]Notificationtemplateparameter `json:"parameters,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Text: u.Text, + + Media: u.Media, + + Parameters: u.Parameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Notificationtemplateheader) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/notificationtemplateparameter.go b/platformclientv2/notificationtemplateparameter.go index 13dc8ad43..55ace176a 100644 --- a/platformclientv2/notificationtemplateparameter.go +++ b/platformclientv2/notificationtemplateparameter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Notificationtemplateparameter struct { } +func (u *Notificationtemplateparameter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Notificationtemplateparameter + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Text *string `json:"text,omitempty"` + *Alias + }{ + Name: u.Name, + + Text: u.Text, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Notificationtemplateparameter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ntpsettings.go b/platformclientv2/ntpsettings.go index ce22743da..77596f361 100644 --- a/platformclientv2/ntpsettings.go +++ b/platformclientv2/ntpsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Ntpsettings struct { } +func (u *Ntpsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ntpsettings + + + + return json.Marshal(&struct { + Servers *[]string `json:"servers,omitempty"` + *Alias + }{ + Servers: u.Servers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ntpsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/nuancemixdlgsettings.go b/platformclientv2/nuancemixdlgsettings.go index 578fbf2b2..96a405578 100644 --- a/platformclientv2/nuancemixdlgsettings.go +++ b/platformclientv2/nuancemixdlgsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Nuancemixdlgsettings struct { } +func (u *Nuancemixdlgsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Nuancemixdlgsettings + + + + return json.Marshal(&struct { + ChannelId *string `json:"channelId,omitempty"` + + InputParameters *map[string]interface{} `json:"inputParameters,omitempty"` + *Alias + }{ + ChannelId: u.ChannelId, + + InputParameters: u.InputParameters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Nuancemixdlgsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/number.go b/platformclientv2/number.go index 027d8f0e1..e36fde3d9 100644 --- a/platformclientv2/number.go +++ b/platformclientv2/number.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Number struct { } +func (u *Number) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Number + + + + return json.Marshal(&struct { + Start *string `json:"start,omitempty"` + + End *string `json:"end,omitempty"` + *Alias + }{ + Start: u.Start, + + End: u.End, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Number) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/numberplan.go b/platformclientv2/numberplan.go index 4d46e9d71..828df4247 100644 --- a/platformclientv2/numberplan.go +++ b/platformclientv2/numberplan.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,110 @@ type Numberplan struct { } +func (u *Numberplan) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Numberplan + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Match *string `json:"match,omitempty"` + + NormalizedFormat *string `json:"normalizedFormat,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Numbers *[]Number `json:"numbers,omitempty"` + + DigitLength *Digitlength `json:"digitLength,omitempty"` + + Classification *string `json:"classification,omitempty"` + + MatchType *string `json:"matchType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Match: u.Match, + + NormalizedFormat: u.NormalizedFormat, + + Priority: u.Priority, + + Numbers: u.Numbers, + + DigitLength: u.DigitLength, + + Classification: u.Classification, + + MatchType: u.MatchType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Numberplan) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/numericrange.go b/platformclientv2/numericrange.go index dc49356cd..a347362da 100644 --- a/platformclientv2/numericrange.go +++ b/platformclientv2/numericrange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Numericrange struct { } +func (u *Numericrange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Numericrange + + + + return json.Marshal(&struct { + Gt *float32 `json:"gt,omitempty"` + + Gte *float32 `json:"gte,omitempty"` + + Lt *float32 `json:"lt,omitempty"` + + Lte *float32 `json:"lte,omitempty"` + *Alias + }{ + Gt: u.Gt, + + Gte: u.Gte, + + Lt: u.Lt, + + Lte: u.Lte, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Numericrange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthauthorization.go b/platformclientv2/oauthauthorization.go index e02fca640..70eac35c3 100644 --- a/platformclientv2/oauthauthorization.go +++ b/platformclientv2/oauthauthorization.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Oauthauthorization struct { } +func (u *Oauthauthorization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthauthorization + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Client *Oauthclient `json:"client,omitempty"` + + Scope *[]string `json:"scope,omitempty"` + + ResourceOwner *Domainentityref `json:"resourceOwner,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + Pending *bool `json:"pending,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Client: u.Client, + + Scope: u.Scope, + + ResourceOwner: u.ResourceOwner, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Pending: u.Pending, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthauthorization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthauthorizationlisting.go b/platformclientv2/oauthauthorizationlisting.go index a016995e4..a2648c8a9 100644 --- a/platformclientv2/oauthauthorizationlisting.go +++ b/platformclientv2/oauthauthorizationlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Oauthauthorizationlisting struct { } +func (u *Oauthauthorizationlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthauthorizationlisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Oauthauthorization `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthauthorizationlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthclient.go b/platformclientv2/oauthclient.go index cfbb1ff2d..cbf921f25 100644 --- a/platformclientv2/oauthclient.go +++ b/platformclientv2/oauthclient.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Oauthclient struct { } +func (u *Oauthclient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthclient + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateToDelete := new(string) + if u.DateToDelete != nil { + + *DateToDelete = timeutil.Strftime(u.DateToDelete, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateToDelete = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + AccessTokenValiditySeconds *int `json:"accessTokenValiditySeconds,omitempty"` + + Description *string `json:"description,omitempty"` + + RegisteredRedirectUri *[]string `json:"registeredRedirectUri,omitempty"` + + Secret *string `json:"secret,omitempty"` + + RoleIds *[]string `json:"roleIds,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + AuthorizedGrantType *string `json:"authorizedGrantType,omitempty"` + + Scope *[]string `json:"scope,omitempty"` + + RoleDivisions *[]Roledivision `json:"roleDivisions,omitempty"` + + State *string `json:"state,omitempty"` + + DateToDelete *string `json:"dateToDelete,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + AccessTokenValiditySeconds: u.AccessTokenValiditySeconds, + + Description: u.Description, + + RegisteredRedirectUri: u.RegisteredRedirectUri, + + Secret: u.Secret, + + RoleIds: u.RoleIds, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + AuthorizedGrantType: u.AuthorizedGrantType, + + Scope: u.Scope, + + RoleDivisions: u.RoleDivisions, + + State: u.State, + + DateToDelete: DateToDelete, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthclient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthcliententitylisting.go b/platformclientv2/oauthcliententitylisting.go index fc3d3e429..b51b1f82a 100644 --- a/platformclientv2/oauthcliententitylisting.go +++ b/platformclientv2/oauthcliententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Oauthcliententitylisting struct { } +func (u *Oauthcliententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthcliententitylisting + + + + return json.Marshal(&struct { + Entities *[]Oauthclientlisting `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthcliententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthclientlisting.go b/platformclientv2/oauthclientlisting.go index 750c65f88..0e12ec3c8 100644 --- a/platformclientv2/oauthclientlisting.go +++ b/platformclientv2/oauthclientlisting.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,106 @@ type Oauthclientlisting struct { } +func (u *Oauthclientlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthclientlisting + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateToDelete := new(string) + if u.DateToDelete != nil { + + *DateToDelete = timeutil.Strftime(u.DateToDelete, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateToDelete = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + AccessTokenValiditySeconds *int `json:"accessTokenValiditySeconds,omitempty"` + + Description *string `json:"description,omitempty"` + + RegisteredRedirectUri *[]string `json:"registeredRedirectUri,omitempty"` + + Secret *string `json:"secret,omitempty"` + + RoleIds *[]string `json:"roleIds,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + Scope *[]string `json:"scope,omitempty"` + + RoleDivisions *[]Roledivision `json:"roleDivisions,omitempty"` + + State *string `json:"state,omitempty"` + + DateToDelete *string `json:"dateToDelete,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + AccessTokenValiditySeconds: u.AccessTokenValiditySeconds, + + Description: u.Description, + + RegisteredRedirectUri: u.RegisteredRedirectUri, + + Secret: u.Secret, + + RoleIds: u.RoleIds, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Scope: u.Scope, + + RoleDivisions: u.RoleDivisions, + + State: u.State, + + DateToDelete: DateToDelete, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthclientlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthclientrequest.go b/platformclientv2/oauthclientrequest.go index 289be90c1..40f08892f 100644 --- a/platformclientv2/oauthclientrequest.go +++ b/platformclientv2/oauthclientrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,66 @@ type Oauthclientrequest struct { } +func (u *Oauthclientrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthclientrequest + + + DateToDelete := new(string) + if u.DateToDelete != nil { + + *DateToDelete = timeutil.Strftime(u.DateToDelete, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateToDelete = nil + } + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + AccessTokenValiditySeconds *int `json:"accessTokenValiditySeconds,omitempty"` + + Description *string `json:"description,omitempty"` + + RegisteredRedirectUri *[]string `json:"registeredRedirectUri,omitempty"` + + RoleIds *[]string `json:"roleIds,omitempty"` + + AuthorizedGrantType *string `json:"authorizedGrantType,omitempty"` + + Scope *[]string `json:"scope,omitempty"` + + RoleDivisions *[]Roledivision `json:"roleDivisions,omitempty"` + + State *string `json:"state,omitempty"` + + DateToDelete *string `json:"dateToDelete,omitempty"` + *Alias + }{ + Name: u.Name, + + AccessTokenValiditySeconds: u.AccessTokenValiditySeconds, + + Description: u.Description, + + RegisteredRedirectUri: u.RegisteredRedirectUri, + + RoleIds: u.RoleIds, + + AuthorizedGrantType: u.AuthorizedGrantType, + + Scope: u.Scope, + + RoleDivisions: u.RoleDivisions, + + State: u.State, + + DateToDelete: DateToDelete, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthclientrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthlasttokenissued.go b/platformclientv2/oauthlasttokenissued.go index 00ffbaa49..e77cdd98c 100644 --- a/platformclientv2/oauthlasttokenissued.go +++ b/platformclientv2/oauthlasttokenissued.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -13,6 +14,30 @@ type Oauthlasttokenissued struct { } +func (u *Oauthlasttokenissued) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthlasttokenissued + + + DateIssued := new(string) + if u.DateIssued != nil { + + *DateIssued = timeutil.Strftime(u.DateIssued, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateIssued = nil + } + + + return json.Marshal(&struct { + DateIssued *string `json:"dateIssued,omitempty"` + *Alias + }{ + DateIssued: DateIssued, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthlasttokenissued) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthprovider.go b/platformclientv2/oauthprovider.go index ecd3c8d5c..8ce395433 100644 --- a/platformclientv2/oauthprovider.go +++ b/platformclientv2/oauthprovider.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Oauthprovider struct { } +func (u *Oauthprovider) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthprovider + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthprovider) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthproviderentitylisting.go b/platformclientv2/oauthproviderentitylisting.go index a2cd0c59e..ce486fff4 100644 --- a/platformclientv2/oauthproviderentitylisting.go +++ b/platformclientv2/oauthproviderentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Oauthproviderentitylisting struct { } +func (u *Oauthproviderentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthproviderentitylisting + + + + return json.Marshal(&struct { + Entities *[]Oauthprovider `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthproviderentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthscope.go b/platformclientv2/oauthscope.go index c0e90e9c5..ec78e9a9f 100644 --- a/platformclientv2/oauthscope.go +++ b/platformclientv2/oauthscope.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Oauthscope struct { } +func (u *Oauthscope) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthscope + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Description *string `json:"description,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Description: u.Description, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthscope) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/oauthscopelisting.go b/platformclientv2/oauthscopelisting.go index b9db5359f..6d9192743 100644 --- a/platformclientv2/oauthscopelisting.go +++ b/platformclientv2/oauthscopelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Oauthscopelisting struct { } +func (u *Oauthscopelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Oauthscopelisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Oauthscope `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Oauthscopelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/objective.go b/platformclientv2/objective.go index 433753b41..6a5d0c082 100644 --- a/platformclientv2/objective.go +++ b/platformclientv2/objective.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,45 @@ type Objective struct { } +func (u *Objective) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Objective + + + DateStart := new(string) + if u.DateStart != nil { + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%d") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + TemplateId *string `json:"templateId,omitempty"` + + Zones *[]Objectivezone `json:"zones,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + *Alias + }{ + Id: u.Id, + + TemplateId: u.TemplateId, + + Zones: u.Zones, + + Enabled: u.Enabled, + + DateStart: DateStart, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Objective) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/objectivetemplate.go b/platformclientv2/objectivetemplate.go index 283a76345..eb4670a3c 100644 --- a/platformclientv2/objectivetemplate.go +++ b/platformclientv2/objectivetemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Objectivetemplate struct { } +func (u *Objectivetemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Objectivetemplate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Zones *[]Objectivezone `json:"zones,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Zones: u.Zones, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Objectivetemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/objectivezone.go b/platformclientv2/objectivezone.go index 2ba222825..4fae4a15f 100644 --- a/platformclientv2/objectivezone.go +++ b/platformclientv2/objectivezone.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Objectivezone struct { } +func (u *Objectivezone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Objectivezone + + + + return json.Marshal(&struct { + Label *string `json:"label,omitempty"` + + DirectionType *string `json:"directionType,omitempty"` + + ZoneType *string `json:"zoneType,omitempty"` + + UpperLimitPoints *int `json:"upperLimitPoints,omitempty"` + + LowerLimitPoints *int `json:"lowerLimitPoints,omitempty"` + + UpperLimitValue *int `json:"upperLimitValue,omitempty"` + + LowerLimitValue *int `json:"lowerLimitValue,omitempty"` + *Alias + }{ + Label: u.Label, + + DirectionType: u.DirectionType, + + ZoneType: u.ZoneType, + + UpperLimitPoints: u.UpperLimitPoints, + + LowerLimitPoints: u.LowerLimitPoints, + + UpperLimitValue: u.UpperLimitValue, + + LowerLimitValue: u.LowerLimitValue, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Objectivezone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/observationmetricdata.go b/platformclientv2/observationmetricdata.go index 7e9480990..242887183 100644 --- a/platformclientv2/observationmetricdata.go +++ b/platformclientv2/observationmetricdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Observationmetricdata struct { } +func (u *Observationmetricdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Observationmetricdata + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *Statisticalsummary `json:"stats,omitempty"` + + Truncated *bool `json:"truncated,omitempty"` + + Observations *[]Observationvalue `json:"observations,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + + Truncated: u.Truncated, + + Observations: u.Observations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Observationmetricdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/observationvalue.go b/platformclientv2/observationvalue.go index 045943ad2..ddccd7142 100644 --- a/platformclientv2/observationvalue.go +++ b/platformclientv2/observationvalue.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,102 @@ type Observationvalue struct { } +func (u *Observationvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Observationvalue + + + ObservationDate := new(string) + if u.ObservationDate != nil { + + *ObservationDate = timeutil.Strftime(u.ObservationDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ObservationDate = nil + } + + + return json.Marshal(&struct { + ObservationDate *string `json:"observationDate,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + SessionId *string `json:"sessionId,omitempty"` + + RequestedRoutingSkillIds *[]string `json:"requestedRoutingSkillIds,omitempty"` + + RequestedLanguageId *string `json:"requestedLanguageId,omitempty"` + + RoutingPriority *int `json:"routingPriority,omitempty"` + + ParticipantName *string `json:"participantName,omitempty"` + + UserId *string `json:"userId,omitempty"` + + Direction *string `json:"direction,omitempty"` + + ConvertedFrom *string `json:"convertedFrom,omitempty"` + + ConvertedTo *string `json:"convertedTo,omitempty"` + + AddressFrom *string `json:"addressFrom,omitempty"` + + AddressTo *string `json:"addressTo,omitempty"` + + Ani *string `json:"ani,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + RequestedRoutings *[]string `json:"requestedRoutings,omitempty"` + + UsedRouting *string `json:"usedRouting,omitempty"` + + ScoredAgents *[]Analyticsscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + ObservationDate: ObservationDate, + + ConversationId: u.ConversationId, + + SessionId: u.SessionId, + + RequestedRoutingSkillIds: u.RequestedRoutingSkillIds, + + RequestedLanguageId: u.RequestedLanguageId, + + RoutingPriority: u.RoutingPriority, + + ParticipantName: u.ParticipantName, + + UserId: u.UserId, + + Direction: u.Direction, + + ConvertedFrom: u.ConvertedFrom, + + ConvertedTo: u.ConvertedTo, + + AddressFrom: u.AddressFrom, + + AddressTo: u.AddressTo, + + Ani: u.Ani, + + Dnis: u.Dnis, + + TeamId: u.TeamId, + + RequestedRoutings: u.RequestedRoutings, + + UsedRouting: u.UsedRouting, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Observationvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/okta.go b/platformclientv2/okta.go index 74130bf82..08e78ff4c 100644 --- a/platformclientv2/okta.go +++ b/platformclientv2/okta.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Okta struct { } +func (u *Okta) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Okta + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Okta) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/onelogin.go b/platformclientv2/onelogin.go index 573fea578..3f928a58e 100644 --- a/platformclientv2/onelogin.go +++ b/platformclientv2/onelogin.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Onelogin struct { } +func (u *Onelogin) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Onelogin + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Onelogin) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openintegration.go b/platformclientv2/openintegration.go index a41d0c8e4..db7af23b8 100644 --- a/platformclientv2/openintegration.go +++ b/platformclientv2/openintegration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Openintegration struct { } +func (u *Openintegration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openintegration + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + OutboundNotificationWebhookUrl *string `json:"outboundNotificationWebhookUrl,omitempty"` + + OutboundNotificationWebhookSignatureSecretToken *string `json:"outboundNotificationWebhookSignatureSecretToken,omitempty"` + + WebhookHeaders *map[string]string `json:"webhookHeaders,omitempty"` + + Status *string `json:"status,omitempty"` + + Recipient *Domainentityref `json:"recipient,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + CreateStatus *string `json:"createStatus,omitempty"` + + CreateError *Errorbody `json:"createError,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + OutboundNotificationWebhookUrl: u.OutboundNotificationWebhookUrl, + + OutboundNotificationWebhookSignatureSecretToken: u.OutboundNotificationWebhookSignatureSecretToken, + + WebhookHeaders: u.WebhookHeaders, + + Status: u.Status, + + Recipient: u.Recipient, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + CreateStatus: u.CreateStatus, + + CreateError: u.CreateError, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openintegration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openintegrationentitylisting.go b/platformclientv2/openintegrationentitylisting.go index 2dabdbc6e..e3ee3a9f9 100644 --- a/platformclientv2/openintegrationentitylisting.go +++ b/platformclientv2/openintegrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Openintegrationentitylisting struct { } +func (u *Openintegrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openintegrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Openintegration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openintegrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openintegrationrequest.go b/platformclientv2/openintegrationrequest.go index 62c657417..dbb5ad9f5 100644 --- a/platformclientv2/openintegrationrequest.go +++ b/platformclientv2/openintegrationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Openintegrationrequest struct { } +func (u *Openintegrationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openintegrationrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + OutboundNotificationWebhookUrl *string `json:"outboundNotificationWebhookUrl,omitempty"` + + OutboundNotificationWebhookSignatureSecretToken *string `json:"outboundNotificationWebhookSignatureSecretToken,omitempty"` + + WebhookHeaders *map[string]string `json:"webhookHeaders,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + OutboundNotificationWebhookUrl: u.OutboundNotificationWebhookUrl, + + OutboundNotificationWebhookSignatureSecretToken: u.OutboundNotificationWebhookSignatureSecretToken, + + WebhookHeaders: u.WebhookHeaders, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openintegrationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openintegrationupdaterequest.go b/platformclientv2/openintegrationupdaterequest.go index 0d9c26486..365dffeea 100644 --- a/platformclientv2/openintegrationupdaterequest.go +++ b/platformclientv2/openintegrationupdaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Openintegrationupdaterequest struct { } +func (u *Openintegrationupdaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openintegrationupdaterequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + OutboundNotificationWebhookUrl *string `json:"outboundNotificationWebhookUrl,omitempty"` + + OutboundNotificationWebhookSignatureSecretToken *string `json:"outboundNotificationWebhookSignatureSecretToken,omitempty"` + + WebhookHeaders *map[string]string `json:"webhookHeaders,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + OutboundNotificationWebhookUrl: u.OutboundNotificationWebhookUrl, + + OutboundNotificationWebhookSignatureSecretToken: u.OutboundNotificationWebhookSignatureSecretToken, + + WebhookHeaders: u.WebhookHeaders, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openintegrationupdaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openmessagecontent.go b/platformclientv2/openmessagecontent.go index 3515e9da8..fefa4f34e 100644 --- a/platformclientv2/openmessagecontent.go +++ b/platformclientv2/openmessagecontent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Openmessagecontent struct { } +func (u *Openmessagecontent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openmessagecontent + + + + return json.Marshal(&struct { + ContentType *string `json:"contentType,omitempty"` + + Attachment *Contentattachment `json:"attachment,omitempty"` + *Alias + }{ + ContentType: u.ContentType, + + Attachment: u.Attachment, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openmessagecontent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openmessagingchannel.go b/platformclientv2/openmessagingchannel.go index 11f50afdc..ab5e72a81 100644 --- a/platformclientv2/openmessagingchannel.go +++ b/platformclientv2/openmessagingchannel.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Openmessagingchannel struct { } +func (u *Openmessagingchannel) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openmessagingchannel + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Platform *string `json:"platform,omitempty"` + + VarType *string `json:"type,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + To *Openmessagingtorecipient `json:"to,omitempty"` + + From *Openmessagingfromrecipient `json:"from,omitempty"` + + Time *string `json:"time,omitempty"` + *Alias + }{ + Id: u.Id, + + Platform: u.Platform, + + VarType: u.VarType, + + MessageId: u.MessageId, + + To: u.To, + + From: u.From, + + Time: Time, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openmessagingchannel) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openmessagingfromrecipient.go b/platformclientv2/openmessagingfromrecipient.go index 08665aec4..ed22b6eaa 100644 --- a/platformclientv2/openmessagingfromrecipient.go +++ b/platformclientv2/openmessagingfromrecipient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Openmessagingfromrecipient struct { } +func (u *Openmessagingfromrecipient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openmessagingfromrecipient + + + + return json.Marshal(&struct { + Nickname *string `json:"nickname,omitempty"` + + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + *Alias + }{ + Nickname: u.Nickname, + + Id: u.Id, + + IdType: u.IdType, + + FirstName: u.FirstName, + + LastName: u.LastName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openmessagingfromrecipient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/openmessagingtorecipient.go b/platformclientv2/openmessagingtorecipient.go index 59b6eafc0..77e2cf4fe 100644 --- a/platformclientv2/openmessagingtorecipient.go +++ b/platformclientv2/openmessagingtorecipient.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Openmessagingtorecipient struct { } +func (u *Openmessagingtorecipient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Openmessagingtorecipient + + + + return json.Marshal(&struct { + Nickname *string `json:"nickname,omitempty"` + + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + *Alias + }{ + Nickname: u.Nickname, + + Id: u.Id, + + IdType: u.IdType, + + FirstName: u.FirstName, + + LastName: u.LastName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Openmessagingtorecipient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/opennormalizedmessage.go b/platformclientv2/opennormalizedmessage.go index 1c134925a..8e4cdb8f4 100644 --- a/platformclientv2/opennormalizedmessage.go +++ b/platformclientv2/opennormalizedmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Opennormalizedmessage struct { } +func (u *Opennormalizedmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Opennormalizedmessage + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Channel *Openmessagingchannel `json:"channel,omitempty"` + + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Content *[]Openmessagecontent `json:"content,omitempty"` + + Direction *string `json:"direction,omitempty"` + *Alias + }{ + Id: u.Id, + + Channel: u.Channel, + + VarType: u.VarType, + + Text: u.Text, + + Content: u.Content, + + Direction: u.Direction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Opennormalizedmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/operation.go b/platformclientv2/operation.go index 8a6543c75..8623ef570 100644 --- a/platformclientv2/operation.go +++ b/platformclientv2/operation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Operation struct { } +func (u *Operation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Operation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Complete *bool `json:"complete,omitempty"` + + User *User `json:"user,omitempty"` + + Client *Domainentityref `json:"client,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + + ErrorDetails *[]Detail `json:"errorDetails,omitempty"` + + ErrorMessageParams *map[string]string `json:"errorMessageParams,omitempty"` + + ActionName *string `json:"actionName,omitempty"` + + ActionStatus *string `json:"actionStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + Complete: u.Complete, + + User: u.User, + + Client: u.Client, + + ErrorMessage: u.ErrorMessage, + + ErrorCode: u.ErrorCode, + + ErrorDetails: u.ErrorDetails, + + ErrorMessageParams: u.ErrorMessageParams, + + ActionName: u.ActionName, + + ActionStatus: u.ActionStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Operation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/organization.go b/platformclientv2/organization.go index f1f10a9bd..ac337f32e 100644 --- a/platformclientv2/organization.go +++ b/platformclientv2/organization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -68,6 +69,78 @@ type Organization struct { } +func (u *Organization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Organization + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DefaultLanguage *string `json:"defaultLanguage,omitempty"` + + DefaultCountryCode *string `json:"defaultCountryCode,omitempty"` + + ThirdPartyOrgName *string `json:"thirdPartyOrgName,omitempty"` + + ThirdPartyURI *string `json:"thirdPartyURI,omitempty"` + + Domain *string `json:"domain,omitempty"` + + Version *int `json:"version,omitempty"` + + State *string `json:"state,omitempty"` + + DefaultSiteId *string `json:"defaultSiteId,omitempty"` + + SupportURI *string `json:"supportURI,omitempty"` + + VoicemailEnabled *bool `json:"voicemailEnabled,omitempty"` + + ProductPlatform *string `json:"productPlatform,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + Features *map[string]bool `json:"features,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DefaultLanguage: u.DefaultLanguage, + + DefaultCountryCode: u.DefaultCountryCode, + + ThirdPartyOrgName: u.ThirdPartyOrgName, + + ThirdPartyURI: u.ThirdPartyURI, + + Domain: u.Domain, + + Version: u.Version, + + State: u.State, + + DefaultSiteId: u.DefaultSiteId, + + SupportURI: u.SupportURI, + + VoicemailEnabled: u.VoicemailEnabled, + + ProductPlatform: u.ProductPlatform, + + SelfUri: u.SelfUri, + + Features: u.Features, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Organization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/organizationfeatures.go b/platformclientv2/organizationfeatures.go index 74997a99b..21b95e0ce 100644 --- a/platformclientv2/organizationfeatures.go +++ b/platformclientv2/organizationfeatures.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -60,6 +61,70 @@ type Organizationfeatures struct { } +func (u *Organizationfeatures) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Organizationfeatures + + + + return json.Marshal(&struct { + RealtimeCIC *bool `json:"realtimeCIC,omitempty"` + + Purecloud *bool `json:"purecloud,omitempty"` + + Hipaa *bool `json:"hipaa,omitempty"` + + UcEnabled *bool `json:"ucEnabled,omitempty"` + + Pci *bool `json:"pci,omitempty"` + + PurecloudVoice *bool `json:"purecloudVoice,omitempty"` + + XmppFederation *bool `json:"xmppFederation,omitempty"` + + Chat *bool `json:"chat,omitempty"` + + InformalPhotos *bool `json:"informalPhotos,omitempty"` + + Directory *bool `json:"directory,omitempty"` + + ContactCenter *bool `json:"contactCenter,omitempty"` + + UnifiedCommunications *bool `json:"unifiedCommunications,omitempty"` + + Custserv *bool `json:"custserv,omitempty"` + *Alias + }{ + RealtimeCIC: u.RealtimeCIC, + + Purecloud: u.Purecloud, + + Hipaa: u.Hipaa, + + UcEnabled: u.UcEnabled, + + Pci: u.Pci, + + PurecloudVoice: u.PurecloudVoice, + + XmppFederation: u.XmppFederation, + + Chat: u.Chat, + + InformalPhotos: u.InformalPhotos, + + Directory: u.Directory, + + ContactCenter: u.ContactCenter, + + UnifiedCommunications: u.UnifiedCommunications, + + Custserv: u.Custserv, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Organizationfeatures) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/organizationpresence.go b/platformclientv2/organizationpresence.go index a956afb48..de1c57ae7 100644 --- a/platformclientv2/organizationpresence.go +++ b/platformclientv2/organizationpresence.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Organizationpresence struct { } +func (u *Organizationpresence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Organizationpresence + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + LanguageLabels *map[string]string `json:"languageLabels,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + Deactivated *bool `json:"deactivated,omitempty"` + + Primary *bool `json:"primary,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedBy *User `json:"modifiedBy,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + LanguageLabels: u.LanguageLabels, + + SystemPresence: u.SystemPresence, + + Deactivated: u.Deactivated, + + Primary: u.Primary, + + CreatedBy: u.CreatedBy, + + CreatedDate: CreatedDate, + + ModifiedBy: u.ModifiedBy, + + ModifiedDate: ModifiedDate, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Organizationpresence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/organizationpresenceentitylisting.go b/platformclientv2/organizationpresenceentitylisting.go index 8788d478f..ef92304e5 100644 --- a/platformclientv2/organizationpresenceentitylisting.go +++ b/platformclientv2/organizationpresenceentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Organizationpresenceentitylisting struct { } +func (u *Organizationpresenceentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Organizationpresenceentitylisting + + + + return json.Marshal(&struct { + Entities *[]Organizationpresence `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Organizationpresenceentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/organizationproductentitylisting.go b/platformclientv2/organizationproductentitylisting.go index 4fce3e61b..9c3c66d8d 100644 --- a/platformclientv2/organizationproductentitylisting.go +++ b/platformclientv2/organizationproductentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Organizationproductentitylisting struct { } +func (u *Organizationproductentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Organizationproductentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainorganizationproduct `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Organizationproductentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/organizationroleentitylisting.go b/platformclientv2/organizationroleentitylisting.go index 11ca5eff6..6d485b928 100644 --- a/platformclientv2/organizationroleentitylisting.go +++ b/platformclientv2/organizationroleentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Organizationroleentitylisting struct { } +func (u *Organizationroleentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Organizationroleentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainorganizationrole `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Organizationroleentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/orgoauthclient.go b/platformclientv2/orgoauthclient.go index e33d9db6a..7bf70aeec 100644 --- a/platformclientv2/orgoauthclient.go +++ b/platformclientv2/orgoauthclient.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,90 @@ type Orgoauthclient struct { } +func (u *Orgoauthclient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Orgoauthclient + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateToDelete := new(string) + if u.DateToDelete != nil { + + *DateToDelete = timeutil.Strftime(u.DateToDelete, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateToDelete = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + AuthorizedGrantType *string `json:"authorizedGrantType,omitempty"` + + Scope *[]string `json:"scope,omitempty"` + + RoleDivisions *[]Roledivision `json:"roleDivisions,omitempty"` + + State *string `json:"state,omitempty"` + + DateToDelete *string `json:"dateToDelete,omitempty"` + + Organization *Namedentity `json:"organization,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + AuthorizedGrantType: u.AuthorizedGrantType, + + Scope: u.Scope, + + RoleDivisions: u.RoleDivisions, + + State: u.State, + + DateToDelete: DateToDelete, + + Organization: u.Organization, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Orgoauthclient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/orguser.go b/platformclientv2/orguser.go index 615f92913..750fbb7b1 100644 --- a/platformclientv2/orguser.go +++ b/platformclientv2/orguser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -144,6 +145,154 @@ type Orguser struct { } +func (u *Orguser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Orguser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Chat *Chat `json:"chat,omitempty"` + + Department *string `json:"department,omitempty"` + + Email *string `json:"email,omitempty"` + + PrimaryContactInfo *[]Contact `json:"primaryContactInfo,omitempty"` + + Addresses *[]Contact `json:"addresses,omitempty"` + + State *string `json:"state,omitempty"` + + Title *string `json:"title,omitempty"` + + Username *string `json:"username,omitempty"` + + Manager **User `json:"manager,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Version *int `json:"version,omitempty"` + + Certifications *[]string `json:"certifications,omitempty"` + + Biography *Biography `json:"biography,omitempty"` + + EmployerInfo *Employerinfo `json:"employerInfo,omitempty"` + + RoutingStatus *Routingstatus `json:"routingStatus,omitempty"` + + Presence *Userpresence `json:"presence,omitempty"` + + ConversationSummary *Userconversationsummary `json:"conversationSummary,omitempty"` + + OutOfOffice *Outofoffice `json:"outOfOffice,omitempty"` + + Geolocation *Geolocation `json:"geolocation,omitempty"` + + Station *Userstations `json:"station,omitempty"` + + Authorization *Userauthorization `json:"authorization,omitempty"` + + ProfileSkills *[]string `json:"profileSkills,omitempty"` + + Locations *[]Location `json:"locations,omitempty"` + + Groups *[]Group `json:"groups,omitempty"` + + Team *Team `json:"team,omitempty"` + + Skills *[]Userroutingskill `json:"skills,omitempty"` + + Languages *[]Userroutinglanguage `json:"languages,omitempty"` + + AcdAutoAnswer *bool `json:"acdAutoAnswer,omitempty"` + + LanguagePreference *string `json:"languagePreference,omitempty"` + + LastTokenIssued *Oauthlasttokenissued `json:"lastTokenIssued,omitempty"` + + Organization *Organization `json:"organization,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Chat: u.Chat, + + Department: u.Department, + + Email: u.Email, + + PrimaryContactInfo: u.PrimaryContactInfo, + + Addresses: u.Addresses, + + State: u.State, + + Title: u.Title, + + Username: u.Username, + + Manager: u.Manager, + + Images: u.Images, + + Version: u.Version, + + Certifications: u.Certifications, + + Biography: u.Biography, + + EmployerInfo: u.EmployerInfo, + + RoutingStatus: u.RoutingStatus, + + Presence: u.Presence, + + ConversationSummary: u.ConversationSummary, + + OutOfOffice: u.OutOfOffice, + + Geolocation: u.Geolocation, + + Station: u.Station, + + Authorization: u.Authorization, + + ProfileSkills: u.ProfileSkills, + + Locations: u.Locations, + + Groups: u.Groups, + + Team: u.Team, + + Skills: u.Skills, + + Languages: u.Languages, + + AcdAutoAnswer: u.AcdAutoAnswer, + + LanguagePreference: u.LanguagePreference, + + LastTokenIssued: u.LastTokenIssued, + + Organization: u.Organization, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Orguser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/orgwhitelistsettings.go b/platformclientv2/orgwhitelistsettings.go index 87678a41b..c06f7a870 100644 --- a/platformclientv2/orgwhitelistsettings.go +++ b/platformclientv2/orgwhitelistsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Orgwhitelistsettings struct { } +func (u *Orgwhitelistsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Orgwhitelistsettings + + + + return json.Marshal(&struct { + EnableWhitelist *bool `json:"enableWhitelist,omitempty"` + + DomainWhitelist *[]string `json:"domainWhitelist,omitempty"` + *Alias + }{ + EnableWhitelist: u.EnableWhitelist, + + DomainWhitelist: u.DomainWhitelist, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Orgwhitelistsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/orphanrecording.go b/platformclientv2/orphanrecording.go index 1e5e1d114..a8fd697f8 100644 --- a/platformclientv2/orphanrecording.go +++ b/platformclientv2/orphanrecording.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Orphanrecording struct { } +func (u *Orphanrecording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Orphanrecording + + + CreatedTime := new(string) + if u.CreatedTime != nil { + + *CreatedTime = timeutil.Strftime(u.CreatedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedTime = nil + } + + RecoveredTime := new(string) + if u.RecoveredTime != nil { + + *RecoveredTime = timeutil.Strftime(u.RecoveredTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RecoveredTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CreatedTime *string `json:"createdTime,omitempty"` + + RecoveredTime *string `json:"recoveredTime,omitempty"` + + ProviderType *string `json:"providerType,omitempty"` + + MediaSizeBytes *int `json:"mediaSizeBytes,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + FileState *string `json:"fileState,omitempty"` + + ProviderEndpoint *Endpoint `json:"providerEndpoint,omitempty"` + + Recording *Recording `json:"recording,omitempty"` + + OrphanStatus *string `json:"orphanStatus,omitempty"` + + SourceOrphaningId *string `json:"sourceOrphaningId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CreatedTime: CreatedTime, + + RecoveredTime: RecoveredTime, + + ProviderType: u.ProviderType, + + MediaSizeBytes: u.MediaSizeBytes, + + MediaType: u.MediaType, + + FileState: u.FileState, + + ProviderEndpoint: u.ProviderEndpoint, + + Recording: u.Recording, + + OrphanStatus: u.OrphanStatus, + + SourceOrphaningId: u.SourceOrphaningId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Orphanrecording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/orphanrecordinglisting.go b/platformclientv2/orphanrecordinglisting.go index 2e724c4a5..602dd0160 100644 --- a/platformclientv2/orphanrecordinglisting.go +++ b/platformclientv2/orphanrecordinglisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Orphanrecordinglisting struct { } +func (u *Orphanrecordinglisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Orphanrecordinglisting + + + + return json.Marshal(&struct { + Entities *[]Orphanrecording `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Orphanrecordinglisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/orphanupdaterequest.go b/platformclientv2/orphanupdaterequest.go index 3b0a6c096..8f9d56bd0 100644 --- a/platformclientv2/orphanupdaterequest.go +++ b/platformclientv2/orphanupdaterequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Orphanupdaterequest struct { } +func (u *Orphanupdaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Orphanupdaterequest + + + ArchiveDate := new(string) + if u.ArchiveDate != nil { + + *ArchiveDate = timeutil.Strftime(u.ArchiveDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ArchiveDate = nil + } + + DeleteDate := new(string) + if u.DeleteDate != nil { + + *DeleteDate = timeutil.Strftime(u.DeleteDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DeleteDate = nil + } + + + return json.Marshal(&struct { + ArchiveDate *string `json:"archiveDate,omitempty"` + + DeleteDate *string `json:"deleteDate,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + *Alias + }{ + ArchiveDate: ArchiveDate, + + DeleteDate: DeleteDate, + + ConversationId: u.ConversationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Orphanupdaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangecontactsort.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangecontactsort.go index f7fd0d264..b63035021 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangecontactsort.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangecontactsort.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Outboundmessagingmessagingcampaignconfigchangecontactsort struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangecontactsort) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangecontactsort + + + + return json.Marshal(&struct { + FieldName *string `json:"fieldName,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Numeric *bool `json:"numeric,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + FieldName: u.FieldName, + + Direction: u.Direction, + + Numeric: u.Numeric, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangecontactsort) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeemailconfig.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeemailconfig.go index b051613b8..5e60547df 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeemailconfig.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeemailconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Outboundmessagingmessagingcampaignconfigchangeemailconfig struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangeemailconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangeemailconfig + + + + return json.Marshal(&struct { + EmailColumns *[]string `json:"emailColumns,omitempty"` + + ContentTemplate *Outboundmessagingmessagingcampaignconfigchangeresponseref `json:"contentTemplate,omitempty"` + + FromAddress *Outboundmessagingmessagingcampaignconfigchangefromemailaddress `json:"fromAddress,omitempty"` + + ReplyToAddress *Outboundmessagingmessagingcampaignconfigchangereplytoemailaddress `json:"replyToAddress,omitempty"` + *Alias + }{ + EmailColumns: u.EmailColumns, + + ContentTemplate: u.ContentTemplate, + + FromAddress: u.FromAddress, + + ReplyToAddress: u.ReplyToAddress, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangeemailconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeerrordetail.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeerrordetail.go index 82e91e10b..af98dc53e 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeerrordetail.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeerrordetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Outboundmessagingmessagingcampaignconfigchangeerrordetail struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangeerrordetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangeerrordetail + + + + return json.Marshal(&struct { + VarError *string `json:"error,omitempty"` + + Details *string `json:"details,omitempty"` + *Alias + }{ + VarError: u.VarError, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangeerrordetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangefromemailaddress.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangefromemailaddress.go index a421795f0..ad7408b71 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangefromemailaddress.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangefromemailaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Outboundmessagingmessagingcampaignconfigchangefromemailaddress struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangefromemailaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangefromemailaddress + + + + return json.Marshal(&struct { + FriendlyName *string `json:"friendlyName,omitempty"` + + LocalPart *string `json:"localPart,omitempty"` + + Domain *Outboundmessagingmessagingcampaignconfigchangeurireference `json:"domain,omitempty"` + *Alias + }{ + FriendlyName: u.FriendlyName, + + LocalPart: u.LocalPart, + + Domain: u.Domain, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangefromemailaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangemessagingcampaign.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangemessagingcampaign.go index 5541bf4bf..f82f330e3 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangemessagingcampaign.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangemessagingcampaign.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,102 @@ type Outboundmessagingmessagingcampaignconfigchangemessagingcampaign struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangemessagingcampaign) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangemessagingcampaign + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Division *Outboundmessagingmessagingcampaignconfigchangeurireference `json:"division,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + CampaignStatus *string `json:"campaignStatus,omitempty"` + + CallableTimeSet *Outboundmessagingmessagingcampaignconfigchangeurireference `json:"callableTimeSet,omitempty"` + + ContactList *Outboundmessagingmessagingcampaignconfigchangeurireference `json:"contactList,omitempty"` + + DncLists *[]Outboundmessagingmessagingcampaignconfigchangeurireference `json:"dncLists,omitempty"` + + ContactListFilters *[]Outboundmessagingmessagingcampaignconfigchangeurireference `json:"contactListFilters,omitempty"` + + AlwaysRunning *bool `json:"alwaysRunning,omitempty"` + + ContactSorts *[]Outboundmessagingmessagingcampaignconfigchangecontactsort `json:"contactSorts,omitempty"` + + MessagesPerMinute *int `json:"messagesPerMinute,omitempty"` + + SmsConfig *Outboundmessagingmessagingcampaignconfigchangesmsconfig `json:"smsConfig,omitempty"` + + EmailConfig *Outboundmessagingmessagingcampaignconfigchangeemailconfig `json:"emailConfig,omitempty"` + + Errors *[]Outboundmessagingmessagingcampaignconfigchangeerrordetail `json:"errors,omitempty"` + *Alias + }{ + Id: u.Id, + + Division: u.Division, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + CampaignStatus: u.CampaignStatus, + + CallableTimeSet: u.CallableTimeSet, + + ContactList: u.ContactList, + + DncLists: u.DncLists, + + ContactListFilters: u.ContactListFilters, + + AlwaysRunning: u.AlwaysRunning, + + ContactSorts: u.ContactSorts, + + MessagesPerMinute: u.MessagesPerMinute, + + SmsConfig: u.SmsConfig, + + EmailConfig: u.EmailConfig, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangemessagingcampaign) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangereplytoemailaddress.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangereplytoemailaddress.go index 81106a232..6c79166ca 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangereplytoemailaddress.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangereplytoemailaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Outboundmessagingmessagingcampaignconfigchangereplytoemailaddress struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangereplytoemailaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangereplytoemailaddress + + + + return json.Marshal(&struct { + Domain *Outboundmessagingmessagingcampaignconfigchangeurireference `json:"domain,omitempty"` + + RouteId *Outboundmessagingmessagingcampaignconfigchangeurireference `json:"routeId,omitempty"` + *Alias + }{ + Domain: u.Domain, + + RouteId: u.RouteId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangereplytoemailaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeresponseref.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeresponseref.go index 3e8027117..863a305c6 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeresponseref.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeresponseref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Outboundmessagingmessagingcampaignconfigchangeresponseref struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangeresponseref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangeresponseref + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangeresponseref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsconfig.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsconfig.go index 27b6234b1..7b0ad712a 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsconfig.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Outboundmessagingmessagingcampaignconfigchangesmsconfig struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangesmsconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangesmsconfig + + + + return json.Marshal(&struct { + MessageColumn *string `json:"messageColumn,omitempty"` + + PhoneColumn *string `json:"phoneColumn,omitempty"` + + SenderSmsPhoneNumber *Outboundmessagingmessagingcampaignconfigchangesmsphonenumberref `json:"senderSmsPhoneNumber,omitempty"` + + ContentTemplate *Outboundmessagingmessagingcampaignconfigchangeresponseref `json:"contentTemplate,omitempty"` + *Alias + }{ + MessageColumn: u.MessageColumn, + + PhoneColumn: u.PhoneColumn, + + SenderSmsPhoneNumber: u.SenderSmsPhoneNumber, + + ContentTemplate: u.ContentTemplate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangesmsconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsphonenumberref.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsphonenumberref.go index 273e3ec3b..5760d5723 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsphonenumberref.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangesmsphonenumberref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Outboundmessagingmessagingcampaignconfigchangesmsphonenumberref struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangesmsphonenumberref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangesmsphonenumberref + + + + return json.Marshal(&struct { + PhoneNumber *string `json:"phoneNumber,omitempty"` + *Alias + }{ + PhoneNumber: u.PhoneNumber, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangesmsphonenumberref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeurireference.go b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeurireference.go index 13c7b36be..491849cae 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignconfigchangeurireference.go +++ b/platformclientv2/outboundmessagingmessagingcampaignconfigchangeurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Outboundmessagingmessagingcampaignconfigchangeurireference struct { } +func (u *Outboundmessagingmessagingcampaignconfigchangeurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignconfigchangeurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignconfigchangeurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignprogresseventcampaignprogress.go b/platformclientv2/outboundmessagingmessagingcampaignprogresseventcampaignprogress.go index 526a42b96..90be8c9aa 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignprogresseventcampaignprogress.go +++ b/platformclientv2/outboundmessagingmessagingcampaignprogresseventcampaignprogress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Outboundmessagingmessagingcampaignprogresseventcampaignprogress struct { } +func (u *Outboundmessagingmessagingcampaignprogresseventcampaignprogress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignprogresseventcampaignprogress + + + + return json.Marshal(&struct { + Campaign *Outboundmessagingmessagingcampaignprogresseventurireference `json:"campaign,omitempty"` + + NumberOfContactsCalled *float32 `json:"numberOfContactsCalled,omitempty"` + + NumberOfContactsMessaged *float32 `json:"numberOfContactsMessaged,omitempty"` + + TotalNumberOfContacts *float32 `json:"totalNumberOfContacts,omitempty"` + + Percentage *int `json:"percentage,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Campaign: u.Campaign, + + NumberOfContactsCalled: u.NumberOfContactsCalled, + + NumberOfContactsMessaged: u.NumberOfContactsMessaged, + + TotalNumberOfContacts: u.TotalNumberOfContacts, + + Percentage: u.Percentage, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignprogresseventcampaignprogress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundmessagingmessagingcampaignprogresseventurireference.go b/platformclientv2/outboundmessagingmessagingcampaignprogresseventurireference.go index 508f6c965..c593c75d0 100644 --- a/platformclientv2/outboundmessagingmessagingcampaignprogresseventurireference.go +++ b/platformclientv2/outboundmessagingmessagingcampaignprogresseventurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Outboundmessagingmessagingcampaignprogresseventurireference struct { } +func (u *Outboundmessagingmessagingcampaignprogresseventurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundmessagingmessagingcampaignprogresseventurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundmessagingmessagingcampaignprogresseventurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundroute.go b/platformclientv2/outboundroute.go index dd875deda..157d56d21 100644 --- a/platformclientv2/outboundroute.go +++ b/platformclientv2/outboundroute.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Outboundroute struct { } +func (u *Outboundroute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundroute + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + ClassificationTypes *[]string `json:"classificationTypes,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Distribution *string `json:"distribution,omitempty"` + + ExternalTrunkBases *[]Domainentityref `json:"externalTrunkBases,omitempty"` + + Site *Site `json:"site,omitempty"` + + Managed *bool `json:"managed,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + ClassificationTypes: u.ClassificationTypes, + + Enabled: u.Enabled, + + Distribution: u.Distribution, + + ExternalTrunkBases: u.ExternalTrunkBases, + + Site: u.Site, + + Managed: u.Managed, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundroute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundroutebase.go b/platformclientv2/outboundroutebase.go index 2d224f8ec..9d492e998 100644 --- a/platformclientv2/outboundroutebase.go +++ b/platformclientv2/outboundroutebase.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Outboundroutebase struct { } +func (u *Outboundroutebase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundroutebase + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + ClassificationTypes *[]string `json:"classificationTypes,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Distribution *string `json:"distribution,omitempty"` + + ExternalTrunkBases *[]Domainentityref `json:"externalTrunkBases,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + ClassificationTypes: u.ClassificationTypes, + + Enabled: u.Enabled, + + Distribution: u.Distribution, + + ExternalTrunkBases: u.ExternalTrunkBases, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundroutebase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundroutebaseentitylisting.go b/platformclientv2/outboundroutebaseentitylisting.go index 9e3c6275c..da3f44868 100644 --- a/platformclientv2/outboundroutebaseentitylisting.go +++ b/platformclientv2/outboundroutebaseentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Outboundroutebaseentitylisting struct { } +func (u *Outboundroutebaseentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundroutebaseentitylisting + + + + return json.Marshal(&struct { + Entities *[]Outboundroutebase `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundroutebaseentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundrouteentitylisting.go b/platformclientv2/outboundrouteentitylisting.go index f316c5abf..2279a130b 100644 --- a/platformclientv2/outboundrouteentitylisting.go +++ b/platformclientv2/outboundrouteentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Outboundrouteentitylisting struct { } +func (u *Outboundrouteentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundrouteentitylisting + + + + return json.Marshal(&struct { + Entities *[]Outboundroute `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundrouteentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outboundsettings.go b/platformclientv2/outboundsettings.go index cd53a654a..1ebd5d211 100644 --- a/platformclientv2/outboundsettings.go +++ b/platformclientv2/outboundsettings.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Outboundsettings struct { } +func (u *Outboundsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outboundsettings + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + MaxCallsPerAgent *int `json:"maxCallsPerAgent,omitempty"` + + MaxConfigurableCallsPerAgent *int `json:"maxConfigurableCallsPerAgent,omitempty"` + + MaxLineUtilization *float64 `json:"maxLineUtilization,omitempty"` + + AbandonSeconds *float64 `json:"abandonSeconds,omitempty"` + + ComplianceAbandonRateDenominator *string `json:"complianceAbandonRateDenominator,omitempty"` + + AutomaticTimeZoneMapping *Automatictimezonemappingsettings `json:"automaticTimeZoneMapping,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + MaxCallsPerAgent: u.MaxCallsPerAgent, + + MaxConfigurableCallsPerAgent: u.MaxConfigurableCallsPerAgent, + + MaxLineUtilization: u.MaxLineUtilization, + + AbandonSeconds: u.AbandonSeconds, + + ComplianceAbandonRateDenominator: u.ComplianceAbandonRateDenominator, + + AutomaticTimeZoneMapping: u.AutomaticTimeZoneMapping, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outboundsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outcome.go b/platformclientv2/outcome.go index 66f3e02e3..d39b7b76a 100644 --- a/platformclientv2/outcome.go +++ b/platformclientv2/outcome.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Outcome struct { } +func (u *Outcome) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outcome + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + Version *int `json:"version,omitempty"` + + Description *string `json:"description,omitempty"` + + IsPositive *bool `json:"isPositive,omitempty"` + + Context *Context `json:"context,omitempty"` + + Journey *Journey `json:"journey,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Id: u.Id, + + IsActive: u.IsActive, + + DisplayName: u.DisplayName, + + Version: u.Version, + + Description: u.Description, + + IsPositive: u.IsPositive, + + Context: u.Context, + + Journey: u.Journey, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outcome) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outcomelisting.go b/platformclientv2/outcomelisting.go index ca30e71f1..48ee14328 100644 --- a/platformclientv2/outcomelisting.go +++ b/platformclientv2/outcomelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Outcomelisting struct { } +func (u *Outcomelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outcomelisting + + + + return json.Marshal(&struct { + Entities *[]Outcome `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outcomelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outcomeprobabilitycondition.go b/platformclientv2/outcomeprobabilitycondition.go index c1bef66f6..3b1ee2d7c 100644 --- a/platformclientv2/outcomeprobabilitycondition.go +++ b/platformclientv2/outcomeprobabilitycondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Outcomeprobabilitycondition struct { } +func (u *Outcomeprobabilitycondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outcomeprobabilitycondition + + + + return json.Marshal(&struct { + OutcomeId *string `json:"outcomeId,omitempty"` + + MaximumProbability *float32 `json:"maximumProbability,omitempty"` + + Probability *float32 `json:"probability,omitempty"` + *Alias + }{ + OutcomeId: u.OutcomeId, + + MaximumProbability: u.MaximumProbability, + + Probability: u.Probability, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outcomeprobabilitycondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outofoffice.go b/platformclientv2/outofoffice.go index 2df2da123..8893b870b 100644 --- a/platformclientv2/outofoffice.go +++ b/platformclientv2/outofoffice.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Outofoffice struct { } +func (u *Outofoffice) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outofoffice + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + User **User `json:"user,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + Active *bool `json:"active,omitempty"` + + Indefinite *bool `json:"indefinite,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + User: u.User, + + StartDate: StartDate, + + EndDate: EndDate, + + Active: u.Active, + + Indefinite: u.Indefinite, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outofoffice) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outofofficeeventoutofoffice.go b/platformclientv2/outofofficeeventoutofoffice.go index 0565fcd36..166528e1d 100644 --- a/platformclientv2/outofofficeeventoutofoffice.go +++ b/platformclientv2/outofofficeeventoutofoffice.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Outofofficeeventoutofoffice struct { } +func (u *Outofofficeeventoutofoffice) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outofofficeeventoutofoffice + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + User *Outofofficeeventuser `json:"user,omitempty"` + + Active *bool `json:"active,omitempty"` + + Indefinite *bool `json:"indefinite,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + *Alias + }{ + User: u.User, + + Active: u.Active, + + Indefinite: u.Indefinite, + + StartDate: StartDate, + + EndDate: EndDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outofofficeeventoutofoffice) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/outofofficeeventuser.go b/platformclientv2/outofofficeeventuser.go index 3c11f75b6..d64c2ed7d 100644 --- a/platformclientv2/outofofficeeventuser.go +++ b/platformclientv2/outofofficeeventuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Outofofficeeventuser struct { } +func (u *Outofofficeeventuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Outofofficeeventuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Outofofficeeventuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/overallbestpoints.go b/platformclientv2/overallbestpoints.go index f20c7a7df..519b4253b 100644 --- a/platformclientv2/overallbestpoints.go +++ b/platformclientv2/overallbestpoints.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Overallbestpoints struct { } +func (u *Overallbestpoints) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Overallbestpoints + + + + return json.Marshal(&struct { + Division *Division `json:"division,omitempty"` + + BestPoints *[]Overallbestpointsitem `json:"bestPoints,omitempty"` + *Alias + }{ + Division: u.Division, + + BestPoints: u.BestPoints, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Overallbestpoints) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/overallbestpointsitem.go b/platformclientv2/overallbestpointsitem.go index 05c6ba6a0..d5be15705 100644 --- a/platformclientv2/overallbestpointsitem.go +++ b/platformclientv2/overallbestpointsitem.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,56 @@ type Overallbestpointsitem struct { } +func (u *Overallbestpointsitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Overallbestpointsitem + + + DateStartWorkday := new(string) + if u.DateStartWorkday != nil { + *DateStartWorkday = timeutil.Strftime(u.DateStartWorkday, "%Y-%m-%d") + } else { + DateStartWorkday = nil + } + + DateEndWorkday := new(string) + if u.DateEndWorkday != nil { + *DateEndWorkday = timeutil.Strftime(u.DateEndWorkday, "%Y-%m-%d") + } else { + DateEndWorkday = nil + } + + + return json.Marshal(&struct { + GranularityType *string `json:"granularityType,omitempty"` + + Users *[]Userreference `json:"users,omitempty"` + + Count *int `json:"count,omitempty"` + + Points *int `json:"points,omitempty"` + + DateStartWorkday *string `json:"dateStartWorkday,omitempty"` + + DateEndWorkday *string `json:"dateEndWorkday,omitempty"` + *Alias + }{ + GranularityType: u.GranularityType, + + Users: u.Users, + + Count: u.Count, + + Points: u.Points, + + DateStartWorkday: DateStartWorkday, + + DateEndWorkday: DateEndWorkday, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Overallbestpointsitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/page.go b/platformclientv2/page.go index 7b2fc1feb..e90dc2718 100644 --- a/platformclientv2/page.go +++ b/platformclientv2/page.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Page struct { } +func (u *Page) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Page + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VersionId *string `json:"versionId,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + RootContainer *map[string]interface{} `json:"rootContainer,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VersionId: u.VersionId, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + + RootContainer: u.RootContainer, + + Properties: u.Properties, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Page) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/pagednamespacelisting.go b/platformclientv2/pagednamespacelisting.go index fb881fbdc..0b488939b 100644 --- a/platformclientv2/pagednamespacelisting.go +++ b/platformclientv2/pagednamespacelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Pagednamespacelisting type Pagednamespacelisting struct { } +func (u *Pagednamespacelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Pagednamespacelisting + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Pagednamespacelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/pagingspec.go b/platformclientv2/pagingspec.go index 8010f4f63..1d674832b 100644 --- a/platformclientv2/pagingspec.go +++ b/platformclientv2/pagingspec.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Pagingspec struct { } +func (u *Pagingspec) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Pagingspec + + + + return json.Marshal(&struct { + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + *Alias + }{ + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Pagingspec) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/parameter.go b/platformclientv2/parameter.go index 7e8f31385..d610a479d 100644 --- a/platformclientv2/parameter.go +++ b/platformclientv2/parameter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Parameter struct { } +func (u *Parameter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Parameter + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + ParameterType *string `json:"parameterType,omitempty"` + + Domain *string `json:"domain,omitempty"` + + Required *bool `json:"required,omitempty"` + *Alias + }{ + Name: u.Name, + + ParameterType: u.ParameterType, + + Domain: u.Domain, + + Required: u.Required, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Parameter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/parsedcertificate.go b/platformclientv2/parsedcertificate.go index 00d14855b..3fe53e19f 100644 --- a/platformclientv2/parsedcertificate.go +++ b/platformclientv2/parsedcertificate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Parsedcertificate struct { } +func (u *Parsedcertificate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Parsedcertificate + + + + return json.Marshal(&struct { + CertificateDetails *[]Certificatedetails `json:"certificateDetails,omitempty"` + *Alias + }{ + CertificateDetails: u.CertificateDetails, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Parsedcertificate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/participant.go b/platformclientv2/participant.go index 18cd2c3a8..dc7383881 100644 --- a/platformclientv2/participant.go +++ b/platformclientv2/participant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -189,6 +190,238 @@ type Participant struct { } +func (u *Participant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Participant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + Name *string `json:"name,omitempty"` + + UserUri *string `json:"userUri,omitempty"` + + UserId *string `json:"userId,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + QueueName *string `json:"queueName,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + ParticipantType *string `json:"participantType,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + Address *string `json:"address,omitempty"` + + Ani *string `json:"ani,omitempty"` + + AniName *string `json:"aniName,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + Locale *string `json:"locale,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + Calls *[]Call `json:"calls,omitempty"` + + Callbacks *[]Callback `json:"callbacks,omitempty"` + + Chats *[]Conversationchat `json:"chats,omitempty"` + + Cobrowsesessions *[]Cobrowsesession `json:"cobrowsesessions,omitempty"` + + Emails *[]Email `json:"emails,omitempty"` + + Messages *[]Message `json:"messages,omitempty"` + + Screenshares *[]Screenshare `json:"screenshares,omitempty"` + + SocialExpressions *[]Socialexpression `json:"socialExpressions,omitempty"` + + Videos *[]Video `json:"videos,omitempty"` + + Evaluations *[]Evaluation `json:"evaluations,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + *Alias + }{ + Id: u.Id, + + StartTime: StartTime, + + EndTime: EndTime, + + ConnectedTime: ConnectedTime, + + Name: u.Name, + + UserUri: u.UserUri, + + UserId: u.UserId, + + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + QueueId: u.QueueId, + + GroupId: u.GroupId, + + TeamId: u.TeamId, + + QueueName: u.QueueName, + + Purpose: u.Purpose, + + ParticipantType: u.ParticipantType, + + ConsultParticipantId: u.ConsultParticipantId, + + Address: u.Address, + + Ani: u.Ani, + + AniName: u.AniName, + + Dnis: u.Dnis, + + Locale: u.Locale, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + Attributes: u.Attributes, + + Calls: u.Calls, + + Callbacks: u.Callbacks, + + Chats: u.Chats, + + Cobrowsesessions: u.Cobrowsesessions, + + Emails: u.Emails, + + Messages: u.Messages, + + Screenshares: u.Screenshares, + + SocialExpressions: u.SocialExpressions, + + Videos: u.Videos, + + Evaluations: u.Evaluations, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Participant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/participantattributes.go b/platformclientv2/participantattributes.go index e0163bc76..8cdd84e9f 100644 --- a/platformclientv2/participantattributes.go +++ b/platformclientv2/participantattributes.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Participantattributes struct { } +func (u *Participantattributes) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Participantattributes + + + + return json.Marshal(&struct { + Attributes *map[string]string `json:"attributes,omitempty"` + *Alias + }{ + Attributes: u.Attributes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Participantattributes) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/participantbasic.go b/platformclientv2/participantbasic.go index c461ac8fb..b5125cc54 100644 --- a/platformclientv2/participantbasic.go +++ b/platformclientv2/participantbasic.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -189,6 +190,238 @@ type Participantbasic struct { } +func (u *Participantbasic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Participantbasic + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + Name *string `json:"name,omitempty"` + + UserUri *string `json:"userUri,omitempty"` + + UserId *string `json:"userId,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + QueueName *string `json:"queueName,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + ParticipantType *string `json:"participantType,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + Address *string `json:"address,omitempty"` + + Ani *string `json:"ani,omitempty"` + + AniName *string `json:"aniName,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + Locale *string `json:"locale,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + Calls *[]Callbasic `json:"calls,omitempty"` + + Callbacks *[]Callbackbasic `json:"callbacks,omitempty"` + + Chats *[]Conversationchat `json:"chats,omitempty"` + + Cobrowsesessions *[]Cobrowsesession `json:"cobrowsesessions,omitempty"` + + Emails *[]Email `json:"emails,omitempty"` + + Messages *[]Message `json:"messages,omitempty"` + + Screenshares *[]Screenshare `json:"screenshares,omitempty"` + + SocialExpressions *[]Socialexpression `json:"socialExpressions,omitempty"` + + Videos *[]Video `json:"videos,omitempty"` + + Evaluations *[]Evaluation `json:"evaluations,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + *Alias + }{ + Id: u.Id, + + StartTime: StartTime, + + EndTime: EndTime, + + ConnectedTime: ConnectedTime, + + Name: u.Name, + + UserUri: u.UserUri, + + UserId: u.UserId, + + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + QueueId: u.QueueId, + + GroupId: u.GroupId, + + TeamId: u.TeamId, + + QueueName: u.QueueName, + + Purpose: u.Purpose, + + ParticipantType: u.ParticipantType, + + ConsultParticipantId: u.ConsultParticipantId, + + Address: u.Address, + + Ani: u.Ani, + + AniName: u.AniName, + + Dnis: u.Dnis, + + Locale: u.Locale, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + Attributes: u.Attributes, + + Calls: u.Calls, + + Callbacks: u.Callbacks, + + Chats: u.Chats, + + Cobrowsesessions: u.Cobrowsesessions, + + Emails: u.Emails, + + Messages: u.Messages, + + Screenshares: u.Screenshares, + + SocialExpressions: u.SocialExpressions, + + Videos: u.Videos, + + Evaluations: u.Evaluations, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Participantbasic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/participantmetrics.go b/platformclientv2/participantmetrics.go index a36e8e066..bfb2ee082 100644 --- a/platformclientv2/participantmetrics.go +++ b/platformclientv2/participantmetrics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Participantmetrics type Participantmetrics struct { } +func (u *Participantmetrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Participantmetrics + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Participantmetrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchaction.go b/platformclientv2/patchaction.go index 8a9c67989..a5328d416 100644 --- a/platformclientv2/patchaction.go +++ b/platformclientv2/patchaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Patchaction struct { } +func (u *Patchaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchaction + + + + return json.Marshal(&struct { + MediaType *string `json:"mediaType,omitempty"` + + ActionTemplate *Actionmapactiontemplate `json:"actionTemplate,omitempty"` + + ArchitectFlowFields *Architectflowfields `json:"architectFlowFields,omitempty"` + + WebMessagingOfferFields *Webmessagingofferfields `json:"webMessagingOfferFields,omitempty"` + *Alias + }{ + MediaType: u.MediaType, + + ActionTemplate: u.ActionTemplate, + + ArchitectFlowFields: u.ArchitectFlowFields, + + WebMessagingOfferFields: u.WebMessagingOfferFields, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchactionmap.go b/platformclientv2/patchactionmap.go index 3e829abc2..d94d5beb5 100644 --- a/platformclientv2/patchactionmap.go +++ b/platformclientv2/patchactionmap.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,122 @@ type Patchactionmap struct { } +func (u *Patchactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchactionmap + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + TriggerWithSegments *[]string `json:"triggerWithSegments,omitempty"` + + TriggerWithEventConditions *[]Eventcondition `json:"triggerWithEventConditions,omitempty"` + + TriggerWithOutcomeProbabilityConditions *[]Outcomeprobabilitycondition `json:"triggerWithOutcomeProbabilityConditions,omitempty"` + + PageUrlConditions *[]Urlcondition `json:"pageUrlConditions,omitempty"` + + Activation *Activation `json:"activation,omitempty"` + + Weight *int `json:"weight,omitempty"` + + Action *Patchaction `json:"action,omitempty"` + + ActionMapScheduleGroups *Patchactionmapschedulegroups `json:"actionMapScheduleGroups,omitempty"` + + IgnoreFrequencyCap *bool `json:"ignoreFrequencyCap,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + + IsActive: u.IsActive, + + DisplayName: u.DisplayName, + + TriggerWithSegments: u.TriggerWithSegments, + + TriggerWithEventConditions: u.TriggerWithEventConditions, + + TriggerWithOutcomeProbabilityConditions: u.TriggerWithOutcomeProbabilityConditions, + + PageUrlConditions: u.PageUrlConditions, + + Activation: u.Activation, + + Weight: u.Weight, + + Action: u.Action, + + ActionMapScheduleGroups: u.ActionMapScheduleGroups, + + IgnoreFrequencyCap: u.IgnoreFrequencyCap, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + + StartDate: StartDate, + + EndDate: EndDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchactionmapschedulegroups.go b/platformclientv2/patchactionmapschedulegroups.go index 3c51fcfd7..52d386e08 100644 --- a/platformclientv2/patchactionmapschedulegroups.go +++ b/platformclientv2/patchactionmapschedulegroups.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Patchactionmapschedulegroups struct { } +func (u *Patchactionmapschedulegroups) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchactionmapschedulegroups + + + + return json.Marshal(&struct { + ActionMapScheduleGroup *Actionmapschedulegroup `json:"actionMapScheduleGroup,omitempty"` + + EmergencyActionMapScheduleGroup *Actionmapschedulegroup `json:"emergencyActionMapScheduleGroup,omitempty"` + *Alias + }{ + ActionMapScheduleGroup: u.ActionMapScheduleGroup, + + EmergencyActionMapScheduleGroup: u.EmergencyActionMapScheduleGroup, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchactionmapschedulegroups) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchactionproperties.go b/platformclientv2/patchactionproperties.go index 910e3137a..e3648215d 100644 --- a/platformclientv2/patchactionproperties.go +++ b/platformclientv2/patchactionproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Patchactionproperties struct { } +func (u *Patchactionproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchactionproperties + + + + return json.Marshal(&struct { + WebchatPrompt *string `json:"webchatPrompt,omitempty"` + + WebchatTitleText *string `json:"webchatTitleText,omitempty"` + + WebchatAcceptText *string `json:"webchatAcceptText,omitempty"` + + WebchatDeclineText *string `json:"webchatDeclineText,omitempty"` + + WebchatSurvey *Patchactionsurvey `json:"webchatSurvey,omitempty"` + *Alias + }{ + WebchatPrompt: u.WebchatPrompt, + + WebchatTitleText: u.WebchatTitleText, + + WebchatAcceptText: u.WebchatAcceptText, + + WebchatDeclineText: u.WebchatDeclineText, + + WebchatSurvey: u.WebchatSurvey, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchactionproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchactionsurvey.go b/platformclientv2/patchactionsurvey.go index 2a1378a3b..7d4c48307 100644 --- a/platformclientv2/patchactionsurvey.go +++ b/platformclientv2/patchactionsurvey.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Patchactionsurvey struct { } +func (u *Patchactionsurvey) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchactionsurvey + + + + return json.Marshal(&struct { + Questions *[]Patchsurveyquestion `json:"questions,omitempty"` + *Alias + }{ + Questions: u.Questions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchactionsurvey) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchactiontarget.go b/platformclientv2/patchactiontarget.go index d1ec92858..fe1e76224 100644 --- a/platformclientv2/patchactiontarget.go +++ b/platformclientv2/patchactiontarget.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Patchactiontarget struct { } +func (u *Patchactiontarget) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchactiontarget + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ServiceLevel *Servicelevel `json:"serviceLevel,omitempty"` + + ShortAbandonThreshold *int `json:"shortAbandonThreshold,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ServiceLevel: u.ServiceLevel, + + ShortAbandonThreshold: u.ShortAbandonThreshold, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchactiontarget) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchactiontemplate.go b/platformclientv2/patchactiontemplate.go index 80d7751cf..0630ee117 100644 --- a/platformclientv2/patchactiontemplate.go +++ b/platformclientv2/patchactiontemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Patchactiontemplate struct { } +func (u *Patchactiontemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchactiontemplate + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + State *string `json:"state,omitempty"` + + ContentOffer *Patchcontentoffer `json:"contentOffer,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + MediaType: u.MediaType, + + State: u.State, + + ContentOffer: u.ContentOffer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchactiontemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchbureschedulingoptionsmanagementunitrequest.go b/platformclientv2/patchbureschedulingoptionsmanagementunitrequest.go index a9b125474..0ba383d9b 100644 --- a/platformclientv2/patchbureschedulingoptionsmanagementunitrequest.go +++ b/platformclientv2/patchbureschedulingoptionsmanagementunitrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Patchbureschedulingoptionsmanagementunitrequest struct { } +func (u *Patchbureschedulingoptionsmanagementunitrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchbureschedulingoptionsmanagementunitrequest + + + + return json.Marshal(&struct { + ManagementUnitId *string `json:"managementUnitId,omitempty"` + + Applied *bool `json:"applied,omitempty"` + *Alias + }{ + ManagementUnitId: u.ManagementUnitId, + + Applied: u.Applied, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchbureschedulingoptionsmanagementunitrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchbureschedulingoptionsrequest.go b/platformclientv2/patchbureschedulingoptionsrequest.go index bfef69504..035648c3f 100644 --- a/platformclientv2/patchbureschedulingoptionsrequest.go +++ b/platformclientv2/patchbureschedulingoptionsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Patchbureschedulingoptionsrequest struct { } +func (u *Patchbureschedulingoptionsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchbureschedulingoptionsrequest + + + + return json.Marshal(&struct { + ManagementUnits *[]Patchbureschedulingoptionsmanagementunitrequest `json:"managementUnits,omitempty"` + *Alias + }{ + ManagementUnits: u.ManagementUnits, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchbureschedulingoptionsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchbuschedulerunrequest.go b/platformclientv2/patchbuschedulerunrequest.go index c32f1043f..6d20012a1 100644 --- a/platformclientv2/patchbuschedulerunrequest.go +++ b/platformclientv2/patchbuschedulerunrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Patchbuschedulerunrequest struct { } +func (u *Patchbuschedulerunrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchbuschedulerunrequest + + + + return json.Marshal(&struct { + ReschedulingOptions *Patchbureschedulingoptionsrequest `json:"reschedulingOptions,omitempty"` + *Alias + }{ + ReschedulingOptions: u.ReschedulingOptions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchbuschedulerunrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchcalltoaction.go b/platformclientv2/patchcalltoaction.go index 26beef9b3..dda2f1d6c 100644 --- a/platformclientv2/patchcalltoaction.go +++ b/platformclientv2/patchcalltoaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Patchcalltoaction struct { } +func (u *Patchcalltoaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchcalltoaction + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Url *string `json:"url,omitempty"` + + Target *string `json:"target,omitempty"` + *Alias + }{ + Text: u.Text, + + Url: u.Url, + + Target: u.Target, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchcalltoaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchclosebuttonstyleproperties.go b/platformclientv2/patchclosebuttonstyleproperties.go index 6bda71871..6e1761722 100644 --- a/platformclientv2/patchclosebuttonstyleproperties.go +++ b/platformclientv2/patchclosebuttonstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Patchclosebuttonstyleproperties struct { } +func (u *Patchclosebuttonstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchclosebuttonstyleproperties + + + + return json.Marshal(&struct { + Color *string `json:"color,omitempty"` + + Opacity *float32 `json:"opacity,omitempty"` + *Alias + }{ + Color: u.Color, + + Opacity: u.Opacity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchclosebuttonstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchcontentoffer.go b/platformclientv2/patchcontentoffer.go index 5f5674697..57706df7d 100644 --- a/platformclientv2/patchcontentoffer.go +++ b/platformclientv2/patchcontentoffer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Patchcontentoffer struct { } +func (u *Patchcontentoffer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchcontentoffer + + + + return json.Marshal(&struct { + ImageUrl *string `json:"imageUrl,omitempty"` + + DisplayMode *string `json:"displayMode,omitempty"` + + LayoutMode *string `json:"layoutMode,omitempty"` + + Title *string `json:"title,omitempty"` + + Headline *string `json:"headline,omitempty"` + + Body *string `json:"body,omitempty"` + + CallToAction *Patchcalltoaction `json:"callToAction,omitempty"` + + Style *Patchcontentofferstylingconfiguration `json:"style,omitempty"` + *Alias + }{ + ImageUrl: u.ImageUrl, + + DisplayMode: u.DisplayMode, + + LayoutMode: u.LayoutMode, + + Title: u.Title, + + Headline: u.Headline, + + Body: u.Body, + + CallToAction: u.CallToAction, + + Style: u.Style, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchcontentoffer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchcontentofferstyleproperties.go b/platformclientv2/patchcontentofferstyleproperties.go index 11c70af61..e67e653dc 100644 --- a/platformclientv2/patchcontentofferstyleproperties.go +++ b/platformclientv2/patchcontentofferstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Patchcontentofferstyleproperties struct { } +func (u *Patchcontentofferstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchcontentofferstyleproperties + + + + return json.Marshal(&struct { + Padding *string `json:"padding,omitempty"` + + Color *string `json:"color,omitempty"` + + BackgroundColor *string `json:"backgroundColor,omitempty"` + *Alias + }{ + Padding: u.Padding, + + Color: u.Color, + + BackgroundColor: u.BackgroundColor, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchcontentofferstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchcontentofferstylingconfiguration.go b/platformclientv2/patchcontentofferstylingconfiguration.go index a4b6a6159..56c66a56c 100644 --- a/platformclientv2/patchcontentofferstylingconfiguration.go +++ b/platformclientv2/patchcontentofferstylingconfiguration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Patchcontentofferstylingconfiguration struct { } +func (u *Patchcontentofferstylingconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchcontentofferstylingconfiguration + + + + return json.Marshal(&struct { + Position *Patchcontentpositionproperties `json:"position,omitempty"` + + Offer *Patchcontentofferstyleproperties `json:"offer,omitempty"` + + CloseButton *Patchclosebuttonstyleproperties `json:"closeButton,omitempty"` + + CtaButton *Patchctabuttonstyleproperties `json:"ctaButton,omitempty"` + + Title *Patchtextstyleproperties `json:"title,omitempty"` + + Headline *Patchtextstyleproperties `json:"headline,omitempty"` + + Body *Patchtextstyleproperties `json:"body,omitempty"` + *Alias + }{ + Position: u.Position, + + Offer: u.Offer, + + CloseButton: u.CloseButton, + + CtaButton: u.CtaButton, + + Title: u.Title, + + Headline: u.Headline, + + Body: u.Body, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchcontentofferstylingconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchcontentpositionproperties.go b/platformclientv2/patchcontentpositionproperties.go index f59d23afd..99271a09e 100644 --- a/platformclientv2/patchcontentpositionproperties.go +++ b/platformclientv2/patchcontentpositionproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Patchcontentpositionproperties struct { } +func (u *Patchcontentpositionproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchcontentpositionproperties + + + + return json.Marshal(&struct { + Top *string `json:"top,omitempty"` + + Bottom *string `json:"bottom,omitempty"` + + Left *string `json:"left,omitempty"` + + Right *string `json:"right,omitempty"` + *Alias + }{ + Top: u.Top, + + Bottom: u.Bottom, + + Left: u.Left, + + Right: u.Right, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchcontentpositionproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchctabuttonstyleproperties.go b/platformclientv2/patchctabuttonstyleproperties.go index a574dc4ed..88d32b7eb 100644 --- a/platformclientv2/patchctabuttonstyleproperties.go +++ b/platformclientv2/patchctabuttonstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Patchctabuttonstyleproperties struct { } +func (u *Patchctabuttonstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchctabuttonstyleproperties + + + + return json.Marshal(&struct { + Color *string `json:"color,omitempty"` + + Font *string `json:"font,omitempty"` + + FontSize *string `json:"fontSize,omitempty"` + + TextAlign *string `json:"textAlign,omitempty"` + + BackgroundColor *string `json:"backgroundColor,omitempty"` + *Alias + }{ + Color: u.Color, + + Font: u.Font, + + FontSize: u.FontSize, + + TextAlign: u.TextAlign, + + BackgroundColor: u.BackgroundColor, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchctabuttonstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchexternalsegment.go b/platformclientv2/patchexternalsegment.go index 7930304e9..dd29b8684 100644 --- a/platformclientv2/patchexternalsegment.go +++ b/platformclientv2/patchexternalsegment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Patchexternalsegment struct { } +func (u *Patchexternalsegment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchexternalsegment + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchexternalsegment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchintegrationaction.go b/platformclientv2/patchintegrationaction.go index a0e627376..3ee63e363 100644 --- a/platformclientv2/patchintegrationaction.go +++ b/platformclientv2/patchintegrationaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Patchintegrationaction struct { } +func (u *Patchintegrationaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchintegrationaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchintegrationaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchintegrationactionfields.go b/platformclientv2/patchintegrationactionfields.go index 7f9e3f1f9..ba0b8ef0c 100644 --- a/platformclientv2/patchintegrationactionfields.go +++ b/platformclientv2/patchintegrationactionfields.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Patchintegrationactionfields struct { } +func (u *Patchintegrationactionfields) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchintegrationactionfields + + + + return json.Marshal(&struct { + IntegrationAction *Patchintegrationaction `json:"integrationAction,omitempty"` + + RequestMappings *[]Requestmapping `json:"requestMappings,omitempty"` + *Alias + }{ + IntegrationAction: u.IntegrationAction, + + RequestMappings: u.RequestMappings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchintegrationactionfields) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchoutcome.go b/platformclientv2/patchoutcome.go index 76e00a4ac..7b789c668 100644 --- a/platformclientv2/patchoutcome.go +++ b/platformclientv2/patchoutcome.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Patchoutcome struct { } +func (u *Patchoutcome) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchoutcome + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + Version *int `json:"version,omitempty"` + + Description *string `json:"description,omitempty"` + + IsPositive *bool `json:"isPositive,omitempty"` + + Context *Context `json:"context,omitempty"` + + Journey *Journey `json:"journey,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Id: u.Id, + + IsActive: u.IsActive, + + DisplayName: u.DisplayName, + + Version: u.Version, + + Description: u.Description, + + IsPositive: u.IsPositive, + + Context: u.Context, + + Journey: u.Journey, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchoutcome) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchpredictorrequest.go b/platformclientv2/patchpredictorrequest.go index 24af6d49f..71fa1a145 100644 --- a/platformclientv2/patchpredictorrequest.go +++ b/platformclientv2/patchpredictorrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Patchpredictorrequest struct { } +func (u *Patchpredictorrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchpredictorrequest + + + + return json.Marshal(&struct { + RoutingTimeoutSeconds *int `json:"routingTimeoutSeconds,omitempty"` + + Schedule *Predictorschedule `json:"schedule,omitempty"` + + WorkloadBalancingConfig *Predictorworkloadbalancing `json:"workloadBalancingConfig,omitempty"` + *Alias + }{ + RoutingTimeoutSeconds: u.RoutingTimeoutSeconds, + + Schedule: u.Schedule, + + WorkloadBalancingConfig: u.WorkloadBalancingConfig, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchpredictorrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchsegment.go b/platformclientv2/patchsegment.go index 3896cb95c..da19f8068 100644 --- a/platformclientv2/patchsegment.go +++ b/platformclientv2/patchsegment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Patchsegment struct { } +func (u *Patchsegment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchsegment + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IsActive *bool `json:"isActive,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + Version *int `json:"version,omitempty"` + + Description *string `json:"description,omitempty"` + + Color *string `json:"color,omitempty"` + + ShouldDisplayToAgent *bool `json:"shouldDisplayToAgent,omitempty"` + + Context *Context `json:"context,omitempty"` + + Journey *Journey `json:"journey,omitempty"` + + ExternalSegment *Patchexternalsegment `json:"externalSegment,omitempty"` + + AssignmentExpirationDays *int `json:"assignmentExpirationDays,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Id: u.Id, + + IsActive: u.IsActive, + + DisplayName: u.DisplayName, + + Version: u.Version, + + Description: u.Description, + + Color: u.Color, + + ShouldDisplayToAgent: u.ShouldDisplayToAgent, + + Context: u.Context, + + Journey: u.Journey, + + ExternalSegment: u.ExternalSegment, + + AssignmentExpirationDays: u.AssignmentExpirationDays, + + SelfUri: u.SelfUri, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchsegment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchshifttraderequest.go b/platformclientv2/patchshifttraderequest.go index a86b2c484..579b29c50 100644 --- a/platformclientv2/patchshifttraderequest.go +++ b/platformclientv2/patchshifttraderequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Patchshifttraderequest struct { } +func (u *Patchshifttraderequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchshifttraderequest + + + + return json.Marshal(&struct { + ReceivingUserId *Valuewrapperstring `json:"receivingUserId,omitempty"` + + Expiration *Valuewrapperdate `json:"expiration,omitempty"` + + AcceptableIntervals *Listwrapperinterval `json:"acceptableIntervals,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + ReceivingUserId: u.ReceivingUserId, + + Expiration: u.Expiration, + + AcceptableIntervals: u.AcceptableIntervals, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchshifttraderequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchsurveyquestion.go b/platformclientv2/patchsurveyquestion.go index 7d863005e..974cd8ec6 100644 --- a/platformclientv2/patchsurveyquestion.go +++ b/platformclientv2/patchsurveyquestion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Patchsurveyquestion struct { } +func (u *Patchsurveyquestion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchsurveyquestion + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Label *string `json:"label,omitempty"` + + CustomerProperty *string `json:"customerProperty,omitempty"` + + Choices *[]string `json:"choices,omitempty"` + + IsMandatory *bool `json:"isMandatory,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Label: u.Label, + + CustomerProperty: u.CustomerProperty, + + Choices: u.Choices, + + IsMandatory: u.IsMandatory, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchsurveyquestion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchtextstyleproperties.go b/platformclientv2/patchtextstyleproperties.go index 291262075..da557a0b1 100644 --- a/platformclientv2/patchtextstyleproperties.go +++ b/platformclientv2/patchtextstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Patchtextstyleproperties struct { } +func (u *Patchtextstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchtextstyleproperties + + + + return json.Marshal(&struct { + Color *string `json:"color,omitempty"` + + Font *string `json:"font,omitempty"` + + FontSize *string `json:"fontSize,omitempty"` + + TextAlign *string `json:"textAlign,omitempty"` + *Alias + }{ + Color: u.Color, + + Font: u.Font, + + FontSize: u.FontSize, + + TextAlign: u.TextAlign, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchtextstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/patchuser.go b/platformclientv2/patchuser.go index 5bddc0d17..05f937475 100644 --- a/platformclientv2/patchuser.go +++ b/platformclientv2/patchuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Patchuser struct { } +func (u *Patchuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Patchuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + AcdAutoAnswer *bool `json:"acdAutoAnswer,omitempty"` + *Alias + }{ + Id: u.Id, + + AcdAutoAnswer: u.AcdAutoAnswer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Patchuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/performanceprofile.go b/platformclientv2/performanceprofile.go index fa95ba098..f98657fe2 100644 --- a/platformclientv2/performanceprofile.go +++ b/platformclientv2/performanceprofile.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,66 @@ type Performanceprofile struct { } +func (u *Performanceprofile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Performanceprofile + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + MetricOrders *[]string `json:"metricOrders,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ReportingIntervals *[]Reportinginterval `json:"reportingIntervals,omitempty"` + + Active *bool `json:"active,omitempty"` + + MaxLeaderboardRankSize *int `json:"maxLeaderboardRankSize,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + MetricOrders: u.MetricOrders, + + DateCreated: DateCreated, + + ReportingIntervals: u.ReportingIntervals, + + Active: u.Active, + + MaxLeaderboardRankSize: u.MaxLeaderboardRankSize, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Performanceprofile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/permissioncollectionentitylisting.go b/platformclientv2/permissioncollectionentitylisting.go index 6ee1f2e38..271994bf8 100644 --- a/platformclientv2/permissioncollectionentitylisting.go +++ b/platformclientv2/permissioncollectionentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Permissioncollectionentitylisting struct { } +func (u *Permissioncollectionentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Permissioncollectionentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainpermissioncollection `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Permissioncollectionentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/permissiondetails.go b/platformclientv2/permissiondetails.go index 51ffa80f7..547e46b76 100644 --- a/platformclientv2/permissiondetails.go +++ b/platformclientv2/permissiondetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Permissiondetails struct { } +func (u *Permissiondetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Permissiondetails + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Permissions *[]string `json:"permissions,omitempty"` + + AllowsCurrentUser *bool `json:"allowsCurrentUser,omitempty"` + + Enforced *bool `json:"enforced,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Permissions: u.Permissions, + + AllowsCurrentUser: u.AllowsCurrentUser, + + Enforced: u.Enforced, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Permissiondetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/permissions.go b/platformclientv2/permissions.go index 6f409c20b..a08dfc9e1 100644 --- a/platformclientv2/permissions.go +++ b/platformclientv2/permissions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Permissions struct { } +func (u *Permissions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Permissions + + + + return json.Marshal(&struct { + Ids *[]string `json:"ids,omitempty"` + *Alias + }{ + Ids: u.Ids, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Permissions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phone.go b/platformclientv2/phone.go index 3eaa17ba5..1475e6a78 100644 --- a/platformclientv2/phone.go +++ b/platformclientv2/phone.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -109,6 +110,134 @@ type Phone struct { } +func (u *Phone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phone + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Site *Domainentityref `json:"site,omitempty"` + + PhoneBaseSettings *Domainentityref `json:"phoneBaseSettings,omitempty"` + + LineBaseSettings *Domainentityref `json:"lineBaseSettings,omitempty"` + + PhoneMetaBase *Domainentityref `json:"phoneMetaBase,omitempty"` + + Lines *[]Line `json:"lines,omitempty"` + + Status *Phonestatus `json:"status,omitempty"` + + SecondaryStatus *Phonestatus `json:"secondaryStatus,omitempty"` + + UserAgentInfo *Useragentinfo `json:"userAgentInfo,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + Capabilities *Phonecapabilities `json:"capabilities,omitempty"` + + WebRtcUser *Domainentityref `json:"webRtcUser,omitempty"` + + PrimaryEdge *Edge `json:"primaryEdge,omitempty"` + + SecondaryEdge *Edge `json:"secondaryEdge,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Site: u.Site, + + PhoneBaseSettings: u.PhoneBaseSettings, + + LineBaseSettings: u.LineBaseSettings, + + PhoneMetaBase: u.PhoneMetaBase, + + Lines: u.Lines, + + Status: u.Status, + + SecondaryStatus: u.SecondaryStatus, + + UserAgentInfo: u.UserAgentInfo, + + Properties: u.Properties, + + Capabilities: u.Capabilities, + + WebRtcUser: u.WebRtcUser, + + PrimaryEdge: u.PrimaryEdge, + + SecondaryEdge: u.SecondaryEdge, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonebase.go b/platformclientv2/phonebase.go index 48039a3cc..1bcb3295c 100644 --- a/platformclientv2/phonebase.go +++ b/platformclientv2/phonebase.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Phonebase struct { } +func (u *Phonebase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonebase + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + PhoneMetaBase *Domainentityref `json:"phoneMetaBase,omitempty"` + + Lines *[]Linebase `json:"lines,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + Capabilities *Phonecapabilities `json:"capabilities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + PhoneMetaBase: u.PhoneMetaBase, + + Lines: u.Lines, + + Properties: u.Properties, + + Capabilities: u.Capabilities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonebase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonebaseentitylisting.go b/platformclientv2/phonebaseentitylisting.go index 6b941840b..e4d5c0b12 100644 --- a/platformclientv2/phonebaseentitylisting.go +++ b/platformclientv2/phonebaseentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Phonebaseentitylisting struct { } +func (u *Phonebaseentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonebaseentitylisting + + + + return json.Marshal(&struct { + Entities *[]Phonebase `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonebaseentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonecapabilities.go b/platformclientv2/phonecapabilities.go index 78dc90843..64e12c330 100644 --- a/platformclientv2/phonecapabilities.go +++ b/platformclientv2/phonecapabilities.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Phonecapabilities struct { } +func (u *Phonecapabilities) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonecapabilities + + + + return json.Marshal(&struct { + Provisions *bool `json:"provisions,omitempty"` + + Registers *bool `json:"registers,omitempty"` + + DualRegisters *bool `json:"dualRegisters,omitempty"` + + HardwareIdType *string `json:"hardwareIdType,omitempty"` + + AllowReboot *bool `json:"allowReboot,omitempty"` + + NoRebalance *bool `json:"noRebalance,omitempty"` + + NoCloudProvisioning *bool `json:"noCloudProvisioning,omitempty"` + + MediaCodecs *[]string `json:"mediaCodecs,omitempty"` + + Cdm *bool `json:"cdm,omitempty"` + *Alias + }{ + Provisions: u.Provisions, + + Registers: u.Registers, + + DualRegisters: u.DualRegisters, + + HardwareIdType: u.HardwareIdType, + + AllowReboot: u.AllowReboot, + + NoRebalance: u.NoRebalance, + + NoCloudProvisioning: u.NoCloudProvisioning, + + MediaCodecs: u.MediaCodecs, + + Cdm: u.Cdm, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonecapabilities) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonechangetopicedgereference.go b/platformclientv2/phonechangetopicedgereference.go index 26f712528..02597fd2f 100644 --- a/platformclientv2/phonechangetopicedgereference.go +++ b/platformclientv2/phonechangetopicedgereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Phonechangetopicedgereference struct { } +func (u *Phonechangetopicedgereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonechangetopicedgereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonechangetopicedgereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonechangetopiclinestatus.go b/platformclientv2/phonechangetopiclinestatus.go index 9946e88ce..86043be3c 100644 --- a/platformclientv2/phonechangetopiclinestatus.go +++ b/platformclientv2/phonechangetopiclinestatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Phonechangetopiclinestatus struct { } +func (u *Phonechangetopiclinestatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonechangetopiclinestatus + + + ReachableStateTime := new(string) + if u.ReachableStateTime != nil { + + *ReachableStateTime = timeutil.Strftime(u.ReachableStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReachableStateTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Reachable *bool `json:"reachable,omitempty"` + + AddressOfRecord *string `json:"addressOfRecord,omitempty"` + + ContactAddresses *[]string `json:"contactAddresses,omitempty"` + + ReachableStateTime *string `json:"reachableStateTime,omitempty"` + *Alias + }{ + Id: u.Id, + + Reachable: u.Reachable, + + AddressOfRecord: u.AddressOfRecord, + + ContactAddresses: u.ContactAddresses, + + ReachableStateTime: ReachableStateTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonechangetopiclinestatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonechangetopicphone.go b/platformclientv2/phonechangetopicphone.go index 6375f4fac..f02178448 100644 --- a/platformclientv2/phonechangetopicphone.go +++ b/platformclientv2/phonechangetopicphone.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Phonechangetopicphone struct { } +func (u *Phonechangetopicphone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonechangetopicphone + + + + return json.Marshal(&struct { + UserAgentInfo *Phonechangetopicuseragentinfo `json:"userAgentInfo,omitempty"` + + Id *string `json:"id,omitempty"` + + Status *Phonechangetopicphonestatus `json:"status,omitempty"` + + SecondaryStatus *Phonechangetopicphonestatus `json:"secondaryStatus,omitempty"` + *Alias + }{ + UserAgentInfo: u.UserAgentInfo, + + Id: u.Id, + + Status: u.Status, + + SecondaryStatus: u.SecondaryStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonechangetopicphone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonechangetopicphonestatus.go b/platformclientv2/phonechangetopicphonestatus.go index 69917bb57..ddaf7dcfd 100644 --- a/platformclientv2/phonechangetopicphonestatus.go +++ b/platformclientv2/phonechangetopicphonestatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Phonechangetopicphonestatus struct { } +func (u *Phonechangetopicphonestatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonechangetopicphonestatus + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + OperationalStatus *string `json:"operationalStatus,omitempty"` + + Edge *Phonechangetopicedgereference `json:"edge,omitempty"` + + Provision *Phonechangetopicprovisioninfo `json:"provision,omitempty"` + + LineStatuses *[]Phonechangetopiclinestatus `json:"lineStatuses,omitempty"` + *Alias + }{ + Id: u.Id, + + OperationalStatus: u.OperationalStatus, + + Edge: u.Edge, + + Provision: u.Provision, + + LineStatuses: u.LineStatuses, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonechangetopicphonestatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonechangetopicprovisioninfo.go b/platformclientv2/phonechangetopicprovisioninfo.go index e9292ccd6..a3d52c1d1 100644 --- a/platformclientv2/phonechangetopicprovisioninfo.go +++ b/platformclientv2/phonechangetopicprovisioninfo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Phonechangetopicprovisioninfo struct { } +func (u *Phonechangetopicprovisioninfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonechangetopicprovisioninfo + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + + return json.Marshal(&struct { + Time *string `json:"time,omitempty"` + + Source *string `json:"source,omitempty"` + + ErrorInfo *string `json:"errorInfo,omitempty"` + *Alias + }{ + Time: Time, + + Source: u.Source, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonechangetopicprovisioninfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonechangetopicuseragentinfo.go b/platformclientv2/phonechangetopicuseragentinfo.go index 66b522a72..e568c82a6 100644 --- a/platformclientv2/phonechangetopicuseragentinfo.go +++ b/platformclientv2/phonechangetopicuseragentinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Phonechangetopicuseragentinfo struct { } +func (u *Phonechangetopicuseragentinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonechangetopicuseragentinfo + + + + return json.Marshal(&struct { + FirmwareVersion *string `json:"firmwareVersion,omitempty"` + + Manufacturer *string `json:"manufacturer,omitempty"` + + Model *string `json:"model,omitempty"` + *Alias + }{ + FirmwareVersion: u.FirmwareVersion, + + Manufacturer: u.Manufacturer, + + Model: u.Model, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonechangetopicuseragentinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonecolumn.go b/platformclientv2/phonecolumn.go index 0c892bc43..83e9efb1f 100644 --- a/platformclientv2/phonecolumn.go +++ b/platformclientv2/phonecolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Phonecolumn struct { } +func (u *Phonecolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonecolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonecolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phoneentitylisting.go b/platformclientv2/phoneentitylisting.go index c5d0eaeb3..fca5635f3 100644 --- a/platformclientv2/phoneentitylisting.go +++ b/platformclientv2/phoneentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Phoneentitylisting struct { } +func (u *Phoneentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phoneentitylisting + + + + return json.Marshal(&struct { + Entities *[]Phone `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phoneentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonemetabaseentitylisting.go b/platformclientv2/phonemetabaseentitylisting.go index 419446fa2..919305cb2 100644 --- a/platformclientv2/phonemetabaseentitylisting.go +++ b/platformclientv2/phonemetabaseentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Phonemetabaseentitylisting struct { } +func (u *Phonemetabaseentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonemetabaseentitylisting + + + + return json.Marshal(&struct { + Entities *[]Metabase `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonemetabaseentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonenumber.go b/platformclientv2/phonenumber.go index 291895da7..489a399a7 100644 --- a/platformclientv2/phonenumber.go +++ b/platformclientv2/phonenumber.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Phonenumber struct { } +func (u *Phonenumber) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonenumber + + + + return json.Marshal(&struct { + Display *string `json:"display,omitempty"` + + Extension *int `json:"extension,omitempty"` + + AcceptsSMS *bool `json:"acceptsSMS,omitempty"` + + UserInput *string `json:"userInput,omitempty"` + + E164 *string `json:"e164,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + *Alias + }{ + Display: u.Display, + + Extension: u.Extension, + + AcceptsSMS: u.AcceptsSMS, + + UserInput: u.UserInput, + + E164: u.E164, + + CountryCode: u.CountryCode, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonenumber) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonenumbercolumn.go b/platformclientv2/phonenumbercolumn.go index e80673e30..427d4cbf3 100644 --- a/platformclientv2/phonenumbercolumn.go +++ b/platformclientv2/phonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Phonenumbercolumn struct { } +func (u *Phonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonenumberstatus.go b/platformclientv2/phonenumberstatus.go index 1be0135c2..fb4d508ed 100644 --- a/platformclientv2/phonenumberstatus.go +++ b/platformclientv2/phonenumberstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Phonenumberstatus struct { } +func (u *Phonenumberstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonenumberstatus + + + + return json.Marshal(&struct { + Callable *bool `json:"callable,omitempty"` + *Alias + }{ + Callable: u.Callable, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonenumberstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonesreboot.go b/platformclientv2/phonesreboot.go index 789187e7c..9f4f3df2e 100644 --- a/platformclientv2/phonesreboot.go +++ b/platformclientv2/phonesreboot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Phonesreboot struct { } +func (u *Phonesreboot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonesreboot + + + + return json.Marshal(&struct { + PhoneIds *[]string `json:"phoneIds,omitempty"` + + SiteId *string `json:"siteId,omitempty"` + *Alias + }{ + PhoneIds: u.PhoneIds, + + SiteId: u.SiteId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonesreboot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phonestatus.go b/platformclientv2/phonestatus.go index 28af12349..8e103ac8d 100644 --- a/platformclientv2/phonestatus.go +++ b/platformclientv2/phonestatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Phonestatus struct { } +func (u *Phonestatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phonestatus + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + OperationalStatus *string `json:"operationalStatus,omitempty"` + + EdgesStatus *string `json:"edgesStatus,omitempty"` + + EventCreationTime *string `json:"eventCreationTime,omitempty"` + + Provision *Provisioninfo `json:"provision,omitempty"` + + LineStatuses *[]Linestatus `json:"lineStatuses,omitempty"` + + PhoneAssignmentToEdgeType *string `json:"phoneAssignmentToEdgeType,omitempty"` + + Edge *Domainentityref `json:"edge,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + OperationalStatus: u.OperationalStatus, + + EdgesStatus: u.EdgesStatus, + + EventCreationTime: u.EventCreationTime, + + Provision: u.Provision, + + LineStatuses: u.LineStatuses, + + PhoneAssignmentToEdgeType: u.PhoneAssignmentToEdgeType, + + Edge: u.Edge, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phonestatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/phrase.go b/platformclientv2/phrase.go index e51618d65..a908ee9dc 100644 --- a/platformclientv2/phrase.go +++ b/platformclientv2/phrase.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Phrase struct { } +func (u *Phrase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Phrase + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Strictness *string `json:"strictness,omitempty"` + + Sentiment *string `json:"sentiment,omitempty"` + *Alias + }{ + Text: u.Text, + + Strictness: u.Strictness, + + Sentiment: u.Sentiment, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Phrase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/physicalinterfaceentitylisting.go b/platformclientv2/physicalinterfaceentitylisting.go index da24d2902..151c1ab69 100644 --- a/platformclientv2/physicalinterfaceentitylisting.go +++ b/platformclientv2/physicalinterfaceentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Physicalinterfaceentitylisting struct { } +func (u *Physicalinterfaceentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Physicalinterfaceentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainphysicalinterface `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Physicalinterfaceentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/pinconfiguration.go b/platformclientv2/pinconfiguration.go index c3f2cb638..a93c27e2e 100644 --- a/platformclientv2/pinconfiguration.go +++ b/platformclientv2/pinconfiguration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Pinconfiguration struct { } +func (u *Pinconfiguration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Pinconfiguration + + + + return json.Marshal(&struct { + MinimumLength *int `json:"minimumLength,omitempty"` + + MaximumLength *int `json:"maximumLength,omitempty"` + *Alias + }{ + MinimumLength: u.MinimumLength, + + MaximumLength: u.MaximumLength, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Pinconfiguration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/pingidentity.go b/platformclientv2/pingidentity.go index 51c6ee5eb..f7d2df295 100644 --- a/platformclientv2/pingidentity.go +++ b/platformclientv2/pingidentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Pingidentity struct { } +func (u *Pingidentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Pingidentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + RelyingPartyIdentifier *string `json:"relyingPartyIdentifier,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + RelyingPartyIdentifier: u.RelyingPartyIdentifier, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Pingidentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/planninggroup.go b/platformclientv2/planninggroup.go index c59f55d50..6d96ca4fc 100644 --- a/platformclientv2/planninggroup.go +++ b/platformclientv2/planninggroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Planninggroup struct { } +func (u *Planninggroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Planninggroup + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ServiceGoalTemplate *Servicegoaltemplatereference `json:"serviceGoalTemplate,omitempty"` + + RoutePaths *[]Routepathresponse `json:"routePaths,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ServiceGoalTemplate: u.ServiceGoalTemplate, + + RoutePaths: u.RoutePaths, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Planninggroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/planninggrouplist.go b/platformclientv2/planninggrouplist.go index 6a7520a10..df88b14fa 100644 --- a/platformclientv2/planninggrouplist.go +++ b/platformclientv2/planninggrouplist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Planninggrouplist struct { } +func (u *Planninggrouplist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Planninggrouplist + + + + return json.Marshal(&struct { + Entities *[]Planninggroup `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Planninggrouplist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/planninggroupreference.go b/platformclientv2/planninggroupreference.go index c0a1506c2..f0def574c 100644 --- a/platformclientv2/planninggroupreference.go +++ b/platformclientv2/planninggroupreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Planninggroupreference struct { } +func (u *Planninggroupreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Planninggroupreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Planninggroupreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/planningperiodsettings.go b/platformclientv2/planningperiodsettings.go index 5a19647a1..f929224cf 100644 --- a/platformclientv2/planningperiodsettings.go +++ b/platformclientv2/planningperiodsettings.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,33 @@ type Planningperiodsettings struct { } +func (u *Planningperiodsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Planningperiodsettings + + + StartDate := new(string) + if u.StartDate != nil { + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%d") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + WeekCount *int `json:"weekCount,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + *Alias + }{ + WeekCount: u.WeekCount, + + StartDate: StartDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Planningperiodsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policy.go b/platformclientv2/policy.go index f54f2ecd7..cf1f0ebe6 100644 --- a/platformclientv2/policy.go +++ b/platformclientv2/policy.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Policy struct { } +func (u *Policy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policy + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + Order *int `json:"order,omitempty"` + + Description *string `json:"description,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + MediaPolicies *Mediapolicies `json:"mediaPolicies,omitempty"` + + Conditions *Policyconditions `json:"conditions,omitempty"` + + Actions *Policyactions `json:"actions,omitempty"` + + PolicyErrors *Policyerrors `json:"policyErrors,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ModifiedDate: ModifiedDate, + + CreatedDate: CreatedDate, + + Order: u.Order, + + Description: u.Description, + + Enabled: u.Enabled, + + MediaPolicies: u.MediaPolicies, + + Conditions: u.Conditions, + + Actions: u.Actions, + + PolicyErrors: u.PolicyErrors, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policyactions.go b/platformclientv2/policyactions.go index 7b0ec480b..f8c07e120 100644 --- a/platformclientv2/policyactions.go +++ b/platformclientv2/policyactions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Policyactions struct { } +func (u *Policyactions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policyactions + + + + return json.Marshal(&struct { + RetainRecording *bool `json:"retainRecording,omitempty"` + + DeleteRecording *bool `json:"deleteRecording,omitempty"` + + AlwaysDelete *bool `json:"alwaysDelete,omitempty"` + + AssignEvaluations *[]Evaluationassignment `json:"assignEvaluations,omitempty"` + + AssignMeteredEvaluations *[]Meteredevaluationassignment `json:"assignMeteredEvaluations,omitempty"` + + AssignMeteredAssignmentByAgent *[]Meteredassignmentbyagent `json:"assignMeteredAssignmentByAgent,omitempty"` + + AssignCalibrations *[]Calibrationassignment `json:"assignCalibrations,omitempty"` + + AssignSurveys *[]Surveyassignment `json:"assignSurveys,omitempty"` + + RetentionDuration *Retentionduration `json:"retentionDuration,omitempty"` + + InitiateScreenRecording *Initiatescreenrecording `json:"initiateScreenRecording,omitempty"` + + MediaTranscriptions *[]Mediatranscription `json:"mediaTranscriptions,omitempty"` + + IntegrationExport *Integrationexport `json:"integrationExport,omitempty"` + *Alias + }{ + RetainRecording: u.RetainRecording, + + DeleteRecording: u.DeleteRecording, + + AlwaysDelete: u.AlwaysDelete, + + AssignEvaluations: u.AssignEvaluations, + + AssignMeteredEvaluations: u.AssignMeteredEvaluations, + + AssignMeteredAssignmentByAgent: u.AssignMeteredAssignmentByAgent, + + AssignCalibrations: u.AssignCalibrations, + + AssignSurveys: u.AssignSurveys, + + RetentionDuration: u.RetentionDuration, + + InitiateScreenRecording: u.InitiateScreenRecording, + + MediaTranscriptions: u.MediaTranscriptions, + + IntegrationExport: u.IntegrationExport, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policyactions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policyconditions.go b/platformclientv2/policyconditions.go index bab8867e5..a454b0e01 100644 --- a/platformclientv2/policyconditions.go +++ b/platformclientv2/policyconditions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Policyconditions struct { } +func (u *Policyconditions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policyconditions + + + + return json.Marshal(&struct { + ForUsers *[]User `json:"forUsers,omitempty"` + + Directions *[]string `json:"directions,omitempty"` + + DateRanges *[]string `json:"dateRanges,omitempty"` + + MediaTypes *[]string `json:"mediaTypes,omitempty"` + + ForQueues *[]Queue `json:"forQueues,omitempty"` + + Duration *Durationcondition `json:"duration,omitempty"` + + WrapupCodes *[]Wrapupcode `json:"wrapupCodes,omitempty"` + + TimeAllowed *Timeallowed `json:"timeAllowed,omitempty"` + *Alias + }{ + ForUsers: u.ForUsers, + + Directions: u.Directions, + + DateRanges: u.DateRanges, + + MediaTypes: u.MediaTypes, + + ForQueues: u.ForQueues, + + Duration: u.Duration, + + WrapupCodes: u.WrapupCodes, + + TimeAllowed: u.TimeAllowed, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policyconditions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policycreate.go b/platformclientv2/policycreate.go index 0ac392bcc..22fc8bbbc 100644 --- a/platformclientv2/policycreate.go +++ b/platformclientv2/policycreate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Policycreate struct { } +func (u *Policycreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policycreate + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + Order *int `json:"order,omitempty"` + + Description *string `json:"description,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + MediaPolicies *Mediapolicies `json:"mediaPolicies,omitempty"` + + Conditions *Policyconditions `json:"conditions,omitempty"` + + Actions *Policyactions `json:"actions,omitempty"` + + PolicyErrors *Policyerrors `json:"policyErrors,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ModifiedDate: ModifiedDate, + + CreatedDate: CreatedDate, + + Order: u.Order, + + Description: u.Description, + + Enabled: u.Enabled, + + MediaPolicies: u.MediaPolicies, + + Conditions: u.Conditions, + + Actions: u.Actions, + + PolicyErrors: u.PolicyErrors, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policycreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policyentitylisting.go b/platformclientv2/policyentitylisting.go index 69932ff98..380e2a68e 100644 --- a/platformclientv2/policyentitylisting.go +++ b/platformclientv2/policyentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Policyentitylisting struct { } +func (u *Policyentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policyentitylisting + + + + return json.Marshal(&struct { + Entities *[]Policy `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policyentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policyerrormessage.go b/platformclientv2/policyerrormessage.go index ab4e10495..bf0d7b73a 100644 --- a/platformclientv2/policyerrormessage.go +++ b/platformclientv2/policyerrormessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Policyerrormessage struct { } +func (u *Policyerrormessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policyerrormessage + + + InsertDate := new(string) + if u.InsertDate != nil { + + *InsertDate = timeutil.Strftime(u.InsertDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + InsertDate = nil + } + + + return json.Marshal(&struct { + StatusCode *int `json:"statusCode,omitempty"` + + UserMessage *interface{} `json:"userMessage,omitempty"` + + UserParamsMessage *string `json:"userParamsMessage,omitempty"` + + ErrorCode *string `json:"errorCode,omitempty"` + + CorrelationId *string `json:"correlationId,omitempty"` + + UserParams *[]Userparam `json:"userParams,omitempty"` + + InsertDate *string `json:"insertDate,omitempty"` + *Alias + }{ + StatusCode: u.StatusCode, + + UserMessage: u.UserMessage, + + UserParamsMessage: u.UserParamsMessage, + + ErrorCode: u.ErrorCode, + + CorrelationId: u.CorrelationId, + + UserParams: u.UserParams, + + InsertDate: InsertDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policyerrormessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policyerrors.go b/platformclientv2/policyerrors.go index 34724dc05..ac6c5a24e 100644 --- a/platformclientv2/policyerrors.go +++ b/platformclientv2/policyerrors.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Policyerrors struct { } +func (u *Policyerrors) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policyerrors + + + + return json.Marshal(&struct { + PolicyErrorMessages *[]Policyerrormessage `json:"policyErrorMessages,omitempty"` + *Alias + }{ + PolicyErrorMessages: u.PolicyErrorMessages, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policyerrors) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/policyupdate.go b/platformclientv2/policyupdate.go index 00a45716c..864661950 100644 --- a/platformclientv2/policyupdate.go +++ b/platformclientv2/policyupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Policyupdate struct { } +func (u *Policyupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Policyupdate + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Policyupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/postactioninput.go b/platformclientv2/postactioninput.go index 7e7cefd58..ce016e9c8 100644 --- a/platformclientv2/postactioninput.go +++ b/platformclientv2/postactioninput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Postactioninput struct { } +func (u *Postactioninput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Postactioninput + + + + return json.Marshal(&struct { + Category *string `json:"category,omitempty"` + + Name *string `json:"name,omitempty"` + + IntegrationId *string `json:"integrationId,omitempty"` + + Config *Actionconfig `json:"config,omitempty"` + + Contract *Actioncontractinput `json:"contract,omitempty"` + + Secure *bool `json:"secure,omitempty"` + *Alias + }{ + Category: u.Category, + + Name: u.Name, + + IntegrationId: u.IntegrationId, + + Config: u.Config, + + Contract: u.Contract, + + Secure: u.Secure, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Postactioninput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/postinputcontract.go b/platformclientv2/postinputcontract.go index 08abdcb1a..3d7ce31ba 100644 --- a/platformclientv2/postinputcontract.go +++ b/platformclientv2/postinputcontract.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Postinputcontract struct { } +func (u *Postinputcontract) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Postinputcontract + + + + return json.Marshal(&struct { + InputSchema *Jsonschemadocument `json:"inputSchema,omitempty"` + *Alias + }{ + InputSchema: u.InputSchema, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Postinputcontract) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/postoutputcontract.go b/platformclientv2/postoutputcontract.go index 2ea6f24a4..6d59d3a95 100644 --- a/platformclientv2/postoutputcontract.go +++ b/platformclientv2/postoutputcontract.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Postoutputcontract struct { } +func (u *Postoutputcontract) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Postoutputcontract + + + + return json.Marshal(&struct { + SuccessSchema *Jsonschemadocument `json:"successSchema,omitempty"` + *Alias + }{ + SuccessSchema: u.SuccessSchema, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Postoutputcontract) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/posttextmessage.go b/platformclientv2/posttextmessage.go index 635d32a37..5d3ac847d 100644 --- a/platformclientv2/posttextmessage.go +++ b/platformclientv2/posttextmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Posttextmessage struct { } +func (u *Posttextmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Posttextmessage + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Text *string `json:"text,omitempty"` + + Content *[]Messagecontent `json:"content,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Text: u.Text, + + Content: u.Content, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Posttextmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/posttextrequest.go b/platformclientv2/posttextrequest.go index 55f26f9f4..9402c28c2 100644 --- a/platformclientv2/posttextrequest.go +++ b/platformclientv2/posttextrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Posttextrequest struct { } +func (u *Posttextrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Posttextrequest + + + + return json.Marshal(&struct { + BotId *string `json:"botId,omitempty"` + + BotAlias *string `json:"botAlias,omitempty"` + + IntegrationId *string `json:"integrationId,omitempty"` + + BotSessionId *string `json:"botSessionId,omitempty"` + + PostTextMessage *Posttextmessage `json:"postTextMessage,omitempty"` + + LanguageCode *string `json:"languageCode,omitempty"` + + BotSessionTimeoutMinutes *int `json:"botSessionTimeoutMinutes,omitempty"` + + BotChannels *[]string `json:"botChannels,omitempty"` + + BotCorrelationId *string `json:"botCorrelationId,omitempty"` + + MessagingPlatformType *string `json:"messagingPlatformType,omitempty"` + + AmazonLexRequest *Amazonlexrequest `json:"amazonLexRequest,omitempty"` + + GoogleDialogflow *Googledialogflowcustomsettings `json:"googleDialogflow,omitempty"` + + GenesysBotConnector *Genesysbotconnector `json:"genesysBotConnector,omitempty"` + + NuanceMixDlg *Nuancemixdlgsettings `json:"nuanceMixDlg,omitempty"` + *Alias + }{ + BotId: u.BotId, + + BotAlias: u.BotAlias, + + IntegrationId: u.IntegrationId, + + BotSessionId: u.BotSessionId, + + PostTextMessage: u.PostTextMessage, + + LanguageCode: u.LanguageCode, + + BotSessionTimeoutMinutes: u.BotSessionTimeoutMinutes, + + BotChannels: u.BotChannels, + + BotCorrelationId: u.BotCorrelationId, + + MessagingPlatformType: u.MessagingPlatformType, + + AmazonLexRequest: u.AmazonLexRequest, + + GoogleDialogflow: u.GoogleDialogflow, + + GenesysBotConnector: u.GenesysBotConnector, + + NuanceMixDlg: u.NuanceMixDlg, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Posttextrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/posttextresponse.go b/platformclientv2/posttextresponse.go index 1ef40be16..5d3f3d176 100644 --- a/platformclientv2/posttextresponse.go +++ b/platformclientv2/posttextresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Posttextresponse struct { } +func (u *Posttextresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Posttextresponse + + + + return json.Marshal(&struct { + BotState *string `json:"botState,omitempty"` + + ReplyMessages *[]Posttextmessage `json:"replyMessages,omitempty"` + + IntentName *string `json:"intentName,omitempty"` + + Slots *map[string]string `json:"slots,omitempty"` + + BotCorrelationId *string `json:"botCorrelationId,omitempty"` + + AmazonLex *map[string]interface{} `json:"amazonLex,omitempty"` + + GoogleDialogFlow *map[string]interface{} `json:"googleDialogFlow,omitempty"` + + GenesysDialogEngine *map[string]interface{} `json:"genesysDialogEngine,omitempty"` + + GenesysBotConnector *map[string]interface{} `json:"genesysBotConnector,omitempty"` + + NuanceMixDlg *map[string]interface{} `json:"nuanceMixDlg,omitempty"` + *Alias + }{ + BotState: u.BotState, + + ReplyMessages: u.ReplyMessages, + + IntentName: u.IntentName, + + Slots: u.Slots, + + BotCorrelationId: u.BotCorrelationId, + + AmazonLex: u.AmazonLex, + + GoogleDialogFlow: u.GoogleDialogFlow, + + GenesysDialogEngine: u.GenesysDialogEngine, + + GenesysBotConnector: u.GenesysBotConnector, + + NuanceMixDlg: u.NuanceMixDlg, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Posttextresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/predictionresults.go b/platformclientv2/predictionresults.go index 9b24b63f1..19a50943c 100644 --- a/platformclientv2/predictionresults.go +++ b/platformclientv2/predictionresults.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Predictionresults struct { } +func (u *Predictionresults) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Predictionresults + + + + return json.Marshal(&struct { + Intent *string `json:"intent,omitempty"` + + Formula *string `json:"formula,omitempty"` + + EstimatedWaitTimeSeconds *int `json:"estimatedWaitTimeSeconds,omitempty"` + *Alias + }{ + Intent: u.Intent, + + Formula: u.Formula, + + EstimatedWaitTimeSeconds: u.EstimatedWaitTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Predictionresults) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/predictor.go b/platformclientv2/predictor.go index 1f1dace5d..966cefa73 100644 --- a/platformclientv2/predictor.go +++ b/platformclientv2/predictor.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Predictor struct { } +func (u *Predictor) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Predictor + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Queues *[]Addressableentityref `json:"queues,omitempty"` + + Kpi *string `json:"kpi,omitempty"` + + RoutingTimeoutSeconds *int `json:"routingTimeoutSeconds,omitempty"` + + Schedule *Predictorschedule `json:"schedule,omitempty"` + + State *string `json:"state,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + WorkloadBalancingConfig *Predictorworkloadbalancing `json:"workloadBalancingConfig,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Queues: u.Queues, + + Kpi: u.Kpi, + + RoutingTimeoutSeconds: u.RoutingTimeoutSeconds, + + Schedule: u.Schedule, + + State: u.State, + + DateCreated: DateCreated, + + DateModified: DateModified, + + WorkloadBalancingConfig: u.WorkloadBalancingConfig, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Predictor) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/predictorlisting.go b/platformclientv2/predictorlisting.go index 3eb1547a1..ff65bb608 100644 --- a/platformclientv2/predictorlisting.go +++ b/platformclientv2/predictorlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Predictorlisting struct { } +func (u *Predictorlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Predictorlisting + + + + return json.Marshal(&struct { + Entities *[]Predictor `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Predictorlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/predictorschedule.go b/platformclientv2/predictorschedule.go index 874b26ac3..a959bfcf3 100644 --- a/platformclientv2/predictorschedule.go +++ b/platformclientv2/predictorschedule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Predictorschedule struct { } +func (u *Predictorschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Predictorschedule + + + DateStarted := new(string) + if u.DateStarted != nil { + + *DateStarted = timeutil.Strftime(u.DateStarted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStarted = nil + } + + + return json.Marshal(&struct { + ScheduleType *string `json:"scheduleType,omitempty"` + + DateStarted *string `json:"dateStarted,omitempty"` + *Alias + }{ + ScheduleType: u.ScheduleType, + + DateStarted: DateStarted, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Predictorschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/predictorworkloadbalancing.go b/platformclientv2/predictorworkloadbalancing.go index 5b1083c26..123be13e3 100644 --- a/platformclientv2/predictorworkloadbalancing.go +++ b/platformclientv2/predictorworkloadbalancing.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Predictorworkloadbalancing struct { } +func (u *Predictorworkloadbalancing) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Predictorworkloadbalancing + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Predictorworkloadbalancing) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/presencedefinition.go b/platformclientv2/presencedefinition.go index e970f803b..0c177e048 100644 --- a/platformclientv2/presencedefinition.go +++ b/platformclientv2/presencedefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Presencedefinition struct { } +func (u *Presencedefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Presencedefinition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SystemPresence: u.SystemPresence, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Presencedefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/presencedetailqueryclause.go b/platformclientv2/presencedetailqueryclause.go index 95045df2c..975dbe113 100644 --- a/platformclientv2/presencedetailqueryclause.go +++ b/platformclientv2/presencedetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Presencedetailqueryclause struct { } +func (u *Presencedetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Presencedetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Presencedetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Presencedetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/presencedetailqueryfilter.go b/platformclientv2/presencedetailqueryfilter.go index 098f4b261..4728b0dcb 100644 --- a/platformclientv2/presencedetailqueryfilter.go +++ b/platformclientv2/presencedetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Presencedetailqueryfilter struct { } +func (u *Presencedetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Presencedetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Presencedetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Presencedetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Presencedetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/presencedetailquerypredicate.go b/platformclientv2/presencedetailquerypredicate.go index 70769e29e..fa5c33605 100644 --- a/platformclientv2/presencedetailquerypredicate.go +++ b/platformclientv2/presencedetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Presencedetailquerypredicate struct { } +func (u *Presencedetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Presencedetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Presencedetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/presenceeventorganizationpresence.go b/platformclientv2/presenceeventorganizationpresence.go index 22cf55437..795839497 100644 --- a/platformclientv2/presenceeventorganizationpresence.go +++ b/platformclientv2/presenceeventorganizationpresence.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Presenceeventorganizationpresence struct { } +func (u *Presenceeventorganizationpresence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Presenceeventorganizationpresence + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + *Alias + }{ + Id: u.Id, + + SystemPresence: u.SystemPresence, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Presenceeventorganizationpresence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/presenceeventuserpresence.go b/platformclientv2/presenceeventuserpresence.go index 882c2c42f..7b0fa8716 100644 --- a/platformclientv2/presenceeventuserpresence.go +++ b/platformclientv2/presenceeventuserpresence.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Presenceeventuserpresence struct { } +func (u *Presenceeventuserpresence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Presenceeventuserpresence + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Source *string `json:"source,omitempty"` + + PresenceDefinition *Presenceeventorganizationpresence `json:"presenceDefinition,omitempty"` + + Primary *bool `json:"primary,omitempty"` + + Message *string `json:"message,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Source: u.Source, + + PresenceDefinition: u.PresenceDefinition, + + Primary: u.Primary, + + Message: u.Message, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Presenceeventuserpresence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/presenceexpand.go b/platformclientv2/presenceexpand.go index b40c93476..a833b3e5a 100644 --- a/platformclientv2/presenceexpand.go +++ b/platformclientv2/presenceexpand.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Presenceexpand struct { } +func (u *Presenceexpand) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Presenceexpand + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Presences *[]Userpresence `json:"presences,omitempty"` + + OutOfOffices *[]Outofoffice `json:"outOfOffices,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Presences: u.Presences, + + OutOfOffices: u.OutOfOffices, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Presenceexpand) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/program.go b/platformclientv2/program.go index ec059f14d..a9fd91f93 100644 --- a/platformclientv2/program.go +++ b/platformclientv2/program.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,78 @@ type Program struct { } +func (u *Program) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Program + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DatePublished := new(string) + if u.DatePublished != nil { + + *DatePublished = timeutil.Strftime(u.DatePublished, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DatePublished = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + Topics *[]Basetopicentitiy `json:"topics,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + ModifiedBy *Addressableentityref `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + PublishedBy *Addressableentityref `json:"publishedBy,omitempty"` + + DatePublished *string `json:"datePublished,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Published: u.Published, + + Topics: u.Topics, + + Tags: u.Tags, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + PublishedBy: u.PublishedBy, + + DatePublished: DatePublished, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Program) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/programjob.go b/platformclientv2/programjob.go index 1559f4813..2d66c882f 100644 --- a/platformclientv2/programjob.go +++ b/platformclientv2/programjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Programjob struct { } +func (u *Programjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Programjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Programs *[]Baseprogramentity `json:"programs,omitempty"` + + CreatedBy *Addressableentityref `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Programs: u.Programs, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Programjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/programjobrequest.go b/platformclientv2/programjobrequest.go index 7586ca822..b0648f3c7 100644 --- a/platformclientv2/programjobrequest.go +++ b/platformclientv2/programjobrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Programjobrequest struct { } +func (u *Programjobrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Programjobrequest + + + + return json.Marshal(&struct { + ProgramIds *[]string `json:"programIds,omitempty"` + *Alias + }{ + ProgramIds: u.ProgramIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Programjobrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/programmappings.go b/platformclientv2/programmappings.go index 44765bf30..e5cdef253 100644 --- a/platformclientv2/programmappings.go +++ b/platformclientv2/programmappings.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Programmappings struct { } +func (u *Programmappings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Programmappings + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Program *Baseprogramentity `json:"program,omitempty"` + + Queues *[]Addressableentityref `json:"queues,omitempty"` + + Flows *[]Addressableentityref `json:"flows,omitempty"` + + ModifiedBy *Addressableentityref `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Program: u.Program, + + Queues: u.Queues, + + Flows: u.Flows, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Programmappings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/programmappingsrequest.go b/platformclientv2/programmappingsrequest.go index d286b4e91..999de59bd 100644 --- a/platformclientv2/programmappingsrequest.go +++ b/platformclientv2/programmappingsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Programmappingsrequest struct { } +func (u *Programmappingsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Programmappingsrequest + + + + return json.Marshal(&struct { + QueueIds *[]string `json:"queueIds,omitempty"` + + FlowIds *[]string `json:"flowIds,omitempty"` + *Alias + }{ + QueueIds: u.QueueIds, + + FlowIds: u.FlowIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Programmappingsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/programrequest.go b/platformclientv2/programrequest.go index 28b2591d0..89f87cf37 100644 --- a/platformclientv2/programrequest.go +++ b/platformclientv2/programrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Programrequest struct { } +func (u *Programrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Programrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + TopicIds *[]string `json:"topicIds,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + TopicIds: u.TopicIds, + + Tags: u.Tags, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Programrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/programsentitylisting.go b/platformclientv2/programsentitylisting.go index 11c773541..d1b7a717d 100644 --- a/platformclientv2/programsentitylisting.go +++ b/platformclientv2/programsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Programsentitylisting struct { } +func (u *Programsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Programsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Listedprogram `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Programsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/programsmappingsentitylisting.go b/platformclientv2/programsmappingsentitylisting.go index 8494fc2a7..56b39fcac 100644 --- a/platformclientv2/programsmappingsentitylisting.go +++ b/platformclientv2/programsmappingsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Programsmappingsentitylisting struct { } +func (u *Programsmappingsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Programsmappingsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Programmappings `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Programsmappingsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/prompt.go b/platformclientv2/prompt.go index 118029c91..e48fabd0d 100644 --- a/platformclientv2/prompt.go +++ b/platformclientv2/prompt.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Prompt struct { } +func (u *Prompt) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Prompt + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Resources *[]Promptasset `json:"resources,omitempty"` + + CurrentOperation *Operation `json:"currentOperation,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Resources: u.Resources, + + CurrentOperation: u.CurrentOperation, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Prompt) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/promptasset.go b/platformclientv2/promptasset.go index b3466a688..1da09f1c4 100644 --- a/platformclientv2/promptasset.go +++ b/platformclientv2/promptasset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -60,6 +61,70 @@ type Promptasset struct { } +func (u *Promptasset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Promptasset + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PromptId *string `json:"promptId,omitempty"` + + Language *string `json:"language,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + TtsString *string `json:"ttsString,omitempty"` + + Text *string `json:"text,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + + UploadUri *string `json:"uploadUri,omitempty"` + + LanguageDefault *bool `json:"languageDefault,omitempty"` + + Tags *map[string][]string `json:"tags,omitempty"` + + DurationSeconds *float64 `json:"durationSeconds,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PromptId: u.PromptId, + + Language: u.Language, + + MediaUri: u.MediaUri, + + TtsString: u.TtsString, + + Text: u.Text, + + UploadStatus: u.UploadStatus, + + UploadUri: u.UploadUri, + + LanguageDefault: u.LanguageDefault, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Promptasset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/promptassetcreate.go b/platformclientv2/promptassetcreate.go index edd06e15e..c26cf82c3 100644 --- a/platformclientv2/promptassetcreate.go +++ b/platformclientv2/promptassetcreate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -60,6 +61,70 @@ type Promptassetcreate struct { } +func (u *Promptassetcreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Promptassetcreate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PromptId *string `json:"promptId,omitempty"` + + Language *string `json:"language,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + TtsString *string `json:"ttsString,omitempty"` + + Text *string `json:"text,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + + UploadUri *string `json:"uploadUri,omitempty"` + + LanguageDefault *bool `json:"languageDefault,omitempty"` + + Tags *map[string][]string `json:"tags,omitempty"` + + DurationSeconds *float64 `json:"durationSeconds,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PromptId: u.PromptId, + + Language: u.Language, + + MediaUri: u.MediaUri, + + TtsString: u.TtsString, + + Text: u.Text, + + UploadStatus: u.UploadStatus, + + UploadUri: u.UploadUri, + + LanguageDefault: u.LanguageDefault, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Promptassetcreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/promptassetentitylisting.go b/platformclientv2/promptassetentitylisting.go index 2f87e4220..9f18f2589 100644 --- a/platformclientv2/promptassetentitylisting.go +++ b/platformclientv2/promptassetentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Promptassetentitylisting struct { } +func (u *Promptassetentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Promptassetentitylisting + + + + return json.Marshal(&struct { + Entities *[]Promptasset `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Promptassetentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/promptentitylisting.go b/platformclientv2/promptentitylisting.go index fbfef38f0..f45b60d32 100644 --- a/platformclientv2/promptentitylisting.go +++ b/platformclientv2/promptentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Promptentitylisting struct { } +func (u *Promptentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Promptentitylisting + + + + return json.Marshal(&struct { + Entities *[]Prompt `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Promptentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/propertychange.go b/platformclientv2/propertychange.go index bf12d645e..81da2c305 100644 --- a/platformclientv2/propertychange.go +++ b/platformclientv2/propertychange.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Propertychange struct { } +func (u *Propertychange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Propertychange + + + + return json.Marshal(&struct { + Property *string `json:"property,omitempty"` + + OldValues *[]string `json:"oldValues,omitempty"` + + NewValues *[]string `json:"newValues,omitempty"` + *Alias + }{ + Property: u.Property, + + OldValues: u.OldValues, + + NewValues: u.NewValues, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Propertychange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/propertyindexrequest.go b/platformclientv2/propertyindexrequest.go index 61d97ba38..8941d5a81 100644 --- a/platformclientv2/propertyindexrequest.go +++ b/platformclientv2/propertyindexrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Propertyindexrequest struct { } +func (u *Propertyindexrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Propertyindexrequest + + + TargetDate := new(string) + if u.TargetDate != nil { + + *TargetDate = timeutil.Strftime(u.TargetDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + TargetDate = nil + } + + + return json.Marshal(&struct { + SessionId *string `json:"sessionId,omitempty"` + + TargetDate *string `json:"targetDate,omitempty"` + + Properties *[]Analyticsproperty `json:"properties,omitempty"` + *Alias + }{ + SessionId: u.SessionId, + + TargetDate: TargetDate, + + Properties: u.Properties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Propertyindexrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/provisioninfo.go b/platformclientv2/provisioninfo.go index 5fab6564f..fd50bb72b 100644 --- a/platformclientv2/provisioninfo.go +++ b/platformclientv2/provisioninfo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Provisioninfo struct { } +func (u *Provisioninfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Provisioninfo + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + + return json.Marshal(&struct { + Time *string `json:"time,omitempty"` + + Source *string `json:"source,omitempty"` + + ErrorInfo *string `json:"errorInfo,omitempty"` + *Alias + }{ + Time: Time, + + Source: u.Source, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Provisioninfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/publishdraftinput.go b/platformclientv2/publishdraftinput.go index 982fe0b47..2cc1f94f7 100644 --- a/platformclientv2/publishdraftinput.go +++ b/platformclientv2/publishdraftinput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Publishdraftinput struct { } +func (u *Publishdraftinput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Publishdraftinput + + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + *Alias + }{ + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Publishdraftinput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/publishedsurveyformreference.go b/platformclientv2/publishedsurveyformreference.go index 77f00a913..90d981539 100644 --- a/platformclientv2/publishedsurveyformreference.go +++ b/platformclientv2/publishedsurveyformreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Publishedsurveyformreference struct { } +func (u *Publishedsurveyformreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Publishedsurveyformreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ContextId: u.ContextId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Publishedsurveyformreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/publishform.go b/platformclientv2/publishform.go index 9b049a1a3..ab9b54dca 100644 --- a/platformclientv2/publishform.go +++ b/platformclientv2/publishform.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Publishform struct { } +func (u *Publishform) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Publishform + + + + return json.Marshal(&struct { + Published *bool `json:"published,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Published: u.Published, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Publishform) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/publishprogrampublishjob.go b/platformclientv2/publishprogrampublishjob.go index 87a526d89..940fb8d01 100644 --- a/platformclientv2/publishprogrampublishjob.go +++ b/platformclientv2/publishprogrampublishjob.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Publishprogrampublishjob struct { } +func (u *Publishprogrampublishjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Publishprogrampublishjob + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Publishprogrampublishjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/publishtopicpublishjob.go b/platformclientv2/publishtopicpublishjob.go index 9135b3e27..cce9c7fe5 100644 --- a/platformclientv2/publishtopicpublishjob.go +++ b/platformclientv2/publishtopicpublishjob.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Publishtopicpublishjob struct { } +func (u *Publishtopicpublishjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Publishtopicpublishjob + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Publishtopicpublishjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/punctualityevent.go b/platformclientv2/punctualityevent.go index 023830c3b..309290f81 100644 --- a/platformclientv2/punctualityevent.go +++ b/platformclientv2/punctualityevent.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Punctualityevent struct { } +func (u *Punctualityevent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Punctualityevent + + + DateScheduleStart := new(string) + if u.DateScheduleStart != nil { + + *DateScheduleStart = timeutil.Strftime(u.DateScheduleStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateScheduleStart = nil + } + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + DateScheduleStart *string `json:"dateScheduleStart,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + LengthMinutes *int `json:"lengthMinutes,omitempty"` + + Description *string `json:"description,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + ActivityCode *string `json:"activityCode,omitempty"` + + Category *string `json:"category,omitempty"` + + Points *int `json:"points,omitempty"` + + Delta *float64 `json:"delta,omitempty"` + + Bullseye *bool `json:"bullseye,omitempty"` + *Alias + }{ + DateScheduleStart: DateScheduleStart, + + DateStart: DateStart, + + LengthMinutes: u.LengthMinutes, + + Description: u.Description, + + ActivityCodeId: u.ActivityCodeId, + + ActivityCode: u.ActivityCode, + + Category: u.Category, + + Points: u.Points, + + Delta: u.Delta, + + Bullseye: u.Bullseye, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Punctualityevent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/purecloud.go b/platformclientv2/purecloud.go index b619be054..f6547cab5 100644 --- a/platformclientv2/purecloud.go +++ b/platformclientv2/purecloud.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Purecloud struct { } +func (u *Purecloud) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Purecloud + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Purecloud) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/pureengage.go b/platformclientv2/pureengage.go index 65a14d3c1..13d66501c 100644 --- a/platformclientv2/pureengage.go +++ b/platformclientv2/pureengage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Pureengage struct { } +func (u *Pureengage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Pureengage + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + AutoProvisionUsers *bool `json:"autoProvisionUsers,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + AutoProvisionUsers: u.AutoProvisionUsers, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Pureengage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/qmauditqueryrequest.go b/platformclientv2/qmauditqueryrequest.go index 4378ffbd9..c513e33f8 100644 --- a/platformclientv2/qmauditqueryrequest.go +++ b/platformclientv2/qmauditqueryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Qmauditqueryrequest struct { } +func (u *Qmauditqueryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Qmauditqueryrequest + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Filters *[]Qualityauditqueryfilter `json:"filters,omitempty"` + + Sort *[]Auditquerysort `json:"sort,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Filters: u.Filters, + + Sort: u.Sort, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Qmauditqueryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/qualityauditlogmessage.go b/platformclientv2/qualityauditlogmessage.go index 62be0bfa0..4b97c6012 100644 --- a/platformclientv2/qualityauditlogmessage.go +++ b/platformclientv2/qualityauditlogmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,90 @@ type Qualityauditlogmessage struct { } +func (u *Qualityauditlogmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Qualityauditlogmessage + + + EventDate := new(string) + if u.EventDate != nil { + + *EventDate = timeutil.Strftime(u.EventDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UserHomeOrgId *string `json:"userHomeOrgId,omitempty"` + + UserTrusteeOrgId *string `json:"userTrusteeOrgId,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Client *Addressableentityref `json:"client,omitempty"` + + RemoteIps *[]string `json:"remoteIps,omitempty"` + + ServiceName *string `json:"serviceName,omitempty"` + + Level *string `json:"level,omitempty"` + + Status *string `json:"status,omitempty"` + + EventDate *string `json:"eventDate,omitempty"` + + MessageInfo *Messageinfo `json:"messageInfo,omitempty"` + + Action *string `json:"action,omitempty"` + + Entity *Domainentityref `json:"entity,omitempty"` + + EntityType *string `json:"entityType,omitempty"` + + PropertyChanges *[]Propertychange `json:"propertyChanges,omitempty"` + + Context *map[string]string `json:"context,omitempty"` + *Alias + }{ + Id: u.Id, + + UserHomeOrgId: u.UserHomeOrgId, + + UserTrusteeOrgId: u.UserTrusteeOrgId, + + User: u.User, + + Client: u.Client, + + RemoteIps: u.RemoteIps, + + ServiceName: u.ServiceName, + + Level: u.Level, + + Status: u.Status, + + EventDate: EventDate, + + MessageInfo: u.MessageInfo, + + Action: u.Action, + + Entity: u.Entity, + + EntityType: u.EntityType, + + PropertyChanges: u.PropertyChanges, + + Context: u.Context, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Qualityauditlogmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/qualityauditqueryexecutionresultsresponse.go b/platformclientv2/qualityauditqueryexecutionresultsresponse.go index 02403e20d..b00d2a15c 100644 --- a/platformclientv2/qualityauditqueryexecutionresultsresponse.go +++ b/platformclientv2/qualityauditqueryexecutionresultsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Qualityauditqueryexecutionresultsresponse struct { } +func (u *Qualityauditqueryexecutionresultsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Qualityauditqueryexecutionresultsresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + Cursor *string `json:"cursor,omitempty"` + + Entities *[]Qualityauditlogmessage `json:"entities,omitempty"` + *Alias + }{ + Id: u.Id, + + PageSize: u.PageSize, + + Cursor: u.Cursor, + + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Qualityauditqueryexecutionresultsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/qualityauditqueryexecutionstatusresponse.go b/platformclientv2/qualityauditqueryexecutionstatusresponse.go index 88e7c9ff2..de24ad4ea 100644 --- a/platformclientv2/qualityauditqueryexecutionstatusresponse.go +++ b/platformclientv2/qualityauditqueryexecutionstatusresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Qualityauditqueryexecutionstatusresponse struct { } +func (u *Qualityauditqueryexecutionstatusresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Qualityauditqueryexecutionstatusresponse + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + Interval *string `json:"interval,omitempty"` + + Filters *[]Qualityauditqueryfilter `json:"filters,omitempty"` + + Sort *[]Auditquerysort `json:"sort,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + DateStart: DateStart, + + Interval: u.Interval, + + Filters: u.Filters, + + Sort: u.Sort, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Qualityauditqueryexecutionstatusresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/qualityauditqueryfilter.go b/platformclientv2/qualityauditqueryfilter.go index 2d4d416e6..74be051ee 100644 --- a/platformclientv2/qualityauditqueryfilter.go +++ b/platformclientv2/qualityauditqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Qualityauditqueryfilter struct { } +func (u *Qualityauditqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Qualityauditqueryfilter + + + + return json.Marshal(&struct { + Property *string `json:"property,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Property: u.Property, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Qualityauditqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/querydivision.go b/platformclientv2/querydivision.go index bb0f032c4..23611bb6e 100644 --- a/platformclientv2/querydivision.go +++ b/platformclientv2/querydivision.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Querydivision type Querydivision struct { } +func (u *Querydivision) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Querydivision + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Querydivision) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryfacetinfo.go b/platformclientv2/queryfacetinfo.go index 33a135433..f737d12ca 100644 --- a/platformclientv2/queryfacetinfo.go +++ b/platformclientv2/queryfacetinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryfacetinfo struct { } +func (u *Queryfacetinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryfacetinfo + + + + return json.Marshal(&struct { + Attributes *[]Facetkeyattribute `json:"attributes,omitempty"` + + Facets *[]Facetentry `json:"facets,omitempty"` + *Alias + }{ + Attributes: u.Attributes, + + Facets: u.Facets, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryfacetinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryrequest.go b/platformclientv2/queryrequest.go index 354ce3a4a..5b9012b77 100644 --- a/platformclientv2/queryrequest.go +++ b/platformclientv2/queryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queryrequest struct { } +func (u *Queryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryrequest + + + + return json.Marshal(&struct { + QueryPhrase *string `json:"queryPhrase,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + FacetNameRequests *[]string `json:"facetNameRequests,omitempty"` + + Sort *[]Sortitem `json:"sort,omitempty"` + + Filters *[]Contentfilteritem `json:"filters,omitempty"` + + AttributeFilters *[]Attributefilteritem `json:"attributeFilters,omitempty"` + + IncludeShares *bool `json:"includeShares,omitempty"` + *Alias + }{ + QueryPhrase: u.QueryPhrase, + + PageNumber: u.PageNumber, + + PageSize: u.PageSize, + + FacetNameRequests: u.FacetNameRequests, + + Sort: u.Sort, + + Filters: u.Filters, + + AttributeFilters: u.AttributeFilters, + + IncludeShares: u.IncludeShares, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryrequestclause.go b/platformclientv2/queryrequestclause.go index a24556a92..9db7a56eb 100644 --- a/platformclientv2/queryrequestclause.go +++ b/platformclientv2/queryrequestclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryrequestclause struct { } +func (u *Queryrequestclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryrequestclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Queryrequestpredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryrequestclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryrequestfilter.go b/platformclientv2/queryrequestfilter.go index 620a39f37..caf8af48d 100644 --- a/platformclientv2/queryrequestfilter.go +++ b/platformclientv2/queryrequestfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryrequestfilter struct { } +func (u *Queryrequestfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryrequestfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Queryrequestclause `json:"clauses,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryrequestfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryrequestpredicate.go b/platformclientv2/queryrequestpredicate.go index 816722a0f..1097292bd 100644 --- a/platformclientv2/queryrequestpredicate.go +++ b/platformclientv2/queryrequestpredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryrequestpredicate struct { } +func (u *Queryrequestpredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryrequestpredicate + + + + return json.Marshal(&struct { + Dimension *string `json:"dimension,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Dimension: u.Dimension, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryrequestpredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryresponsedata.go b/platformclientv2/queryresponsedata.go index f98bc5c97..a75669e1d 100644 --- a/platformclientv2/queryresponsedata.go +++ b/platformclientv2/queryresponsedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryresponsedata struct { } +func (u *Queryresponsedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryresponsedata + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Queryresponsemetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryresponsedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryresponsegroupeddata.go b/platformclientv2/queryresponsegroupeddata.go index d5de777a0..9f342e347 100644 --- a/platformclientv2/queryresponsegroupeddata.go +++ b/platformclientv2/queryresponsegroupeddata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryresponsegroupeddata struct { } +func (u *Queryresponsegroupeddata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryresponsegroupeddata + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Queryresponsedata `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryresponsegroupeddata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryresponsemetric.go b/platformclientv2/queryresponsemetric.go index 1e4ed8742..018ceea2f 100644 --- a/platformclientv2/queryresponsemetric.go +++ b/platformclientv2/queryresponsemetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryresponsemetric struct { } +func (u *Queryresponsemetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryresponsemetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Stats *Queryresponsestats `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryresponsemetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryresponsestats.go b/platformclientv2/queryresponsestats.go index d37eab32a..075b95211 100644 --- a/platformclientv2/queryresponsestats.go +++ b/platformclientv2/queryresponsestats.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Queryresponsestats struct { } +func (u *Queryresponsestats) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryresponsestats + + + + return json.Marshal(&struct { + Count *int `json:"count,omitempty"` + *Alias + }{ + Count: u.Count, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryresponsestats) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryresult.go b/platformclientv2/queryresult.go index 39c856ba1..e8ad8a03c 100644 --- a/platformclientv2/queryresult.go +++ b/platformclientv2/queryresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queryresult struct { } +func (u *Queryresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryresult + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Body *Domainentity `json:"body,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Body: u.Body, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queryresults.go b/platformclientv2/queryresults.go index fc088addf..9a2ef0d0c 100644 --- a/platformclientv2/queryresults.go +++ b/platformclientv2/queryresults.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queryresults struct { } +func (u *Queryresults) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queryresults + + + + return json.Marshal(&struct { + Results *Domainentitylistingqueryresult `json:"results,omitempty"` + + FacetInfo *Queryfacetinfo `json:"facetInfo,omitempty"` + *Alias + }{ + Results: u.Results, + + FacetInfo: u.FacetInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queryresults) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queue.go b/platformclientv2/queue.go index 59241c3df..17ec66ea0 100644 --- a/platformclientv2/queue.go +++ b/platformclientv2/queue.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,138 @@ type Queue struct { } +func (u *Queue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queue + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + JoinedMemberCount *int `json:"joinedMemberCount,omitempty"` + + MediaSettings *map[string]Mediasetting `json:"mediaSettings,omitempty"` + + RoutingRules *[]Routingrule `json:"routingRules,omitempty"` + + Bullseye *Bullseye `json:"bullseye,omitempty"` + + AcwSettings *Acwsettings `json:"acwSettings,omitempty"` + + SkillEvaluationMethod *string `json:"skillEvaluationMethod,omitempty"` + + QueueFlow *Domainentityref `json:"queueFlow,omitempty"` + + WhisperPrompt *Domainentityref `json:"whisperPrompt,omitempty"` + + AutoAnswerOnly *bool `json:"autoAnswerOnly,omitempty"` + + EnableTranscription *bool `json:"enableTranscription,omitempty"` + + EnableManualAssignment *bool `json:"enableManualAssignment,omitempty"` + + CallingPartyName *string `json:"callingPartyName,omitempty"` + + CallingPartyNumber *string `json:"callingPartyNumber,omitempty"` + + DefaultScripts *map[string]Script `json:"defaultScripts,omitempty"` + + OutboundMessagingAddresses *Queuemessagingaddresses `json:"outboundMessagingAddresses,omitempty"` + + OutboundEmailAddress *Queueemailaddress `json:"outboundEmailAddress,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + MemberCount: u.MemberCount, + + JoinedMemberCount: u.JoinedMemberCount, + + MediaSettings: u.MediaSettings, + + RoutingRules: u.RoutingRules, + + Bullseye: u.Bullseye, + + AcwSettings: u.AcwSettings, + + SkillEvaluationMethod: u.SkillEvaluationMethod, + + QueueFlow: u.QueueFlow, + + WhisperPrompt: u.WhisperPrompt, + + AutoAnswerOnly: u.AutoAnswerOnly, + + EnableTranscription: u.EnableTranscription, + + EnableManualAssignment: u.EnableManualAssignment, + + CallingPartyName: u.CallingPartyName, + + CallingPartyNumber: u.CallingPartyNumber, + + DefaultScripts: u.DefaultScripts, + + OutboundMessagingAddresses: u.OutboundMessagingAddresses, + + OutboundEmailAddress: u.OutboundEmailAddress, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopiccallbackconversation.go b/platformclientv2/queueconversationcallbackeventtopiccallbackconversation.go index 6b3455fae..11b9af29a 100644 --- a/platformclientv2/queueconversationcallbackeventtopiccallbackconversation.go +++ b/platformclientv2/queueconversationcallbackeventtopiccallbackconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationcallbackeventtopiccallbackconversation struct { } +func (u *Queueconversationcallbackeventtopiccallbackconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopiccallbackconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Queueconversationcallbackeventtopiccallbackmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopiccallbackconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopiccallbackmediaparticipant.go b/platformclientv2/queueconversationcallbackeventtopiccallbackmediaparticipant.go index 0e464b398..0f3191859 100644 --- a/platformclientv2/queueconversationcallbackeventtopiccallbackmediaparticipant.go +++ b/platformclientv2/queueconversationcallbackeventtopiccallbackmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -181,6 +182,246 @@ type Queueconversationcallbackeventtopiccallbackmediaparticipant struct { } +func (u *Queueconversationcallbackeventtopiccallbackmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopiccallbackmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Queueconversationcallbackeventtopicurireference `json:"user,omitempty"` + + Queue *Queueconversationcallbackeventtopicurireference `json:"queue,omitempty"` + + Team *Queueconversationcallbackeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Queueconversationcallbackeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Queueconversationcallbackeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Queueconversationcallbackeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Queueconversationcallbackeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Queueconversationcallbackeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Queueconversationcallbackeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Queueconversationcallbackeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + OutboundPreview *Queueconversationcallbackeventtopicdialerpreview `json:"outboundPreview,omitempty"` + + Voicemail *Queueconversationcallbackeventtopicvoicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + OutboundPreview: u.OutboundPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + SkipEnabled: u.SkipEnabled, + + ExternalCampaign: u.ExternalCampaign, + + TimeoutSeconds: u.TimeoutSeconds, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopiccallbackmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicconversationroutingdata.go b/platformclientv2/queueconversationcallbackeventtopicconversationroutingdata.go index 2fb77541e..521925f92 100644 --- a/platformclientv2/queueconversationcallbackeventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationcallbackeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationcallbackeventtopicconversationroutingdata struct { } +func (u *Queueconversationcallbackeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationcallbackeventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationcallbackeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationcallbackeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationcallbackeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicdetail.go b/platformclientv2/queueconversationcallbackeventtopicdetail.go index da999b86f..340d72599 100644 --- a/platformclientv2/queueconversationcallbackeventtopicdetail.go +++ b/platformclientv2/queueconversationcallbackeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationcallbackeventtopicdetail struct { } +func (u *Queueconversationcallbackeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicdialerpreview.go b/platformclientv2/queueconversationcallbackeventtopicdialerpreview.go index 15e8a1b35..04bdc5184 100644 --- a/platformclientv2/queueconversationcallbackeventtopicdialerpreview.go +++ b/platformclientv2/queueconversationcallbackeventtopicdialerpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationcallbackeventtopicdialerpreview struct { } +func (u *Queueconversationcallbackeventtopicdialerpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicdialerpreview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + CampaignId *string `json:"campaignId,omitempty"` + + PhoneNumberColumns *[]Queueconversationcallbackeventtopicphonenumbercolumn `json:"phoneNumberColumns,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactId: u.ContactId, + + ContactListId: u.ContactListId, + + CampaignId: u.CampaignId, + + PhoneNumberColumns: u.PhoneNumberColumns, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicdialerpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicerrorbody.go b/platformclientv2/queueconversationcallbackeventtopicerrorbody.go index eac8a578c..de8cbe60c 100644 --- a/platformclientv2/queueconversationcallbackeventtopicerrorbody.go +++ b/platformclientv2/queueconversationcallbackeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueconversationcallbackeventtopicerrorbody struct { } +func (u *Queueconversationcallbackeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Queueconversationcallbackeventtopicdetail `json:"details,omitempty"` + + Errors *[]Queueconversationcallbackeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicjourneyaction.go b/platformclientv2/queueconversationcallbackeventtopicjourneyaction.go index da4d33d4e..1e254c8dd 100644 --- a/platformclientv2/queueconversationcallbackeventtopicjourneyaction.go +++ b/platformclientv2/queueconversationcallbackeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcallbackeventtopicjourneyaction struct { } +func (u *Queueconversationcallbackeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationcallbackeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicjourneyactionmap.go b/platformclientv2/queueconversationcallbackeventtopicjourneyactionmap.go index 124998040..5a2618063 100644 --- a/platformclientv2/queueconversationcallbackeventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationcallbackeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcallbackeventtopicjourneyactionmap struct { } +func (u *Queueconversationcallbackeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicjourneycontext.go b/platformclientv2/queueconversationcallbackeventtopicjourneycontext.go index 58176adec..881b30206 100644 --- a/platformclientv2/queueconversationcallbackeventtopicjourneycontext.go +++ b/platformclientv2/queueconversationcallbackeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationcallbackeventtopicjourneycontext struct { } +func (u *Queueconversationcallbackeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationcallbackeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationcallbackeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationcallbackeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicjourneycustomer.go b/platformclientv2/queueconversationcallbackeventtopicjourneycustomer.go index b4c16a7d0..b0c2f3733 100644 --- a/platformclientv2/queueconversationcallbackeventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationcallbackeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcallbackeventtopicjourneycustomer struct { } +func (u *Queueconversationcallbackeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicjourneycustomersession.go b/platformclientv2/queueconversationcallbackeventtopicjourneycustomersession.go index 505a9745f..194e6f161 100644 --- a/platformclientv2/queueconversationcallbackeventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationcallbackeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcallbackeventtopicjourneycustomersession struct { } +func (u *Queueconversationcallbackeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicphonenumbercolumn.go b/platformclientv2/queueconversationcallbackeventtopicphonenumbercolumn.go index 53df99d66..f468126c2 100644 --- a/platformclientv2/queueconversationcallbackeventtopicphonenumbercolumn.go +++ b/platformclientv2/queueconversationcallbackeventtopicphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationcallbackeventtopicphonenumbercolumn struct { } +func (u *Queueconversationcallbackeventtopicphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicscoredagent.go b/platformclientv2/queueconversationcallbackeventtopicscoredagent.go index eb5c8d608..dbde5c0c8 100644 --- a/platformclientv2/queueconversationcallbackeventtopicscoredagent.go +++ b/platformclientv2/queueconversationcallbackeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcallbackeventtopicscoredagent struct { } +func (u *Queueconversationcallbackeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationcallbackeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicurireference.go b/platformclientv2/queueconversationcallbackeventtopicurireference.go index fcc0c63e6..a7e9dac45 100644 --- a/platformclientv2/queueconversationcallbackeventtopicurireference.go +++ b/platformclientv2/queueconversationcallbackeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcallbackeventtopicurireference struct { } +func (u *Queueconversationcallbackeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicvoicemail.go b/platformclientv2/queueconversationcallbackeventtopicvoicemail.go index 1b4e95f58..0246226a2 100644 --- a/platformclientv2/queueconversationcallbackeventtopicvoicemail.go +++ b/platformclientv2/queueconversationcallbackeventtopicvoicemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcallbackeventtopicvoicemail struct { } +func (u *Queueconversationcallbackeventtopicvoicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicvoicemail + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + UploadStatus: u.UploadStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicvoicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcallbackeventtopicwrapup.go b/platformclientv2/queueconversationcallbackeventtopicwrapup.go index 272fa3291..0866bb53e 100644 --- a/platformclientv2/queueconversationcallbackeventtopicwrapup.go +++ b/platformclientv2/queueconversationcallbackeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationcallbackeventtopicwrapup struct { } +func (u *Queueconversationcallbackeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcallbackeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcallbackeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopiccallconversation.go b/platformclientv2/queueconversationcalleventtopiccallconversation.go index 2c760a800..661a835f9 100644 --- a/platformclientv2/queueconversationcalleventtopiccallconversation.go +++ b/platformclientv2/queueconversationcalleventtopiccallconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationcalleventtopiccallconversation struct { } +func (u *Queueconversationcalleventtopiccallconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopiccallconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Queueconversationcalleventtopiccallmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + + RecordingState: u.RecordingState, + + MaxParticipants: u.MaxParticipants, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopiccallconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopiccallmediaparticipant.go b/platformclientv2/queueconversationcalleventtopiccallmediaparticipant.go index c82549947..5bedb6b83 100644 --- a/platformclientv2/queueconversationcalleventtopiccallmediaparticipant.go +++ b/platformclientv2/queueconversationcalleventtopiccallmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -193,6 +194,250 @@ type Queueconversationcalleventtopiccallmediaparticipant struct { } +func (u *Queueconversationcalleventtopiccallmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopiccallmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Queueconversationcalleventtopicurireference `json:"user,omitempty"` + + Queue *Queueconversationcalleventtopicurireference `json:"queue,omitempty"` + + Team *Queueconversationcalleventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Queueconversationcalleventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Queueconversationcalleventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Queueconversationcalleventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Queueconversationcalleventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Queueconversationcalleventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Queueconversationcalleventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Queueconversationcalleventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Group *Queueconversationcalleventtopicurireference `json:"group,omitempty"` + + Ani *string `json:"ani,omitempty"` + + Dnis *string `json:"dnis,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + FaxStatus *Queueconversationcalleventtopicfaxstatus `json:"faxStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Muted: u.Muted, + + Confined: u.Confined, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Group: u.Group, + + Ani: u.Ani, + + Dnis: u.Dnis, + + DocumentId: u.DocumentId, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + ConsultParticipantId: u.ConsultParticipantId, + + FaxStatus: u.FaxStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopiccallmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicconversationroutingdata.go b/platformclientv2/queueconversationcalleventtopicconversationroutingdata.go index d81909026..234f3689f 100644 --- a/platformclientv2/queueconversationcalleventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationcalleventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationcalleventtopicconversationroutingdata struct { } +func (u *Queueconversationcalleventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationcalleventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationcalleventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationcalleventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationcalleventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicdetail.go b/platformclientv2/queueconversationcalleventtopicdetail.go index 32ed4f4c4..7d45f729f 100644 --- a/platformclientv2/queueconversationcalleventtopicdetail.go +++ b/platformclientv2/queueconversationcalleventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationcalleventtopicdetail struct { } +func (u *Queueconversationcalleventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicerrorbody.go b/platformclientv2/queueconversationcalleventtopicerrorbody.go index 03a3f70fc..021a9112c 100644 --- a/platformclientv2/queueconversationcalleventtopicerrorbody.go +++ b/platformclientv2/queueconversationcalleventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueconversationcalleventtopicerrorbody struct { } +func (u *Queueconversationcalleventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Queueconversationcalleventtopicdetail `json:"details,omitempty"` + + Errors *[]Queueconversationcalleventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicfaxstatus.go b/platformclientv2/queueconversationcalleventtopicfaxstatus.go index 488a0126d..c01c5e8d8 100644 --- a/platformclientv2/queueconversationcalleventtopicfaxstatus.go +++ b/platformclientv2/queueconversationcalleventtopicfaxstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queueconversationcalleventtopicfaxstatus struct { } +func (u *Queueconversationcalleventtopicfaxstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicfaxstatus + + + + return json.Marshal(&struct { + Direction *string `json:"direction,omitempty"` + + ExpectedPages *int `json:"expectedPages,omitempty"` + + ActivePage *int `json:"activePage,omitempty"` + + LinesTransmitted *int `json:"linesTransmitted,omitempty"` + + BytesTransmitted *int `json:"bytesTransmitted,omitempty"` + + DataRate *int `json:"dataRate,omitempty"` + + PageErrors *int `json:"pageErrors,omitempty"` + + LineErrors *int `json:"lineErrors,omitempty"` + *Alias + }{ + Direction: u.Direction, + + ExpectedPages: u.ExpectedPages, + + ActivePage: u.ActivePage, + + LinesTransmitted: u.LinesTransmitted, + + BytesTransmitted: u.BytesTransmitted, + + DataRate: u.DataRate, + + PageErrors: u.PageErrors, + + LineErrors: u.LineErrors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicfaxstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicjourneyaction.go b/platformclientv2/queueconversationcalleventtopicjourneyaction.go index c01e8e32b..a05d34e44 100644 --- a/platformclientv2/queueconversationcalleventtopicjourneyaction.go +++ b/platformclientv2/queueconversationcalleventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcalleventtopicjourneyaction struct { } +func (u *Queueconversationcalleventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationcalleventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicjourneyactionmap.go b/platformclientv2/queueconversationcalleventtopicjourneyactionmap.go index f833dae85..beeab4b8b 100644 --- a/platformclientv2/queueconversationcalleventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationcalleventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcalleventtopicjourneyactionmap struct { } +func (u *Queueconversationcalleventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicjourneycontext.go b/platformclientv2/queueconversationcalleventtopicjourneycontext.go index 564751918..53c41eeeb 100644 --- a/platformclientv2/queueconversationcalleventtopicjourneycontext.go +++ b/platformclientv2/queueconversationcalleventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationcalleventtopicjourneycontext struct { } +func (u *Queueconversationcalleventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationcalleventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationcalleventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationcalleventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicjourneycustomer.go b/platformclientv2/queueconversationcalleventtopicjourneycustomer.go index 6f413edf4..356817ab4 100644 --- a/platformclientv2/queueconversationcalleventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationcalleventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcalleventtopicjourneycustomer struct { } +func (u *Queueconversationcalleventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicjourneycustomersession.go b/platformclientv2/queueconversationcalleventtopicjourneycustomersession.go index b68e1c19b..14ba1067e 100644 --- a/platformclientv2/queueconversationcalleventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationcalleventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcalleventtopicjourneycustomersession struct { } +func (u *Queueconversationcalleventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicscoredagent.go b/platformclientv2/queueconversationcalleventtopicscoredagent.go index 14ceda32a..547166366 100644 --- a/platformclientv2/queueconversationcalleventtopicscoredagent.go +++ b/platformclientv2/queueconversationcalleventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcalleventtopicscoredagent struct { } +func (u *Queueconversationcalleventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationcalleventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicurireference.go b/platformclientv2/queueconversationcalleventtopicurireference.go index bf4518108..9d93e4a24 100644 --- a/platformclientv2/queueconversationcalleventtopicurireference.go +++ b/platformclientv2/queueconversationcalleventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcalleventtopicurireference struct { } +func (u *Queueconversationcalleventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcalleventtopicwrapup.go b/platformclientv2/queueconversationcalleventtopicwrapup.go index 46a4bf2c5..bfcd05b0f 100644 --- a/platformclientv2/queueconversationcalleventtopicwrapup.go +++ b/platformclientv2/queueconversationcalleventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationcalleventtopicwrapup struct { } +func (u *Queueconversationcalleventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcalleventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcalleventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicchatconversation.go b/platformclientv2/queueconversationchateventtopicchatconversation.go index e7feba77d..69732b528 100644 --- a/platformclientv2/queueconversationchateventtopicchatconversation.go +++ b/platformclientv2/queueconversationchateventtopicchatconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationchateventtopicchatconversation struct { } +func (u *Queueconversationchateventtopicchatconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicchatconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Queueconversationchateventtopicchatmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicchatconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicchatmediaparticipant.go b/platformclientv2/queueconversationchateventtopicchatmediaparticipant.go index 3e54a6263..080d998aa 100644 --- a/platformclientv2/queueconversationchateventtopicchatmediaparticipant.go +++ b/platformclientv2/queueconversationchateventtopicchatmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -153,6 +154,210 @@ type Queueconversationchateventtopicchatmediaparticipant struct { } +func (u *Queueconversationchateventtopicchatmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicchatmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Queueconversationchateventtopicurireference `json:"user,omitempty"` + + Queue *Queueconversationchateventtopicurireference `json:"queue,omitempty"` + + Team *Queueconversationchateventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Queueconversationchateventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Queueconversationchateventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Queueconversationchateventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Queueconversationchateventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Queueconversationchateventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Queueconversationchateventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Queueconversationchateventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + RoomId: u.RoomId, + + AvatarImageUrl: u.AvatarImageUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicchatmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicconversationroutingdata.go b/platformclientv2/queueconversationchateventtopicconversationroutingdata.go index 03f993308..42aa10b9f 100644 --- a/platformclientv2/queueconversationchateventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationchateventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationchateventtopicconversationroutingdata struct { } +func (u *Queueconversationchateventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationchateventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationchateventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationchateventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationchateventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicdetail.go b/platformclientv2/queueconversationchateventtopicdetail.go index 726d3c12f..f543448ef 100644 --- a/platformclientv2/queueconversationchateventtopicdetail.go +++ b/platformclientv2/queueconversationchateventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationchateventtopicdetail struct { } +func (u *Queueconversationchateventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicerrorbody.go b/platformclientv2/queueconversationchateventtopicerrorbody.go index 8491a3d64..7c7d09826 100644 --- a/platformclientv2/queueconversationchateventtopicerrorbody.go +++ b/platformclientv2/queueconversationchateventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueconversationchateventtopicerrorbody struct { } +func (u *Queueconversationchateventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Queueconversationchateventtopicdetail `json:"details,omitempty"` + + Errors *[]Queueconversationchateventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicjourneyaction.go b/platformclientv2/queueconversationchateventtopicjourneyaction.go index a7f05fa1a..5cac0da9f 100644 --- a/platformclientv2/queueconversationchateventtopicjourneyaction.go +++ b/platformclientv2/queueconversationchateventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationchateventtopicjourneyaction struct { } +func (u *Queueconversationchateventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationchateventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicjourneyactionmap.go b/platformclientv2/queueconversationchateventtopicjourneyactionmap.go index 1b0e07e70..72ffff601 100644 --- a/platformclientv2/queueconversationchateventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationchateventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationchateventtopicjourneyactionmap struct { } +func (u *Queueconversationchateventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicjourneycontext.go b/platformclientv2/queueconversationchateventtopicjourneycontext.go index 319f1cb69..9ebe9c454 100644 --- a/platformclientv2/queueconversationchateventtopicjourneycontext.go +++ b/platformclientv2/queueconversationchateventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationchateventtopicjourneycontext struct { } +func (u *Queueconversationchateventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationchateventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationchateventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationchateventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicjourneycustomer.go b/platformclientv2/queueconversationchateventtopicjourneycustomer.go index 30d563525..e75383d80 100644 --- a/platformclientv2/queueconversationchateventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationchateventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationchateventtopicjourneycustomer struct { } +func (u *Queueconversationchateventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicjourneycustomersession.go b/platformclientv2/queueconversationchateventtopicjourneycustomersession.go index 894a45379..5f4645231 100644 --- a/platformclientv2/queueconversationchateventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationchateventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationchateventtopicjourneycustomersession struct { } +func (u *Queueconversationchateventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicscoredagent.go b/platformclientv2/queueconversationchateventtopicscoredagent.go index 473baa862..400964ab6 100644 --- a/platformclientv2/queueconversationchateventtopicscoredagent.go +++ b/platformclientv2/queueconversationchateventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationchateventtopicscoredagent struct { } +func (u *Queueconversationchateventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationchateventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicurireference.go b/platformclientv2/queueconversationchateventtopicurireference.go index f5d170aa8..d03981d61 100644 --- a/platformclientv2/queueconversationchateventtopicurireference.go +++ b/platformclientv2/queueconversationchateventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationchateventtopicurireference struct { } +func (u *Queueconversationchateventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationchateventtopicwrapup.go b/platformclientv2/queueconversationchateventtopicwrapup.go index a84853b4d..4ab58d844 100644 --- a/platformclientv2/queueconversationchateventtopicwrapup.go +++ b/platformclientv2/queueconversationchateventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationchateventtopicwrapup struct { } +func (u *Queueconversationchateventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationchateventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationchateventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopiccobrowseconversation.go b/platformclientv2/queueconversationcobrowseeventtopiccobrowseconversation.go index e1f571de8..1ac27877e 100644 --- a/platformclientv2/queueconversationcobrowseeventtopiccobrowseconversation.go +++ b/platformclientv2/queueconversationcobrowseeventtopiccobrowseconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationcobrowseeventtopiccobrowseconversation struct { } +func (u *Queueconversationcobrowseeventtopiccobrowseconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopiccobrowseconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Queueconversationcobrowseeventtopiccobrowsemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopiccobrowseconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopiccobrowsemediaparticipant.go b/platformclientv2/queueconversationcobrowseeventtopiccobrowsemediaparticipant.go index 0381fe547..d70cca529 100644 --- a/platformclientv2/queueconversationcobrowseeventtopiccobrowsemediaparticipant.go +++ b/platformclientv2/queueconversationcobrowseeventtopiccobrowsemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -165,6 +166,230 @@ type Queueconversationcobrowseeventtopiccobrowsemediaparticipant struct { } +func (u *Queueconversationcobrowseeventtopiccobrowsemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopiccobrowsemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Queueconversationcobrowseeventtopicurireference `json:"user,omitempty"` + + Queue *Queueconversationcobrowseeventtopicurireference `json:"queue,omitempty"` + + Team *Queueconversationcobrowseeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Queueconversationcobrowseeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Queueconversationcobrowseeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Queueconversationcobrowseeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Queueconversationcobrowseeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Queueconversationcobrowseeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Queueconversationcobrowseeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Queueconversationcobrowseeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + ViewerUrl: u.ViewerUrl, + + ProviderEventTime: ProviderEventTime, + + Controlling: u.Controlling, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopiccobrowsemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicconversationroutingdata.go b/platformclientv2/queueconversationcobrowseeventtopicconversationroutingdata.go index e0f571bc7..a8fcf667a 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationcobrowseeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationcobrowseeventtopicconversationroutingdata struct { } +func (u *Queueconversationcobrowseeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationcobrowseeventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationcobrowseeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationcobrowseeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationcobrowseeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicdetail.go b/platformclientv2/queueconversationcobrowseeventtopicdetail.go index bc93a37c7..1dd0d3ebf 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicdetail.go +++ b/platformclientv2/queueconversationcobrowseeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationcobrowseeventtopicdetail struct { } +func (u *Queueconversationcobrowseeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicerrorbody.go b/platformclientv2/queueconversationcobrowseeventtopicerrorbody.go index 9db001352..56564427f 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicerrorbody.go +++ b/platformclientv2/queueconversationcobrowseeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueconversationcobrowseeventtopicerrorbody struct { } +func (u *Queueconversationcobrowseeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Queueconversationcobrowseeventtopicdetail `json:"details,omitempty"` + + Errors *[]Queueconversationcobrowseeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicjourneyaction.go b/platformclientv2/queueconversationcobrowseeventtopicjourneyaction.go index ec209d5c3..ed1fd2e6b 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicjourneyaction.go +++ b/platformclientv2/queueconversationcobrowseeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcobrowseeventtopicjourneyaction struct { } +func (u *Queueconversationcobrowseeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationcobrowseeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicjourneyactionmap.go b/platformclientv2/queueconversationcobrowseeventtopicjourneyactionmap.go index 6479c0595..05bc3982c 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationcobrowseeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcobrowseeventtopicjourneyactionmap struct { } +func (u *Queueconversationcobrowseeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicjourneycontext.go b/platformclientv2/queueconversationcobrowseeventtopicjourneycontext.go index fcb3be1d7..456a1d33a 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicjourneycontext.go +++ b/platformclientv2/queueconversationcobrowseeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationcobrowseeventtopicjourneycontext struct { } +func (u *Queueconversationcobrowseeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationcobrowseeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationcobrowseeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationcobrowseeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicjourneycustomer.go b/platformclientv2/queueconversationcobrowseeventtopicjourneycustomer.go index 22f764a41..b9d900ba3 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationcobrowseeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcobrowseeventtopicjourneycustomer struct { } +func (u *Queueconversationcobrowseeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicjourneycustomersession.go b/platformclientv2/queueconversationcobrowseeventtopicjourneycustomersession.go index c4a418cb6..df140886d 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationcobrowseeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcobrowseeventtopicjourneycustomersession struct { } +func (u *Queueconversationcobrowseeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicscoredagent.go b/platformclientv2/queueconversationcobrowseeventtopicscoredagent.go index 0dba73746..4c4da5e7e 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicscoredagent.go +++ b/platformclientv2/queueconversationcobrowseeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcobrowseeventtopicscoredagent struct { } +func (u *Queueconversationcobrowseeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationcobrowseeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicurireference.go b/platformclientv2/queueconversationcobrowseeventtopicurireference.go index be8817176..f704f63e0 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicurireference.go +++ b/platformclientv2/queueconversationcobrowseeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationcobrowseeventtopicurireference struct { } +func (u *Queueconversationcobrowseeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationcobrowseeventtopicwrapup.go b/platformclientv2/queueconversationcobrowseeventtopicwrapup.go index 3fbeef898..d0d35c7a9 100644 --- a/platformclientv2/queueconversationcobrowseeventtopicwrapup.go +++ b/platformclientv2/queueconversationcobrowseeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationcobrowseeventtopicwrapup struct { } +func (u *Queueconversationcobrowseeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationcobrowseeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationcobrowseeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicattachment.go b/platformclientv2/queueconversationemaileventtopicattachment.go index 5a52567f2..9c2f6a01f 100644 --- a/platformclientv2/queueconversationemaileventtopicattachment.go +++ b/platformclientv2/queueconversationemaileventtopicattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationemaileventtopicattachment struct { } +func (u *Queueconversationemaileventtopicattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicattachment + + + + return json.Marshal(&struct { + AttachmentId *string `json:"attachmentId,omitempty"` + + Name *string `json:"name,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + AttachmentId: u.AttachmentId, + + Name: u.Name, + + ContentUri: u.ContentUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicconversationroutingdata.go b/platformclientv2/queueconversationemaileventtopicconversationroutingdata.go index f9343d164..6c316b875 100644 --- a/platformclientv2/queueconversationemaileventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationemaileventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationemaileventtopicconversationroutingdata struct { } +func (u *Queueconversationemaileventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationemaileventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationemaileventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationemaileventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationemaileventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicdetail.go b/platformclientv2/queueconversationemaileventtopicdetail.go index 70e3b8ca6..76d4fe1b0 100644 --- a/platformclientv2/queueconversationemaileventtopicdetail.go +++ b/platformclientv2/queueconversationemaileventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationemaileventtopicdetail struct { } +func (u *Queueconversationemaileventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicemailconversation.go b/platformclientv2/queueconversationemaileventtopicemailconversation.go index 88a265438..95911db6e 100644 --- a/platformclientv2/queueconversationemaileventtopicemailconversation.go +++ b/platformclientv2/queueconversationemaileventtopicemailconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationemaileventtopicemailconversation struct { } +func (u *Queueconversationemaileventtopicemailconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicemailconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Queueconversationemaileventtopicemailmediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicemailconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicemailmediaparticipant.go b/platformclientv2/queueconversationemaileventtopicemailmediaparticipant.go index 76c7c1d29..15cb3a758 100644 --- a/platformclientv2/queueconversationemaileventtopicemailmediaparticipant.go +++ b/platformclientv2/queueconversationemaileventtopicemailmediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -169,6 +170,226 @@ type Queueconversationemaileventtopicemailmediaparticipant struct { } +func (u *Queueconversationemaileventtopicemailmediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicemailmediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Queueconversationemaileventtopicurireference `json:"user,omitempty"` + + Queue *Queueconversationemaileventtopicurireference `json:"queue,omitempty"` + + Team *Queueconversationemaileventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Queueconversationemaileventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Queueconversationemaileventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Queueconversationemaileventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Queueconversationemaileventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Queueconversationemaileventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Queueconversationemaileventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Queueconversationemaileventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Subject *string `json:"subject,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + DraftAttachments *[]Queueconversationemaileventtopicattachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Subject: u.Subject, + + MessagesSent: u.MessagesSent, + + AutoGenerated: u.AutoGenerated, + + MessageId: u.MessageId, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicemailmediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicerrorbody.go b/platformclientv2/queueconversationemaileventtopicerrorbody.go index ed242ddb1..d63797105 100644 --- a/platformclientv2/queueconversationemaileventtopicerrorbody.go +++ b/platformclientv2/queueconversationemaileventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueconversationemaileventtopicerrorbody struct { } +func (u *Queueconversationemaileventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Queueconversationemaileventtopicdetail `json:"details,omitempty"` + + Errors *[]Queueconversationemaileventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicjourneyaction.go b/platformclientv2/queueconversationemaileventtopicjourneyaction.go index 45ea353cc..fcd9bf4a4 100644 --- a/platformclientv2/queueconversationemaileventtopicjourneyaction.go +++ b/platformclientv2/queueconversationemaileventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationemaileventtopicjourneyaction struct { } +func (u *Queueconversationemaileventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationemaileventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicjourneyactionmap.go b/platformclientv2/queueconversationemaileventtopicjourneyactionmap.go index a643cc10d..064f90ff6 100644 --- a/platformclientv2/queueconversationemaileventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationemaileventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationemaileventtopicjourneyactionmap struct { } +func (u *Queueconversationemaileventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicjourneycontext.go b/platformclientv2/queueconversationemaileventtopicjourneycontext.go index 398694b79..fdad02f30 100644 --- a/platformclientv2/queueconversationemaileventtopicjourneycontext.go +++ b/platformclientv2/queueconversationemaileventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationemaileventtopicjourneycontext struct { } +func (u *Queueconversationemaileventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationemaileventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationemaileventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationemaileventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicjourneycustomer.go b/platformclientv2/queueconversationemaileventtopicjourneycustomer.go index e0bf032c1..f5631fdbd 100644 --- a/platformclientv2/queueconversationemaileventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationemaileventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationemaileventtopicjourneycustomer struct { } +func (u *Queueconversationemaileventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicjourneycustomersession.go b/platformclientv2/queueconversationemaileventtopicjourneycustomersession.go index 9fc5aa1ce..1ae91b3e5 100644 --- a/platformclientv2/queueconversationemaileventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationemaileventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationemaileventtopicjourneycustomersession struct { } +func (u *Queueconversationemaileventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicscoredagent.go b/platformclientv2/queueconversationemaileventtopicscoredagent.go index c8c7c4ab7..cf173b0b6 100644 --- a/platformclientv2/queueconversationemaileventtopicscoredagent.go +++ b/platformclientv2/queueconversationemaileventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationemaileventtopicscoredagent struct { } +func (u *Queueconversationemaileventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationemaileventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicurireference.go b/platformclientv2/queueconversationemaileventtopicurireference.go index 42a64b68c..07a08a16d 100644 --- a/platformclientv2/queueconversationemaileventtopicurireference.go +++ b/platformclientv2/queueconversationemaileventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationemaileventtopicurireference struct { } +func (u *Queueconversationemaileventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationemaileventtopicwrapup.go b/platformclientv2/queueconversationemaileventtopicwrapup.go index e05e23e9d..0a84a93de 100644 --- a/platformclientv2/queueconversationemaileventtopicwrapup.go +++ b/platformclientv2/queueconversationemaileventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationemaileventtopicwrapup struct { } +func (u *Queueconversationemaileventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationemaileventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationemaileventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicaddress.go b/platformclientv2/queueconversationeventtopicaddress.go index 1ee81f621..58878a628 100644 --- a/platformclientv2/queueconversationeventtopicaddress.go +++ b/platformclientv2/queueconversationeventtopicaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationeventtopicaddress struct { } +func (u *Queueconversationeventtopicaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicaddress + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + NameRaw *string `json:"nameRaw,omitempty"` + + AddressNormalized *string `json:"addressNormalized,omitempty"` + + AddressRaw *string `json:"addressRaw,omitempty"` + + AddressDisplayable *string `json:"addressDisplayable,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Name: u.Name, + + NameRaw: u.NameRaw, + + AddressNormalized: u.AddressNormalized, + + AddressRaw: u.AddressRaw, + + AddressDisplayable: u.AddressDisplayable, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicaftercallwork.go b/platformclientv2/queueconversationeventtopicaftercallwork.go index 33a68f85b..09656eff5 100644 --- a/platformclientv2/queueconversationeventtopicaftercallwork.go +++ b/platformclientv2/queueconversationeventtopicaftercallwork.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Queueconversationeventtopicaftercallwork struct { } +func (u *Queueconversationeventtopicaftercallwork) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicaftercallwork + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + *Alias + }{ + State: u.State, + + StartTime: StartTime, + + EndTime: EndTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicaftercallwork) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicattachment.go b/platformclientv2/queueconversationeventtopicattachment.go index cf0cfba5a..3316156c7 100644 --- a/platformclientv2/queueconversationeventtopicattachment.go +++ b/platformclientv2/queueconversationeventtopicattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationeventtopicattachment struct { } +func (u *Queueconversationeventtopicattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicattachment + + + + return json.Marshal(&struct { + AttachmentId *string `json:"attachmentId,omitempty"` + + Name *string `json:"name,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + AttachmentId: u.AttachmentId, + + Name: u.Name, + + ContentUri: u.ContentUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopiccall.go b/platformclientv2/queueconversationeventtopiccall.go index 9880ed09a..4e04913f4 100644 --- a/platformclientv2/queueconversationeventtopiccall.go +++ b/platformclientv2/queueconversationeventtopiccall.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,150 @@ type Queueconversationeventtopiccall struct { } +func (u *Queueconversationeventtopiccall) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopiccall + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Queueconversationeventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + Self *Queueconversationeventtopicaddress `json:"self,omitempty"` + + Other *Queueconversationeventtopicaddress `json:"other,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + DisconnectReasons *[]Queueconversationeventtopicdisconnectreason `json:"disconnectReasons,omitempty"` + + FaxStatus *Queueconversationeventtopicfaxstatus `json:"faxStatus,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Muted: u.Muted, + + Confined: u.Confined, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + Direction: u.Direction, + + DocumentId: u.DocumentId, + + Self: u.Self, + + Other: u.Other, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + DisconnectReasons: u.DisconnectReasons, + + FaxStatus: u.FaxStatus, + + UuiData: u.UuiData, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AgentAssistantId: u.AgentAssistantId, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopiccall) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopiccallback.go b/platformclientv2/queueconversationeventtopiccallback.go index acd878e2c..d53322717 100644 --- a/platformclientv2/queueconversationeventtopiccallback.go +++ b/platformclientv2/queueconversationeventtopiccallback.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,154 @@ type Queueconversationeventtopiccallback struct { } +func (u *Queueconversationeventtopiccallback) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopiccallback + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DialerPreview *Queueconversationeventtopicdialerpreview `json:"dialerPreview,omitempty"` + + Voicemail *Queueconversationeventtopicvoicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + Provider *string `json:"provider,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Direction: u.Direction, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DialerPreview: u.DialerPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ExternalCampaign: u.ExternalCampaign, + + SkipEnabled: u.SkipEnabled, + + Provider: u.Provider, + + TimeoutSeconds: u.TimeoutSeconds, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopiccallback) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicchat.go b/platformclientv2/queueconversationeventtopicchat.go index 880ba483b..491cfc6ab 100644 --- a/platformclientv2/queueconversationeventtopicchat.go +++ b/platformclientv2/queueconversationeventtopicchat.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Queueconversationeventtopicchat struct { } +func (u *Queueconversationeventtopicchat) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicchat + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + JourneyContext *Queueconversationeventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + RoomId: u.RoomId, + + AvatarImageUrl: u.AvatarImageUrl, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicchat) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopiccobrowse.go b/platformclientv2/queueconversationeventtopiccobrowse.go index 7f553681e..1b869915e 100644 --- a/platformclientv2/queueconversationeventtopiccobrowse.go +++ b/platformclientv2/queueconversationeventtopiccobrowse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Queueconversationeventtopiccobrowse struct { } +func (u *Queueconversationeventtopiccobrowse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopiccobrowse + + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Id *string `json:"id,omitempty"` + + Self *Queueconversationeventtopicaddress `json:"self,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + DisconnectType: u.DisconnectType, + + Id: u.Id, + + Self: u.Self, + + RoomId: u.RoomId, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + Controlling: u.Controlling, + + ViewerUrl: u.ViewerUrl, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ProviderEventTime: ProviderEventTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopiccobrowse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicconversation.go b/platformclientv2/queueconversationeventtopicconversation.go index 3ebc54f50..0462dcd61 100644 --- a/platformclientv2/queueconversationeventtopicconversation.go +++ b/platformclientv2/queueconversationeventtopicconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationeventtopicconversation struct { } +func (u *Queueconversationeventtopicconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + + Participants *[]Queueconversationeventtopicparticipant `json:"participants,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Address *string `json:"address,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + *Alias + }{ + Id: u.Id, + + MaxParticipants: u.MaxParticipants, + + Participants: u.Participants, + + RecordingState: u.RecordingState, + + Address: u.Address, + + ExternalTag: u.ExternalTag, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicconversationroutingdata.go b/platformclientv2/queueconversationeventtopicconversationroutingdata.go index 9cd918cce..6f7597f14 100644 --- a/platformclientv2/queueconversationeventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationeventtopicconversationroutingdata struct { } +func (u *Queueconversationeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationeventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicdialerpreview.go b/platformclientv2/queueconversationeventtopicdialerpreview.go index b2c05a7bb..a8ae0fb66 100644 --- a/platformclientv2/queueconversationeventtopicdialerpreview.go +++ b/platformclientv2/queueconversationeventtopicdialerpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationeventtopicdialerpreview struct { } +func (u *Queueconversationeventtopicdialerpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicdialerpreview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + CampaignId *string `json:"campaignId,omitempty"` + + PhoneNumberColumns *[]Queueconversationeventtopicphonenumbercolumn `json:"phoneNumberColumns,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactId: u.ContactId, + + ContactListId: u.ContactListId, + + CampaignId: u.CampaignId, + + PhoneNumberColumns: u.PhoneNumberColumns, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicdialerpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicdisconnectreason.go b/platformclientv2/queueconversationeventtopicdisconnectreason.go index 3aaa77399..ca75dcb81 100644 --- a/platformclientv2/queueconversationeventtopicdisconnectreason.go +++ b/platformclientv2/queueconversationeventtopicdisconnectreason.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationeventtopicdisconnectreason struct { } +func (u *Queueconversationeventtopicdisconnectreason) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicdisconnectreason + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Code *int `json:"code,omitempty"` + + Phrase *string `json:"phrase,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Code: u.Code, + + Phrase: u.Phrase, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicdisconnectreason) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicemail.go b/platformclientv2/queueconversationeventtopicemail.go index a96e477ed..ad123e633 100644 --- a/platformclientv2/queueconversationeventtopicemail.go +++ b/platformclientv2/queueconversationeventtopicemail.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -97,6 +98,130 @@ type Queueconversationeventtopicemail struct { } +func (u *Queueconversationeventtopicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicemail + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + Subject *string `json:"subject,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + ErrorInfo *Queueconversationeventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DraftAttachments *[]Queueconversationeventtopicattachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + AutoGenerated: u.AutoGenerated, + + Subject: u.Subject, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + MessagesSent: u.MessagesSent, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + MessageId: u.MessageId, + + Direction: u.Direction, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicerrordetails.go b/platformclientv2/queueconversationeventtopicerrordetails.go index 3d7b7907d..b45b3646e 100644 --- a/platformclientv2/queueconversationeventtopicerrordetails.go +++ b/platformclientv2/queueconversationeventtopicerrordetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queueconversationeventtopicerrordetails struct { } +func (u *Queueconversationeventtopicerrordetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicerrordetails + + + + return json.Marshal(&struct { + Status *int `json:"status,omitempty"` + + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Uri *string `json:"uri,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Status: u.Status, + + Code: u.Code, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Uri: u.Uri, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicerrordetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicfaxstatus.go b/platformclientv2/queueconversationeventtopicfaxstatus.go index 4b90144ce..cea7f2d95 100644 --- a/platformclientv2/queueconversationeventtopicfaxstatus.go +++ b/platformclientv2/queueconversationeventtopicfaxstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queueconversationeventtopicfaxstatus struct { } +func (u *Queueconversationeventtopicfaxstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicfaxstatus + + + + return json.Marshal(&struct { + Direction *string `json:"direction,omitempty"` + + ExpectedPages *int `json:"expectedPages,omitempty"` + + ActivePage *int `json:"activePage,omitempty"` + + LinesTransmitted *int `json:"linesTransmitted,omitempty"` + + BytesTransmitted *int `json:"bytesTransmitted,omitempty"` + + BaudRate *int `json:"baudRate,omitempty"` + + PageErrors *int `json:"pageErrors,omitempty"` + + LineErrors *int `json:"lineErrors,omitempty"` + *Alias + }{ + Direction: u.Direction, + + ExpectedPages: u.ExpectedPages, + + ActivePage: u.ActivePage, + + LinesTransmitted: u.LinesTransmitted, + + BytesTransmitted: u.BytesTransmitted, + + BaudRate: u.BaudRate, + + PageErrors: u.PageErrors, + + LineErrors: u.LineErrors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicfaxstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicjourneyaction.go b/platformclientv2/queueconversationeventtopicjourneyaction.go index 2a499fc22..ef0ac7455 100644 --- a/platformclientv2/queueconversationeventtopicjourneyaction.go +++ b/platformclientv2/queueconversationeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicjourneyaction struct { } +func (u *Queueconversationeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicjourneyactionmap.go b/platformclientv2/queueconversationeventtopicjourneyactionmap.go index 5d73485e7..5e1f60322 100644 --- a/platformclientv2/queueconversationeventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicjourneyactionmap struct { } +func (u *Queueconversationeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicjourneycontext.go b/platformclientv2/queueconversationeventtopicjourneycontext.go index 0d4d4aa6e..be11ad55b 100644 --- a/platformclientv2/queueconversationeventtopicjourneycontext.go +++ b/platformclientv2/queueconversationeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationeventtopicjourneycontext struct { } +func (u *Queueconversationeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicjourneycustomer.go b/platformclientv2/queueconversationeventtopicjourneycustomer.go index 099361c27..015d21ac7 100644 --- a/platformclientv2/queueconversationeventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicjourneycustomer struct { } +func (u *Queueconversationeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicjourneycustomersession.go b/platformclientv2/queueconversationeventtopicjourneycustomersession.go index 09c015dc9..6546f4bc7 100644 --- a/platformclientv2/queueconversationeventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicjourneycustomersession struct { } +func (u *Queueconversationeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicmessage.go b/platformclientv2/queueconversationeventtopicmessage.go index ea69850d1..c54dce89d 100644 --- a/platformclientv2/queueconversationeventtopicmessage.go +++ b/platformclientv2/queueconversationeventtopicmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -101,6 +102,134 @@ type Queueconversationeventtopicmessage struct { } +func (u *Queueconversationeventtopicmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicmessage + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Queueconversationeventtopicerrordetails `json:"errorInfo,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + ToAddress *Queueconversationeventtopicaddress `json:"toAddress,omitempty"` + + FromAddress *Queueconversationeventtopicaddress `json:"fromAddress,omitempty"` + + Messages *[]Queueconversationeventtopicmessagedetails `json:"messages,omitempty"` + + MessagesTranscriptUri *string `json:"messagesTranscriptUri,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + + JourneyContext *Queueconversationeventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + ToAddress: u.ToAddress, + + FromAddress: u.FromAddress, + + Messages: u.Messages, + + MessagesTranscriptUri: u.MessagesTranscriptUri, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicmessagedetails.go b/platformclientv2/queueconversationeventtopicmessagedetails.go index 50b73b291..0912b0fe0 100644 --- a/platformclientv2/queueconversationeventtopicmessagedetails.go +++ b/platformclientv2/queueconversationeventtopicmessagedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationeventtopicmessagedetails struct { } +func (u *Queueconversationeventtopicmessagedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicmessagedetails + + + MessageTime := new(string) + if u.MessageTime != nil { + + *MessageTime = timeutil.Strftime(u.MessageTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + MessageTime = nil + } + + + return json.Marshal(&struct { + MessageId *string `json:"messageId,omitempty"` + + MessageTime *string `json:"messageTime,omitempty"` + + MessageStatus *string `json:"messageStatus,omitempty"` + + MessageSegmentCount *int `json:"messageSegmentCount,omitempty"` + + Media *[]Queueconversationeventtopicmessagemedia `json:"media,omitempty"` + + Stickers *[]Queueconversationeventtopicmessagesticker `json:"stickers,omitempty"` + *Alias + }{ + MessageId: u.MessageId, + + MessageTime: MessageTime, + + MessageStatus: u.MessageStatus, + + MessageSegmentCount: u.MessageSegmentCount, + + Media: u.Media, + + Stickers: u.Stickers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicmessagedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicmessagemedia.go b/platformclientv2/queueconversationeventtopicmessagemedia.go index 39624468c..c50da86f5 100644 --- a/platformclientv2/queueconversationeventtopicmessagemedia.go +++ b/platformclientv2/queueconversationeventtopicmessagemedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationeventtopicmessagemedia struct { } +func (u *Queueconversationeventtopicmessagemedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicmessagemedia + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicmessagemedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicmessagesticker.go b/platformclientv2/queueconversationeventtopicmessagesticker.go index 1ef7c8104..fc24b3f5b 100644 --- a/platformclientv2/queueconversationeventtopicmessagesticker.go +++ b/platformclientv2/queueconversationeventtopicmessagesticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicmessagesticker struct { } +func (u *Queueconversationeventtopicmessagesticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicmessagesticker + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicmessagesticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicparticipant.go b/platformclientv2/queueconversationeventtopicparticipant.go index 27bb713ca..6defb9d71 100644 --- a/platformclientv2/queueconversationeventtopicparticipant.go +++ b/platformclientv2/queueconversationeventtopicparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -157,6 +158,198 @@ type Queueconversationeventtopicparticipant struct { } +func (u *Queueconversationeventtopicparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicparticipant + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + UserId *string `json:"userId,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + Name *string `json:"name,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + Address *string `json:"address,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupExpected *bool `json:"wrapupExpected,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + ConversationRoutingData *Queueconversationeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + Calls *[]Queueconversationeventtopiccall `json:"calls,omitempty"` + + Callbacks *[]Queueconversationeventtopiccallback `json:"callbacks,omitempty"` + + Chats *[]Queueconversationeventtopicchat `json:"chats,omitempty"` + + Cobrowsesessions *[]Queueconversationeventtopiccobrowse `json:"cobrowsesessions,omitempty"` + + Emails *[]Queueconversationeventtopicemail `json:"emails,omitempty"` + + Messages *[]Queueconversationeventtopicmessage `json:"messages,omitempty"` + + Screenshares *[]Queueconversationeventtopicscreenshare `json:"screenshares,omitempty"` + + SocialExpressions *[]Queueconversationeventtopicsocialexpression `json:"socialExpressions,omitempty"` + + Videos *[]Queueconversationeventtopicvideo `json:"videos,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + UserId: u.UserId, + + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + Name: u.Name, + + QueueId: u.QueueId, + + GroupId: u.GroupId, + + TeamId: u.TeamId, + + Purpose: u.Purpose, + + ConsultParticipantId: u.ConsultParticipantId, + + Address: u.Address, + + WrapupRequired: u.WrapupRequired, + + WrapupExpected: u.WrapupExpected, + + WrapupPrompt: u.WrapupPrompt, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + Wrapup: u.Wrapup, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + ConversationRoutingData: u.ConversationRoutingData, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + Attributes: u.Attributes, + + Calls: u.Calls, + + Callbacks: u.Callbacks, + + Chats: u.Chats, + + Cobrowsesessions: u.Cobrowsesessions, + + Emails: u.Emails, + + Messages: u.Messages, + + Screenshares: u.Screenshares, + + SocialExpressions: u.SocialExpressions, + + Videos: u.Videos, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicphonenumbercolumn.go b/platformclientv2/queueconversationeventtopicphonenumbercolumn.go index 4669b134a..434a8955a 100644 --- a/platformclientv2/queueconversationeventtopicphonenumbercolumn.go +++ b/platformclientv2/queueconversationeventtopicphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationeventtopicphonenumbercolumn struct { } +func (u *Queueconversationeventtopicphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicscoredagent.go b/platformclientv2/queueconversationeventtopicscoredagent.go index 7baf65a35..31d456825 100644 --- a/platformclientv2/queueconversationeventtopicscoredagent.go +++ b/platformclientv2/queueconversationeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicscoredagent struct { } +func (u *Queueconversationeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicscreenshare.go b/platformclientv2/queueconversationeventtopicscreenshare.go index 1f89fdede..699cb442a 100644 --- a/platformclientv2/queueconversationeventtopicscreenshare.go +++ b/platformclientv2/queueconversationeventtopicscreenshare.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Queueconversationeventtopicscreenshare struct { } +func (u *Queueconversationeventtopicscreenshare) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicscreenshare + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Queueconversationeventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + Sharing *bool `json:"sharing,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + Sharing: u.Sharing, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicscreenshare) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicsocialexpression.go b/platformclientv2/queueconversationeventtopicsocialexpression.go index 4a6a4a7e4..262bda54c 100644 --- a/platformclientv2/queueconversationeventtopicsocialexpression.go +++ b/platformclientv2/queueconversationeventtopicsocialexpression.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Queueconversationeventtopicsocialexpression struct { } +func (u *Queueconversationeventtopicsocialexpression) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicsocialexpression + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + SocialMediaId *string `json:"socialMediaId,omitempty"` + + SocialMediaHub *string `json:"socialMediaHub,omitempty"` + + SocialUserName *string `json:"socialUserName,omitempty"` + + PreviewText *string `json:"previewText,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Held *bool `json:"held,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + SocialMediaId: u.SocialMediaId, + + SocialMediaHub: u.SocialMediaHub, + + SocialUserName: u.SocialUserName, + + PreviewText: u.PreviewText, + + RecordingId: u.RecordingId, + + Held: u.Held, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicsocialexpression) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicurireference.go b/platformclientv2/queueconversationeventtopicurireference.go index e8b7c1a2a..537723882 100644 --- a/platformclientv2/queueconversationeventtopicurireference.go +++ b/platformclientv2/queueconversationeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicurireference struct { } +func (u *Queueconversationeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicvideo.go b/platformclientv2/queueconversationeventtopicvideo.go index 89dc14c02..9765c92b1 100644 --- a/platformclientv2/queueconversationeventtopicvideo.go +++ b/platformclientv2/queueconversationeventtopicvideo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Queueconversationeventtopicvideo struct { } +func (u *Queueconversationeventtopicvideo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicvideo + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Queueconversationeventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + AudioMuted *bool `json:"audioMuted,omitempty"` + + VideoMuted *bool `json:"videoMuted,omitempty"` + + SharingScreen *bool `json:"sharingScreen,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Msids *[]string `json:"msids,omitempty"` + + Wrapup *Queueconversationeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + AudioMuted: u.AudioMuted, + + VideoMuted: u.VideoMuted, + + SharingScreen: u.SharingScreen, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Msids: u.Msids, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicvideo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicvoicemail.go b/platformclientv2/queueconversationeventtopicvoicemail.go index af4227c7c..b71904eba 100644 --- a/platformclientv2/queueconversationeventtopicvoicemail.go +++ b/platformclientv2/queueconversationeventtopicvoicemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationeventtopicvoicemail struct { } +func (u *Queueconversationeventtopicvoicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicvoicemail + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + UploadStatus: u.UploadStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicvoicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationeventtopicwrapup.go b/platformclientv2/queueconversationeventtopicwrapup.go index 25fcf53e2..fa89f0ce0 100644 --- a/platformclientv2/queueconversationeventtopicwrapup.go +++ b/platformclientv2/queueconversationeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationeventtopicwrapup struct { } +func (u *Queueconversationeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicconversationroutingdata.go b/platformclientv2/queueconversationmessageeventtopicconversationroutingdata.go index eade4830e..a67868c5d 100644 --- a/platformclientv2/queueconversationmessageeventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationmessageeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationmessageeventtopicconversationroutingdata struct { } +func (u *Queueconversationmessageeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationmessageeventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationmessageeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationmessageeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationmessageeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicdetail.go b/platformclientv2/queueconversationmessageeventtopicdetail.go index acc6b127b..d01bffc5a 100644 --- a/platformclientv2/queueconversationmessageeventtopicdetail.go +++ b/platformclientv2/queueconversationmessageeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationmessageeventtopicdetail struct { } +func (u *Queueconversationmessageeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicerrorbody.go b/platformclientv2/queueconversationmessageeventtopicerrorbody.go index 6e73d51b2..73e39c871 100644 --- a/platformclientv2/queueconversationmessageeventtopicerrorbody.go +++ b/platformclientv2/queueconversationmessageeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueconversationmessageeventtopicerrorbody struct { } +func (u *Queueconversationmessageeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Queueconversationmessageeventtopicdetail `json:"details,omitempty"` + + Errors *[]Queueconversationmessageeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicjourneyaction.go b/platformclientv2/queueconversationmessageeventtopicjourneyaction.go index 93fb25839..1064d36f4 100644 --- a/platformclientv2/queueconversationmessageeventtopicjourneyaction.go +++ b/platformclientv2/queueconversationmessageeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationmessageeventtopicjourneyaction struct { } +func (u *Queueconversationmessageeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationmessageeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicjourneyactionmap.go b/platformclientv2/queueconversationmessageeventtopicjourneyactionmap.go index 279ddf5e2..085eb1ddd 100644 --- a/platformclientv2/queueconversationmessageeventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationmessageeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationmessageeventtopicjourneyactionmap struct { } +func (u *Queueconversationmessageeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicjourneycontext.go b/platformclientv2/queueconversationmessageeventtopicjourneycontext.go index ca09d08bc..b4994320b 100644 --- a/platformclientv2/queueconversationmessageeventtopicjourneycontext.go +++ b/platformclientv2/queueconversationmessageeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationmessageeventtopicjourneycontext struct { } +func (u *Queueconversationmessageeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationmessageeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationmessageeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationmessageeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicjourneycustomer.go b/platformclientv2/queueconversationmessageeventtopicjourneycustomer.go index b6258c3a8..71d75f82f 100644 --- a/platformclientv2/queueconversationmessageeventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationmessageeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationmessageeventtopicjourneycustomer struct { } +func (u *Queueconversationmessageeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicjourneycustomersession.go b/platformclientv2/queueconversationmessageeventtopicjourneycustomersession.go index 1472dad23..9c84ceec2 100644 --- a/platformclientv2/queueconversationmessageeventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationmessageeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationmessageeventtopicjourneycustomersession struct { } +func (u *Queueconversationmessageeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicmessageconversation.go b/platformclientv2/queueconversationmessageeventtopicmessageconversation.go index 79f224571..4001cb0b8 100644 --- a/platformclientv2/queueconversationmessageeventtopicmessageconversation.go +++ b/platformclientv2/queueconversationmessageeventtopicmessageconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationmessageeventtopicmessageconversation struct { } +func (u *Queueconversationmessageeventtopicmessageconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicmessageconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Queueconversationmessageeventtopicmessagemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicmessageconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicmessagedetails.go b/platformclientv2/queueconversationmessageeventtopicmessagedetails.go index ba63caf7e..25ef8d9fc 100644 --- a/platformclientv2/queueconversationmessageeventtopicmessagedetails.go +++ b/platformclientv2/queueconversationmessageeventtopicmessagedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationmessageeventtopicmessagedetails struct { } +func (u *Queueconversationmessageeventtopicmessagedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicmessagedetails + + + MessageTime := new(string) + if u.MessageTime != nil { + + *MessageTime = timeutil.Strftime(u.MessageTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + MessageTime = nil + } + + + return json.Marshal(&struct { + Message *Queueconversationmessageeventtopicurireference `json:"message,omitempty"` + + MessageTime *string `json:"messageTime,omitempty"` + + MessageSegmentCount *int `json:"messageSegmentCount,omitempty"` + + MessageStatus *string `json:"messageStatus,omitempty"` + + Media *[]Queueconversationmessageeventtopicmessagemedia `json:"media,omitempty"` + + Stickers *[]Queueconversationmessageeventtopicmessagesticker `json:"stickers,omitempty"` + *Alias + }{ + Message: u.Message, + + MessageTime: MessageTime, + + MessageSegmentCount: u.MessageSegmentCount, + + MessageStatus: u.MessageStatus, + + Media: u.Media, + + Stickers: u.Stickers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicmessagedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicmessagemedia.go b/platformclientv2/queueconversationmessageeventtopicmessagemedia.go index dc20544ac..1f4b6da48 100644 --- a/platformclientv2/queueconversationmessageeventtopicmessagemedia.go +++ b/platformclientv2/queueconversationmessageeventtopicmessagemedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationmessageeventtopicmessagemedia struct { } +func (u *Queueconversationmessageeventtopicmessagemedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicmessagemedia + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicmessagemedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicmessagemediaparticipant.go b/platformclientv2/queueconversationmessageeventtopicmessagemediaparticipant.go index 1b0a64f8f..4f7cbbfdc 100644 --- a/platformclientv2/queueconversationmessageeventtopicmessagemediaparticipant.go +++ b/platformclientv2/queueconversationmessageeventtopicmessagemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -161,6 +162,218 @@ type Queueconversationmessageeventtopicmessagemediaparticipant struct { } +func (u *Queueconversationmessageeventtopicmessagemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicmessagemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Queueconversationmessageeventtopicurireference `json:"user,omitempty"` + + Queue *Queueconversationmessageeventtopicurireference `json:"queue,omitempty"` + + Team *Queueconversationmessageeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Queueconversationmessageeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Queueconversationmessageeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Queueconversationmessageeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Queueconversationmessageeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Queueconversationmessageeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Queueconversationmessageeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Queueconversationmessageeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Messages *[]Queueconversationmessageeventtopicmessagedetails `json:"messages,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Messages: u.Messages, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicmessagemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicmessagesticker.go b/platformclientv2/queueconversationmessageeventtopicmessagesticker.go index 2a26d7372..463a8fa5b 100644 --- a/platformclientv2/queueconversationmessageeventtopicmessagesticker.go +++ b/platformclientv2/queueconversationmessageeventtopicmessagesticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationmessageeventtopicmessagesticker struct { } +func (u *Queueconversationmessageeventtopicmessagesticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicmessagesticker + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicmessagesticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicscoredagent.go b/platformclientv2/queueconversationmessageeventtopicscoredagent.go index 4f8d9a370..c07771f35 100644 --- a/platformclientv2/queueconversationmessageeventtopicscoredagent.go +++ b/platformclientv2/queueconversationmessageeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationmessageeventtopicscoredagent struct { } +func (u *Queueconversationmessageeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationmessageeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicurireference.go b/platformclientv2/queueconversationmessageeventtopicurireference.go index e8f5f4226..5d48d8150 100644 --- a/platformclientv2/queueconversationmessageeventtopicurireference.go +++ b/platformclientv2/queueconversationmessageeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationmessageeventtopicurireference struct { } +func (u *Queueconversationmessageeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationmessageeventtopicwrapup.go b/platformclientv2/queueconversationmessageeventtopicwrapup.go index dcaf9ce8d..68ec8346f 100644 --- a/platformclientv2/queueconversationmessageeventtopicwrapup.go +++ b/platformclientv2/queueconversationmessageeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationmessageeventtopicwrapup struct { } +func (u *Queueconversationmessageeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationmessageeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationmessageeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicconversationroutingdata.go b/platformclientv2/queueconversationscreenshareeventtopicconversationroutingdata.go index 7a42e65ea..041147882 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationscreenshareeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationscreenshareeventtopicconversationroutingdata struct { } +func (u *Queueconversationscreenshareeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationscreenshareeventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationscreenshareeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationscreenshareeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationscreenshareeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicdetail.go b/platformclientv2/queueconversationscreenshareeventtopicdetail.go index a85829e8d..d5f671f78 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicdetail.go +++ b/platformclientv2/queueconversationscreenshareeventtopicdetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationscreenshareeventtopicdetail struct { } +func (u *Queueconversationscreenshareeventtopicdetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicdetail + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + FieldName *string `json:"fieldName,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + FieldName: u.FieldName, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicdetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicerrorbody.go b/platformclientv2/queueconversationscreenshareeventtopicerrorbody.go index 076e2f6b9..f2c0be32c 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicerrorbody.go +++ b/platformclientv2/queueconversationscreenshareeventtopicerrorbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueconversationscreenshareeventtopicerrorbody struct { } +func (u *Queueconversationscreenshareeventtopicerrorbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicerrorbody + + + + return json.Marshal(&struct { + Message *string `json:"message,omitempty"` + + Code *string `json:"code,omitempty"` + + Status *int `json:"status,omitempty"` + + EntityId *string `json:"entityId,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Details *[]Queueconversationscreenshareeventtopicdetail `json:"details,omitempty"` + + Errors *[]Queueconversationscreenshareeventtopicerrorbody `json:"errors,omitempty"` + *Alias + }{ + Message: u.Message, + + Code: u.Code, + + Status: u.Status, + + EntityId: u.EntityId, + + EntityName: u.EntityName, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Details: u.Details, + + Errors: u.Errors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicerrorbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicjourneyaction.go b/platformclientv2/queueconversationscreenshareeventtopicjourneyaction.go index 65168c77d..c87649c37 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicjourneyaction.go +++ b/platformclientv2/queueconversationscreenshareeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationscreenshareeventtopicjourneyaction struct { } +func (u *Queueconversationscreenshareeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationscreenshareeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicjourneyactionmap.go b/platformclientv2/queueconversationscreenshareeventtopicjourneyactionmap.go index 219b9f2be..65c079905 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationscreenshareeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationscreenshareeventtopicjourneyactionmap struct { } +func (u *Queueconversationscreenshareeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicjourneycontext.go b/platformclientv2/queueconversationscreenshareeventtopicjourneycontext.go index 4b36ce682..07994dca0 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicjourneycontext.go +++ b/platformclientv2/queueconversationscreenshareeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationscreenshareeventtopicjourneycontext struct { } +func (u *Queueconversationscreenshareeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationscreenshareeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationscreenshareeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationscreenshareeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicjourneycustomer.go b/platformclientv2/queueconversationscreenshareeventtopicjourneycustomer.go index ff32b11a7..171326a03 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationscreenshareeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationscreenshareeventtopicjourneycustomer struct { } +func (u *Queueconversationscreenshareeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicjourneycustomersession.go b/platformclientv2/queueconversationscreenshareeventtopicjourneycustomersession.go index 62cb3436b..90385b6de 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationscreenshareeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationscreenshareeventtopicjourneycustomersession struct { } +func (u *Queueconversationscreenshareeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicscoredagent.go b/platformclientv2/queueconversationscreenshareeventtopicscoredagent.go index 62bf56f30..9d314117c 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicscoredagent.go +++ b/platformclientv2/queueconversationscreenshareeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationscreenshareeventtopicscoredagent struct { } +func (u *Queueconversationscreenshareeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationscreenshareeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicscreenshareconversation.go b/platformclientv2/queueconversationscreenshareeventtopicscreenshareconversation.go index b501163ce..d515eda6c 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicscreenshareconversation.go +++ b/platformclientv2/queueconversationscreenshareeventtopicscreenshareconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Queueconversationscreenshareeventtopicscreenshareconversation struct { } +func (u *Queueconversationscreenshareeventtopicscreenshareconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicscreenshareconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Participants *[]Queueconversationscreenshareeventtopicscreensharemediaparticipant `json:"participants,omitempty"` + + OtherMediaUris *[]string `json:"otherMediaUris,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Participants: u.Participants, + + OtherMediaUris: u.OtherMediaUris, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicscreenshareconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicscreensharemediaparticipant.go b/platformclientv2/queueconversationscreenshareeventtopicscreensharemediaparticipant.go index c4c876b04..c7d89595d 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicscreensharemediaparticipant.go +++ b/platformclientv2/queueconversationscreenshareeventtopicscreensharemediaparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -157,6 +158,214 @@ type Queueconversationscreenshareeventtopicscreensharemediaparticipant struct { } +func (u *Queueconversationscreenshareeventtopicscreensharemediaparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicscreensharemediaparticipant + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Address *string `json:"address,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + State *string `json:"state,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Held *bool `json:"held,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + User *Queueconversationscreenshareeventtopicurireference `json:"user,omitempty"` + + Queue *Queueconversationscreenshareeventtopicurireference `json:"queue,omitempty"` + + Team *Queueconversationscreenshareeventtopicurireference `json:"team,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + ErrorInfo *Queueconversationscreenshareeventtopicerrorbody `json:"errorInfo,omitempty"` + + Script *Queueconversationscreenshareeventtopicurireference `json:"script,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + WrapupSkipped *bool `json:"wrapupSkipped,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ExternalContact *Queueconversationscreenshareeventtopicurireference `json:"externalContact,omitempty"` + + ExternalOrganization *Queueconversationscreenshareeventtopicurireference `json:"externalOrganization,omitempty"` + + Wrapup *Queueconversationscreenshareeventtopicwrapup `json:"wrapup,omitempty"` + + ConversationRoutingData *Queueconversationscreenshareeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + Peer *string `json:"peer,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + JourneyContext *Queueconversationscreenshareeventtopicjourneycontext `json:"journeyContext,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + Context *string `json:"context,omitempty"` + + PeerCount *int `json:"peerCount,omitempty"` + + Sharing *bool `json:"sharing,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Address: u.Address, + + StartTime: StartTime, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + StartHoldTime: StartHoldTime, + + Purpose: u.Purpose, + + State: u.State, + + Direction: u.Direction, + + DisconnectType: u.DisconnectType, + + Held: u.Held, + + WrapupRequired: u.WrapupRequired, + + WrapupPrompt: u.WrapupPrompt, + + User: u.User, + + Queue: u.Queue, + + Team: u.Team, + + Attributes: u.Attributes, + + ErrorInfo: u.ErrorInfo, + + Script: u.Script, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + WrapupSkipped: u.WrapupSkipped, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + Provider: u.Provider, + + ExternalContact: u.ExternalContact, + + ExternalOrganization: u.ExternalOrganization, + + Wrapup: u.Wrapup, + + ConversationRoutingData: u.ConversationRoutingData, + + Peer: u.Peer, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + JourneyContext: u.JourneyContext, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + Context: u.Context, + + PeerCount: u.PeerCount, + + Sharing: u.Sharing, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicscreensharemediaparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicurireference.go b/platformclientv2/queueconversationscreenshareeventtopicurireference.go index 5a8c55f6b..5e5f46b73 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicurireference.go +++ b/platformclientv2/queueconversationscreenshareeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationscreenshareeventtopicurireference struct { } +func (u *Queueconversationscreenshareeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationscreenshareeventtopicwrapup.go b/platformclientv2/queueconversationscreenshareeventtopicwrapup.go index c902b97a2..f25f00e25 100644 --- a/platformclientv2/queueconversationscreenshareeventtopicwrapup.go +++ b/platformclientv2/queueconversationscreenshareeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationscreenshareeventtopicwrapup struct { } +func (u *Queueconversationscreenshareeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationscreenshareeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationscreenshareeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicaddress.go b/platformclientv2/queueconversationsocialexpressioneventtopicaddress.go index 3c435b184..d36eb8c74 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicaddress.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationsocialexpressioneventtopicaddress struct { } +func (u *Queueconversationsocialexpressioneventtopicaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicaddress + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + NameRaw *string `json:"nameRaw,omitempty"` + + AddressNormalized *string `json:"addressNormalized,omitempty"` + + AddressRaw *string `json:"addressRaw,omitempty"` + + AddressDisplayable *string `json:"addressDisplayable,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Name: u.Name, + + NameRaw: u.NameRaw, + + AddressNormalized: u.AddressNormalized, + + AddressRaw: u.AddressRaw, + + AddressDisplayable: u.AddressDisplayable, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicaftercallwork.go b/platformclientv2/queueconversationsocialexpressioneventtopicaftercallwork.go index 2344320f5..f410e63ec 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicaftercallwork.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicaftercallwork.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Queueconversationsocialexpressioneventtopicaftercallwork struct { } +func (u *Queueconversationsocialexpressioneventtopicaftercallwork) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicaftercallwork + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + *Alias + }{ + State: u.State, + + StartTime: StartTime, + + EndTime: EndTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicaftercallwork) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicattachment.go b/platformclientv2/queueconversationsocialexpressioneventtopicattachment.go index ac2f6fdbc..e14c92942 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicattachment.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationsocialexpressioneventtopicattachment struct { } +func (u *Queueconversationsocialexpressioneventtopicattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicattachment + + + + return json.Marshal(&struct { + AttachmentId *string `json:"attachmentId,omitempty"` + + Name *string `json:"name,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + AttachmentId: u.AttachmentId, + + Name: u.Name, + + ContentUri: u.ContentUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopiccall.go b/platformclientv2/queueconversationsocialexpressioneventtopiccall.go index 762bb707f..2ea4cf7cb 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopiccall.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopiccall.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,150 @@ type Queueconversationsocialexpressioneventtopiccall struct { } +func (u *Queueconversationsocialexpressioneventtopiccall) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopiccall + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Queueconversationsocialexpressioneventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + Self *Queueconversationsocialexpressioneventtopicaddress `json:"self,omitempty"` + + Other *Queueconversationsocialexpressioneventtopicaddress `json:"other,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + DisconnectReasons *[]Queueconversationsocialexpressioneventtopicdisconnectreason `json:"disconnectReasons,omitempty"` + + FaxStatus *Queueconversationsocialexpressioneventtopicfaxstatus `json:"faxStatus,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Muted: u.Muted, + + Confined: u.Confined, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + Direction: u.Direction, + + DocumentId: u.DocumentId, + + Self: u.Self, + + Other: u.Other, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + DisconnectReasons: u.DisconnectReasons, + + FaxStatus: u.FaxStatus, + + UuiData: u.UuiData, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AgentAssistantId: u.AgentAssistantId, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopiccall) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopiccallback.go b/platformclientv2/queueconversationsocialexpressioneventtopiccallback.go index fe5a474e0..604af3006 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopiccallback.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopiccallback.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,154 @@ type Queueconversationsocialexpressioneventtopiccallback struct { } +func (u *Queueconversationsocialexpressioneventtopiccallback) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopiccallback + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DialerPreview *Queueconversationsocialexpressioneventtopicdialerpreview `json:"dialerPreview,omitempty"` + + Voicemail *Queueconversationsocialexpressioneventtopicvoicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + Provider *string `json:"provider,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Direction: u.Direction, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DialerPreview: u.DialerPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ExternalCampaign: u.ExternalCampaign, + + SkipEnabled: u.SkipEnabled, + + Provider: u.Provider, + + TimeoutSeconds: u.TimeoutSeconds, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopiccallback) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicchat.go b/platformclientv2/queueconversationsocialexpressioneventtopicchat.go index cf0903dc4..df25dd7e3 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicchat.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicchat.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Queueconversationsocialexpressioneventtopicchat struct { } +func (u *Queueconversationsocialexpressioneventtopicchat) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicchat + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + JourneyContext *Queueconversationsocialexpressioneventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + RoomId: u.RoomId, + + AvatarImageUrl: u.AvatarImageUrl, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicchat) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopiccobrowse.go b/platformclientv2/queueconversationsocialexpressioneventtopiccobrowse.go index 7361f0bba..868f76837 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopiccobrowse.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopiccobrowse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Queueconversationsocialexpressioneventtopiccobrowse struct { } +func (u *Queueconversationsocialexpressioneventtopiccobrowse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopiccobrowse + + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Id *string `json:"id,omitempty"` + + Self *Queueconversationsocialexpressioneventtopicaddress `json:"self,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + DisconnectType: u.DisconnectType, + + Id: u.Id, + + Self: u.Self, + + RoomId: u.RoomId, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + Controlling: u.Controlling, + + ViewerUrl: u.ViewerUrl, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ProviderEventTime: ProviderEventTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopiccobrowse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicconversation.go b/platformclientv2/queueconversationsocialexpressioneventtopicconversation.go index 23c659ed5..99e5ec36e 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicconversation.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationsocialexpressioneventtopicconversation struct { } +func (u *Queueconversationsocialexpressioneventtopicconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + + Participants *[]Queueconversationsocialexpressioneventtopicparticipant `json:"participants,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Address *string `json:"address,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + *Alias + }{ + Id: u.Id, + + MaxParticipants: u.MaxParticipants, + + Participants: u.Participants, + + RecordingState: u.RecordingState, + + Address: u.Address, + + ExternalTag: u.ExternalTag, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicconversationroutingdata.go b/platformclientv2/queueconversationsocialexpressioneventtopicconversationroutingdata.go index eb9d9f149..cd3dabfae 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationsocialexpressioneventtopicconversationroutingdata struct { } +func (u *Queueconversationsocialexpressioneventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationsocialexpressioneventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationsocialexpressioneventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationsocialexpressioneventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationsocialexpressioneventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicdialerpreview.go b/platformclientv2/queueconversationsocialexpressioneventtopicdialerpreview.go index d022432f1..9214b42af 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicdialerpreview.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicdialerpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationsocialexpressioneventtopicdialerpreview struct { } +func (u *Queueconversationsocialexpressioneventtopicdialerpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicdialerpreview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + CampaignId *string `json:"campaignId,omitempty"` + + PhoneNumberColumns *[]Queueconversationsocialexpressioneventtopicphonenumbercolumn `json:"phoneNumberColumns,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactId: u.ContactId, + + ContactListId: u.ContactListId, + + CampaignId: u.CampaignId, + + PhoneNumberColumns: u.PhoneNumberColumns, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicdialerpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicdisconnectreason.go b/platformclientv2/queueconversationsocialexpressioneventtopicdisconnectreason.go index b1186efc3..e527508be 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicdisconnectreason.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicdisconnectreason.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationsocialexpressioneventtopicdisconnectreason struct { } +func (u *Queueconversationsocialexpressioneventtopicdisconnectreason) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicdisconnectreason + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Code *int `json:"code,omitempty"` + + Phrase *string `json:"phrase,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Code: u.Code, + + Phrase: u.Phrase, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicdisconnectreason) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicemail.go b/platformclientv2/queueconversationsocialexpressioneventtopicemail.go index 3cc5fe580..803f08c7e 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicemail.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicemail.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -97,6 +98,130 @@ type Queueconversationsocialexpressioneventtopicemail struct { } +func (u *Queueconversationsocialexpressioneventtopicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicemail + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + Subject *string `json:"subject,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + ErrorInfo *Queueconversationsocialexpressioneventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DraftAttachments *[]Queueconversationsocialexpressioneventtopicattachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + AutoGenerated: u.AutoGenerated, + + Subject: u.Subject, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + MessagesSent: u.MessagesSent, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + MessageId: u.MessageId, + + Direction: u.Direction, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicerrordetails.go b/platformclientv2/queueconversationsocialexpressioneventtopicerrordetails.go index c5c832199..668d48bf2 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicerrordetails.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicerrordetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queueconversationsocialexpressioneventtopicerrordetails struct { } +func (u *Queueconversationsocialexpressioneventtopicerrordetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicerrordetails + + + + return json.Marshal(&struct { + Status *int `json:"status,omitempty"` + + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Uri *string `json:"uri,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Status: u.Status, + + Code: u.Code, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Uri: u.Uri, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicerrordetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicfaxstatus.go b/platformclientv2/queueconversationsocialexpressioneventtopicfaxstatus.go index 3e5717d1e..4ddbdac08 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicfaxstatus.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicfaxstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queueconversationsocialexpressioneventtopicfaxstatus struct { } +func (u *Queueconversationsocialexpressioneventtopicfaxstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicfaxstatus + + + + return json.Marshal(&struct { + Direction *string `json:"direction,omitempty"` + + ExpectedPages *int `json:"expectedPages,omitempty"` + + ActivePage *int `json:"activePage,omitempty"` + + LinesTransmitted *int `json:"linesTransmitted,omitempty"` + + BytesTransmitted *int `json:"bytesTransmitted,omitempty"` + + BaudRate *int `json:"baudRate,omitempty"` + + PageErrors *int `json:"pageErrors,omitempty"` + + LineErrors *int `json:"lineErrors,omitempty"` + *Alias + }{ + Direction: u.Direction, + + ExpectedPages: u.ExpectedPages, + + ActivePage: u.ActivePage, + + LinesTransmitted: u.LinesTransmitted, + + BytesTransmitted: u.BytesTransmitted, + + BaudRate: u.BaudRate, + + PageErrors: u.PageErrors, + + LineErrors: u.LineErrors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicfaxstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicjourneyaction.go b/platformclientv2/queueconversationsocialexpressioneventtopicjourneyaction.go index ade2e539a..6201c7a5a 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicjourneyaction.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicjourneyaction struct { } +func (u *Queueconversationsocialexpressioneventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationsocialexpressioneventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicjourneyactionmap.go b/platformclientv2/queueconversationsocialexpressioneventtopicjourneyactionmap.go index 0ad17b726..877008db5 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicjourneyactionmap struct { } +func (u *Queueconversationsocialexpressioneventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicjourneycontext.go b/platformclientv2/queueconversationsocialexpressioneventtopicjourneycontext.go index d6ef15705..7dcb8f207 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicjourneycontext.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationsocialexpressioneventtopicjourneycontext struct { } +func (u *Queueconversationsocialexpressioneventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationsocialexpressioneventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationsocialexpressioneventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationsocialexpressioneventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomer.go b/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomer.go index 844789461..a67f1971e 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicjourneycustomer struct { } +func (u *Queueconversationsocialexpressioneventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomersession.go b/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomersession.go index acdca5def..04da225c2 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicjourneycustomersession struct { } +func (u *Queueconversationsocialexpressioneventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicmessage.go b/platformclientv2/queueconversationsocialexpressioneventtopicmessage.go index e7c971e38..bdef9678e 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicmessage.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -101,6 +102,134 @@ type Queueconversationsocialexpressioneventtopicmessage struct { } +func (u *Queueconversationsocialexpressioneventtopicmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicmessage + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Queueconversationsocialexpressioneventtopicerrordetails `json:"errorInfo,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + ToAddress *Queueconversationsocialexpressioneventtopicaddress `json:"toAddress,omitempty"` + + FromAddress *Queueconversationsocialexpressioneventtopicaddress `json:"fromAddress,omitempty"` + + Messages *[]Queueconversationsocialexpressioneventtopicmessagedetails `json:"messages,omitempty"` + + MessagesTranscriptUri *string `json:"messagesTranscriptUri,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + + JourneyContext *Queueconversationsocialexpressioneventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + ToAddress: u.ToAddress, + + FromAddress: u.FromAddress, + + Messages: u.Messages, + + MessagesTranscriptUri: u.MessagesTranscriptUri, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicmessagedetails.go b/platformclientv2/queueconversationsocialexpressioneventtopicmessagedetails.go index 9a6f244c2..ecbd7681d 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicmessagedetails.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicmessagedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationsocialexpressioneventtopicmessagedetails struct { } +func (u *Queueconversationsocialexpressioneventtopicmessagedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicmessagedetails + + + MessageTime := new(string) + if u.MessageTime != nil { + + *MessageTime = timeutil.Strftime(u.MessageTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + MessageTime = nil + } + + + return json.Marshal(&struct { + MessageId *string `json:"messageId,omitempty"` + + MessageTime *string `json:"messageTime,omitempty"` + + MessageStatus *string `json:"messageStatus,omitempty"` + + MessageSegmentCount *int `json:"messageSegmentCount,omitempty"` + + Media *[]Queueconversationsocialexpressioneventtopicmessagemedia `json:"media,omitempty"` + + Stickers *[]Queueconversationsocialexpressioneventtopicmessagesticker `json:"stickers,omitempty"` + *Alias + }{ + MessageId: u.MessageId, + + MessageTime: MessageTime, + + MessageStatus: u.MessageStatus, + + MessageSegmentCount: u.MessageSegmentCount, + + Media: u.Media, + + Stickers: u.Stickers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicmessagedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicmessagemedia.go b/platformclientv2/queueconversationsocialexpressioneventtopicmessagemedia.go index d878eef23..7aabd69b0 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicmessagemedia.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicmessagemedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationsocialexpressioneventtopicmessagemedia struct { } +func (u *Queueconversationsocialexpressioneventtopicmessagemedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicmessagemedia + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicmessagemedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicmessagesticker.go b/platformclientv2/queueconversationsocialexpressioneventtopicmessagesticker.go index af35d52a9..21552c26a 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicmessagesticker.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicmessagesticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicmessagesticker struct { } +func (u *Queueconversationsocialexpressioneventtopicmessagesticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicmessagesticker + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicmessagesticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicparticipant.go b/platformclientv2/queueconversationsocialexpressioneventtopicparticipant.go index 157801921..bf415bdac 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicparticipant.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -157,6 +158,198 @@ type Queueconversationsocialexpressioneventtopicparticipant struct { } +func (u *Queueconversationsocialexpressioneventtopicparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicparticipant + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + UserId *string `json:"userId,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + Name *string `json:"name,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + Address *string `json:"address,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupExpected *bool `json:"wrapupExpected,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + ConversationRoutingData *Queueconversationsocialexpressioneventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + Calls *[]Queueconversationsocialexpressioneventtopiccall `json:"calls,omitempty"` + + Callbacks *[]Queueconversationsocialexpressioneventtopiccallback `json:"callbacks,omitempty"` + + Chats *[]Queueconversationsocialexpressioneventtopicchat `json:"chats,omitempty"` + + Cobrowsesessions *[]Queueconversationsocialexpressioneventtopiccobrowse `json:"cobrowsesessions,omitempty"` + + Emails *[]Queueconversationsocialexpressioneventtopicemail `json:"emails,omitempty"` + + Messages *[]Queueconversationsocialexpressioneventtopicmessage `json:"messages,omitempty"` + + Screenshares *[]Queueconversationsocialexpressioneventtopicscreenshare `json:"screenshares,omitempty"` + + SocialExpressions *[]Queueconversationsocialexpressioneventtopicsocialexpression `json:"socialExpressions,omitempty"` + + Videos *[]Queueconversationsocialexpressioneventtopicvideo `json:"videos,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + UserId: u.UserId, + + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + Name: u.Name, + + QueueId: u.QueueId, + + GroupId: u.GroupId, + + TeamId: u.TeamId, + + Purpose: u.Purpose, + + ConsultParticipantId: u.ConsultParticipantId, + + Address: u.Address, + + WrapupRequired: u.WrapupRequired, + + WrapupExpected: u.WrapupExpected, + + WrapupPrompt: u.WrapupPrompt, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + Wrapup: u.Wrapup, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + ConversationRoutingData: u.ConversationRoutingData, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + Attributes: u.Attributes, + + Calls: u.Calls, + + Callbacks: u.Callbacks, + + Chats: u.Chats, + + Cobrowsesessions: u.Cobrowsesessions, + + Emails: u.Emails, + + Messages: u.Messages, + + Screenshares: u.Screenshares, + + SocialExpressions: u.SocialExpressions, + + Videos: u.Videos, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicphonenumbercolumn.go b/platformclientv2/queueconversationsocialexpressioneventtopicphonenumbercolumn.go index 1b8304416..888bbb820 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicphonenumbercolumn.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationsocialexpressioneventtopicphonenumbercolumn struct { } +func (u *Queueconversationsocialexpressioneventtopicphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicscoredagent.go b/platformclientv2/queueconversationsocialexpressioneventtopicscoredagent.go index d995e3fe5..91dd34bd9 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicscoredagent.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicscoredagent struct { } +func (u *Queueconversationsocialexpressioneventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationsocialexpressioneventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicscreenshare.go b/platformclientv2/queueconversationsocialexpressioneventtopicscreenshare.go index 4f9195b9d..216a00a62 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicscreenshare.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicscreenshare.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Queueconversationsocialexpressioneventtopicscreenshare struct { } +func (u *Queueconversationsocialexpressioneventtopicscreenshare) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicscreenshare + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Queueconversationsocialexpressioneventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + Sharing *bool `json:"sharing,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + Sharing: u.Sharing, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicscreenshare) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicsocialexpression.go b/platformclientv2/queueconversationsocialexpressioneventtopicsocialexpression.go index a54b4b8a5..05bd0dbd3 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicsocialexpression.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicsocialexpression.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Queueconversationsocialexpressioneventtopicsocialexpression struct { } +func (u *Queueconversationsocialexpressioneventtopicsocialexpression) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicsocialexpression + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + SocialMediaId *string `json:"socialMediaId,omitempty"` + + SocialMediaHub *string `json:"socialMediaHub,omitempty"` + + SocialUserName *string `json:"socialUserName,omitempty"` + + PreviewText *string `json:"previewText,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Held *bool `json:"held,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + SocialMediaId: u.SocialMediaId, + + SocialMediaHub: u.SocialMediaHub, + + SocialUserName: u.SocialUserName, + + PreviewText: u.PreviewText, + + RecordingId: u.RecordingId, + + Held: u.Held, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicsocialexpression) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicurireference.go b/platformclientv2/queueconversationsocialexpressioneventtopicurireference.go index ebeaecbad..0e098c58b 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicurireference.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicurireference struct { } +func (u *Queueconversationsocialexpressioneventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicvideo.go b/platformclientv2/queueconversationsocialexpressioneventtopicvideo.go index f4716bf31..0a9b1a1ec 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicvideo.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicvideo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Queueconversationsocialexpressioneventtopicvideo struct { } +func (u *Queueconversationsocialexpressioneventtopicvideo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicvideo + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Queueconversationsocialexpressioneventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + AudioMuted *bool `json:"audioMuted,omitempty"` + + VideoMuted *bool `json:"videoMuted,omitempty"` + + SharingScreen *bool `json:"sharingScreen,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Msids *[]string `json:"msids,omitempty"` + + Wrapup *Queueconversationsocialexpressioneventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationsocialexpressioneventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + AudioMuted: u.AudioMuted, + + VideoMuted: u.VideoMuted, + + SharingScreen: u.SharingScreen, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Msids: u.Msids, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicvideo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicvoicemail.go b/platformclientv2/queueconversationsocialexpressioneventtopicvoicemail.go index f3df372da..34e29aa96 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicvoicemail.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicvoicemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationsocialexpressioneventtopicvoicemail struct { } +func (u *Queueconversationsocialexpressioneventtopicvoicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicvoicemail + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + UploadStatus: u.UploadStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicvoicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationsocialexpressioneventtopicwrapup.go b/platformclientv2/queueconversationsocialexpressioneventtopicwrapup.go index bdf0416d7..be32ffa97 100644 --- a/platformclientv2/queueconversationsocialexpressioneventtopicwrapup.go +++ b/platformclientv2/queueconversationsocialexpressioneventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationsocialexpressioneventtopicwrapup struct { } +func (u *Queueconversationsocialexpressioneventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationsocialexpressioneventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationsocialexpressioneventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicaddress.go b/platformclientv2/queueconversationvideoeventtopicaddress.go index 958f43f3d..ce14aaf9c 100644 --- a/platformclientv2/queueconversationvideoeventtopicaddress.go +++ b/platformclientv2/queueconversationvideoeventtopicaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationvideoeventtopicaddress struct { } +func (u *Queueconversationvideoeventtopicaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicaddress + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + NameRaw *string `json:"nameRaw,omitempty"` + + AddressNormalized *string `json:"addressNormalized,omitempty"` + + AddressRaw *string `json:"addressRaw,omitempty"` + + AddressDisplayable *string `json:"addressDisplayable,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Name: u.Name, + + NameRaw: u.NameRaw, + + AddressNormalized: u.AddressNormalized, + + AddressRaw: u.AddressRaw, + + AddressDisplayable: u.AddressDisplayable, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicaftercallwork.go b/platformclientv2/queueconversationvideoeventtopicaftercallwork.go index ac85c3bdc..45997af8b 100644 --- a/platformclientv2/queueconversationvideoeventtopicaftercallwork.go +++ b/platformclientv2/queueconversationvideoeventtopicaftercallwork.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Queueconversationvideoeventtopicaftercallwork struct { } +func (u *Queueconversationvideoeventtopicaftercallwork) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicaftercallwork + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + *Alias + }{ + State: u.State, + + StartTime: StartTime, + + EndTime: EndTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicaftercallwork) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicattachment.go b/platformclientv2/queueconversationvideoeventtopicattachment.go index c95491d30..34e5e9eeb 100644 --- a/platformclientv2/queueconversationvideoeventtopicattachment.go +++ b/platformclientv2/queueconversationvideoeventtopicattachment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationvideoeventtopicattachment struct { } +func (u *Queueconversationvideoeventtopicattachment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicattachment + + + + return json.Marshal(&struct { + AttachmentId *string `json:"attachmentId,omitempty"` + + Name *string `json:"name,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + AttachmentId: u.AttachmentId, + + Name: u.Name, + + ContentUri: u.ContentUri, + + ContentType: u.ContentType, + + ContentLength: u.ContentLength, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicattachment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopiccall.go b/platformclientv2/queueconversationvideoeventtopiccall.go index f62d62278..ee3bb2675 100644 --- a/platformclientv2/queueconversationvideoeventtopiccall.go +++ b/platformclientv2/queueconversationvideoeventtopiccall.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -117,6 +118,150 @@ type Queueconversationvideoeventtopiccall struct { } +func (u *Queueconversationvideoeventtopiccall) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopiccall + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Recording *bool `json:"recording,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Muted *bool `json:"muted,omitempty"` + + Confined *bool `json:"confined,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Queueconversationvideoeventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + + Self *Queueconversationvideoeventtopicaddress `json:"self,omitempty"` + + Other *Queueconversationvideoeventtopicaddress `json:"other,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + DisconnectReasons *[]Queueconversationvideoeventtopicdisconnectreason `json:"disconnectReasons,omitempty"` + + FaxStatus *Queueconversationvideoeventtopicfaxstatus `json:"faxStatus,omitempty"` + + UuiData *string `json:"uuiData,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Recording: u.Recording, + + RecordingState: u.RecordingState, + + Muted: u.Muted, + + Confined: u.Confined, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + Direction: u.Direction, + + DocumentId: u.DocumentId, + + Self: u.Self, + + Other: u.Other, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + DisconnectReasons: u.DisconnectReasons, + + FaxStatus: u.FaxStatus, + + UuiData: u.UuiData, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AgentAssistantId: u.AgentAssistantId, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopiccall) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopiccallback.go b/platformclientv2/queueconversationvideoeventtopiccallback.go index 3021399c0..fefe2105c 100644 --- a/platformclientv2/queueconversationvideoeventtopiccallback.go +++ b/platformclientv2/queueconversationvideoeventtopiccallback.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,154 @@ type Queueconversationvideoeventtopiccallback struct { } +func (u *Queueconversationvideoeventtopiccallback) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopiccallback + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + CallbackScheduledTime := new(string) + if u.CallbackScheduledTime != nil { + + *CallbackScheduledTime = timeutil.Strftime(u.CallbackScheduledTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CallbackScheduledTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Direction *string `json:"direction,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + DialerPreview *Queueconversationvideoeventtopicdialerpreview `json:"dialerPreview,omitempty"` + + Voicemail *Queueconversationvideoeventtopicvoicemail `json:"voicemail,omitempty"` + + CallbackNumbers *[]string `json:"callbackNumbers,omitempty"` + + CallbackUserName *string `json:"callbackUserName,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ExternalCampaign *bool `json:"externalCampaign,omitempty"` + + SkipEnabled *bool `json:"skipEnabled,omitempty"` + + Provider *string `json:"provider,omitempty"` + + TimeoutSeconds *int `json:"timeoutSeconds,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + CallbackScheduledTime *string `json:"callbackScheduledTime,omitempty"` + + AutomatedCallbackConfigId *string `json:"automatedCallbackConfigId,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + CallerId *string `json:"callerId,omitempty"` + + CallerIdName *string `json:"callerIdName,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Direction: u.Direction, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + DialerPreview: u.DialerPreview, + + Voicemail: u.Voicemail, + + CallbackNumbers: u.CallbackNumbers, + + CallbackUserName: u.CallbackUserName, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ExternalCampaign: u.ExternalCampaign, + + SkipEnabled: u.SkipEnabled, + + Provider: u.Provider, + + TimeoutSeconds: u.TimeoutSeconds, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + CallbackScheduledTime: CallbackScheduledTime, + + AutomatedCallbackConfigId: u.AutomatedCallbackConfigId, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + CallerId: u.CallerId, + + CallerIdName: u.CallerIdName, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopiccallback) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicchat.go b/platformclientv2/queueconversationvideoeventtopicchat.go index 941923c8f..9b5f5652c 100644 --- a/platformclientv2/queueconversationvideoeventtopicchat.go +++ b/platformclientv2/queueconversationvideoeventtopicchat.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Queueconversationvideoeventtopicchat struct { } +func (u *Queueconversationvideoeventtopicchat) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicchat + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + JourneyContext *Queueconversationvideoeventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + RoomId: u.RoomId, + + AvatarImageUrl: u.AvatarImageUrl, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicchat) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopiccobrowse.go b/platformclientv2/queueconversationvideoeventtopiccobrowse.go index 9b5f5df39..f918c892b 100644 --- a/platformclientv2/queueconversationvideoeventtopiccobrowse.go +++ b/platformclientv2/queueconversationvideoeventtopiccobrowse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Queueconversationvideoeventtopiccobrowse struct { } +func (u *Queueconversationvideoeventtopiccobrowse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopiccobrowse + + + ProviderEventTime := new(string) + if u.ProviderEventTime != nil { + + *ProviderEventTime = timeutil.Strftime(u.ProviderEventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ProviderEventTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + Id *string `json:"id,omitempty"` + + Self *Queueconversationvideoeventtopicaddress `json:"self,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + CobrowseSessionId *string `json:"cobrowseSessionId,omitempty"` + + CobrowseRole *string `json:"cobrowseRole,omitempty"` + + Controlling *[]string `json:"controlling,omitempty"` + + ViewerUrl *string `json:"viewerUrl,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + ProviderEventTime *string `json:"providerEventTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + DisconnectType: u.DisconnectType, + + Id: u.Id, + + Self: u.Self, + + RoomId: u.RoomId, + + CobrowseSessionId: u.CobrowseSessionId, + + CobrowseRole: u.CobrowseRole, + + Controlling: u.Controlling, + + ViewerUrl: u.ViewerUrl, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + ProviderEventTime: ProviderEventTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopiccobrowse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicconversation.go b/platformclientv2/queueconversationvideoeventtopicconversation.go index 492520daa..ad35ad9df 100644 --- a/platformclientv2/queueconversationvideoeventtopicconversation.go +++ b/platformclientv2/queueconversationvideoeventtopicconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationvideoeventtopicconversation struct { } +func (u *Queueconversationvideoeventtopicconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MaxParticipants *int `json:"maxParticipants,omitempty"` + + Participants *[]Queueconversationvideoeventtopicparticipant `json:"participants,omitempty"` + + RecordingState *string `json:"recordingState,omitempty"` + + Address *string `json:"address,omitempty"` + + ExternalTag *string `json:"externalTag,omitempty"` + *Alias + }{ + Id: u.Id, + + MaxParticipants: u.MaxParticipants, + + Participants: u.Participants, + + RecordingState: u.RecordingState, + + Address: u.Address, + + ExternalTag: u.ExternalTag, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicconversationroutingdata.go b/platformclientv2/queueconversationvideoeventtopicconversationroutingdata.go index 7c0d256ce..359c0ce09 100644 --- a/platformclientv2/queueconversationvideoeventtopicconversationroutingdata.go +++ b/platformclientv2/queueconversationvideoeventtopicconversationroutingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationvideoeventtopicconversationroutingdata struct { } +func (u *Queueconversationvideoeventtopicconversationroutingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicconversationroutingdata + + + + return json.Marshal(&struct { + Queue *Queueconversationvideoeventtopicurireference `json:"queue,omitempty"` + + Language *Queueconversationvideoeventtopicurireference `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + + Skills *[]Queueconversationvideoeventtopicurireference `json:"skills,omitempty"` + + ScoredAgents *[]Queueconversationvideoeventtopicscoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + Queue: u.Queue, + + Language: u.Language, + + Priority: u.Priority, + + Skills: u.Skills, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicconversationroutingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicdialerpreview.go b/platformclientv2/queueconversationvideoeventtopicdialerpreview.go index aed121fc2..66e918e82 100644 --- a/platformclientv2/queueconversationvideoeventtopicdialerpreview.go +++ b/platformclientv2/queueconversationvideoeventtopicdialerpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Queueconversationvideoeventtopicdialerpreview struct { } +func (u *Queueconversationvideoeventtopicdialerpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicdialerpreview + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactId *string `json:"contactId,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + CampaignId *string `json:"campaignId,omitempty"` + + PhoneNumberColumns *[]Queueconversationvideoeventtopicphonenumbercolumn `json:"phoneNumberColumns,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactId: u.ContactId, + + ContactListId: u.ContactListId, + + CampaignId: u.CampaignId, + + PhoneNumberColumns: u.PhoneNumberColumns, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicdialerpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicdisconnectreason.go b/platformclientv2/queueconversationvideoeventtopicdisconnectreason.go index 3fefcee80..cd5bac335 100644 --- a/platformclientv2/queueconversationvideoeventtopicdisconnectreason.go +++ b/platformclientv2/queueconversationvideoeventtopicdisconnectreason.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationvideoeventtopicdisconnectreason struct { } +func (u *Queueconversationvideoeventtopicdisconnectreason) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicdisconnectreason + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Code *int `json:"code,omitempty"` + + Phrase *string `json:"phrase,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Code: u.Code, + + Phrase: u.Phrase, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicdisconnectreason) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicemail.go b/platformclientv2/queueconversationvideoeventtopicemail.go index 7035fcc4c..33054edba 100644 --- a/platformclientv2/queueconversationvideoeventtopicemail.go +++ b/platformclientv2/queueconversationvideoeventtopicemail.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -97,6 +98,130 @@ type Queueconversationvideoeventtopicemail struct { } +func (u *Queueconversationvideoeventtopicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicemail + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + AutoGenerated *bool `json:"autoGenerated,omitempty"` + + Subject *string `json:"subject,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + MessagesSent *int `json:"messagesSent,omitempty"` + + ErrorInfo *Queueconversationvideoeventtopicerrordetails `json:"errorInfo,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + MessageId *string `json:"messageId,omitempty"` + + Direction *string `json:"direction,omitempty"` + + DraftAttachments *[]Queueconversationvideoeventtopicattachment `json:"draftAttachments,omitempty"` + + Spam *bool `json:"spam,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + AutoGenerated: u.AutoGenerated, + + Subject: u.Subject, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + MessagesSent: u.MessagesSent, + + ErrorInfo: u.ErrorInfo, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + MessageId: u.MessageId, + + Direction: u.Direction, + + DraftAttachments: u.DraftAttachments, + + Spam: u.Spam, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicerrordetails.go b/platformclientv2/queueconversationvideoeventtopicerrordetails.go index 72c82f148..60c36e55b 100644 --- a/platformclientv2/queueconversationvideoeventtopicerrordetails.go +++ b/platformclientv2/queueconversationvideoeventtopicerrordetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queueconversationvideoeventtopicerrordetails struct { } +func (u *Queueconversationvideoeventtopicerrordetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicerrordetails + + + + return json.Marshal(&struct { + Status *int `json:"status,omitempty"` + + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + MessageWithParams *string `json:"messageWithParams,omitempty"` + + MessageParams *map[string]string `json:"messageParams,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Uri *string `json:"uri,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Status: u.Status, + + Code: u.Code, + + Message: u.Message, + + MessageWithParams: u.MessageWithParams, + + MessageParams: u.MessageParams, + + ContextId: u.ContextId, + + Uri: u.Uri, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicerrordetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicfaxstatus.go b/platformclientv2/queueconversationvideoeventtopicfaxstatus.go index 7301e3bef..93d1afbdf 100644 --- a/platformclientv2/queueconversationvideoeventtopicfaxstatus.go +++ b/platformclientv2/queueconversationvideoeventtopicfaxstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queueconversationvideoeventtopicfaxstatus struct { } +func (u *Queueconversationvideoeventtopicfaxstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicfaxstatus + + + + return json.Marshal(&struct { + Direction *string `json:"direction,omitempty"` + + ExpectedPages *int `json:"expectedPages,omitempty"` + + ActivePage *int `json:"activePage,omitempty"` + + LinesTransmitted *int `json:"linesTransmitted,omitempty"` + + BytesTransmitted *int `json:"bytesTransmitted,omitempty"` + + BaudRate *int `json:"baudRate,omitempty"` + + PageErrors *int `json:"pageErrors,omitempty"` + + LineErrors *int `json:"lineErrors,omitempty"` + *Alias + }{ + Direction: u.Direction, + + ExpectedPages: u.ExpectedPages, + + ActivePage: u.ActivePage, + + LinesTransmitted: u.LinesTransmitted, + + BytesTransmitted: u.BytesTransmitted, + + BaudRate: u.BaudRate, + + PageErrors: u.PageErrors, + + LineErrors: u.LineErrors, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicfaxstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicjourneyaction.go b/platformclientv2/queueconversationvideoeventtopicjourneyaction.go index 7ab43d81b..d5cc296e5 100644 --- a/platformclientv2/queueconversationvideoeventtopicjourneyaction.go +++ b/platformclientv2/queueconversationvideoeventtopicjourneyaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicjourneyaction struct { } +func (u *Queueconversationvideoeventtopicjourneyaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicjourneyaction + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ActionMap *Queueconversationvideoeventtopicjourneyactionmap `json:"actionMap,omitempty"` + *Alias + }{ + Id: u.Id, + + ActionMap: u.ActionMap, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicjourneyaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicjourneyactionmap.go b/platformclientv2/queueconversationvideoeventtopicjourneyactionmap.go index ba8ff6cb1..5416b4275 100644 --- a/platformclientv2/queueconversationvideoeventtopicjourneyactionmap.go +++ b/platformclientv2/queueconversationvideoeventtopicjourneyactionmap.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicjourneyactionmap struct { } +func (u *Queueconversationvideoeventtopicjourneyactionmap) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicjourneyactionmap + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicjourneyactionmap) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicjourneycontext.go b/platformclientv2/queueconversationvideoeventtopicjourneycontext.go index ff779c5bc..c54d0eca1 100644 --- a/platformclientv2/queueconversationvideoeventtopicjourneycontext.go +++ b/platformclientv2/queueconversationvideoeventtopicjourneycontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationvideoeventtopicjourneycontext struct { } +func (u *Queueconversationvideoeventtopicjourneycontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicjourneycontext + + + + return json.Marshal(&struct { + Customer *Queueconversationvideoeventtopicjourneycustomer `json:"customer,omitempty"` + + CustomerSession *Queueconversationvideoeventtopicjourneycustomersession `json:"customerSession,omitempty"` + + TriggeringAction *Queueconversationvideoeventtopicjourneyaction `json:"triggeringAction,omitempty"` + *Alias + }{ + Customer: u.Customer, + + CustomerSession: u.CustomerSession, + + TriggeringAction: u.TriggeringAction, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicjourneycontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicjourneycustomer.go b/platformclientv2/queueconversationvideoeventtopicjourneycustomer.go index 391900e28..9e15f6d35 100644 --- a/platformclientv2/queueconversationvideoeventtopicjourneycustomer.go +++ b/platformclientv2/queueconversationvideoeventtopicjourneycustomer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicjourneycustomer struct { } +func (u *Queueconversationvideoeventtopicjourneycustomer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicjourneycustomer + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + IdType *string `json:"idType,omitempty"` + *Alias + }{ + Id: u.Id, + + IdType: u.IdType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicjourneycustomer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicjourneycustomersession.go b/platformclientv2/queueconversationvideoeventtopicjourneycustomersession.go index 0744218c2..af4b04077 100644 --- a/platformclientv2/queueconversationvideoeventtopicjourneycustomersession.go +++ b/platformclientv2/queueconversationvideoeventtopicjourneycustomersession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicjourneycustomersession struct { } +func (u *Queueconversationvideoeventtopicjourneycustomersession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicjourneycustomersession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicjourneycustomersession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicmessage.go b/platformclientv2/queueconversationvideoeventtopicmessage.go index f149144dc..96313a4af 100644 --- a/platformclientv2/queueconversationvideoeventtopicmessage.go +++ b/platformclientv2/queueconversationvideoeventtopicmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -101,6 +102,134 @@ type Queueconversationvideoeventtopicmessage struct { } +func (u *Queueconversationvideoeventtopicmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicmessage + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Held *bool `json:"held,omitempty"` + + ErrorInfo *Queueconversationvideoeventtopicerrordetails `json:"errorInfo,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + ToAddress *Queueconversationvideoeventtopicaddress `json:"toAddress,omitempty"` + + FromAddress *Queueconversationvideoeventtopicaddress `json:"fromAddress,omitempty"` + + Messages *[]Queueconversationvideoeventtopicmessagedetails `json:"messages,omitempty"` + + MessagesTranscriptUri *string `json:"messagesTranscriptUri,omitempty"` + + VarType *string `json:"type,omitempty"` + + RecipientCountry *string `json:"recipientCountry,omitempty"` + + RecipientType *string `json:"recipientType,omitempty"` + + JourneyContext *Queueconversationvideoeventtopicjourneycontext `json:"journeyContext,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Held: u.Held, + + ErrorInfo: u.ErrorInfo, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + ToAddress: u.ToAddress, + + FromAddress: u.FromAddress, + + Messages: u.Messages, + + MessagesTranscriptUri: u.MessagesTranscriptUri, + + VarType: u.VarType, + + RecipientCountry: u.RecipientCountry, + + RecipientType: u.RecipientType, + + JourneyContext: u.JourneyContext, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicmessagedetails.go b/platformclientv2/queueconversationvideoeventtopicmessagedetails.go index 423013e0b..4d72a9f9c 100644 --- a/platformclientv2/queueconversationvideoeventtopicmessagedetails.go +++ b/platformclientv2/queueconversationvideoeventtopicmessagedetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationvideoeventtopicmessagedetails struct { } +func (u *Queueconversationvideoeventtopicmessagedetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicmessagedetails + + + MessageTime := new(string) + if u.MessageTime != nil { + + *MessageTime = timeutil.Strftime(u.MessageTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + MessageTime = nil + } + + + return json.Marshal(&struct { + MessageId *string `json:"messageId,omitempty"` + + MessageTime *string `json:"messageTime,omitempty"` + + MessageStatus *string `json:"messageStatus,omitempty"` + + MessageSegmentCount *int `json:"messageSegmentCount,omitempty"` + + Media *[]Queueconversationvideoeventtopicmessagemedia `json:"media,omitempty"` + + Stickers *[]Queueconversationvideoeventtopicmessagesticker `json:"stickers,omitempty"` + *Alias + }{ + MessageId: u.MessageId, + + MessageTime: MessageTime, + + MessageStatus: u.MessageStatus, + + MessageSegmentCount: u.MessageSegmentCount, + + Media: u.Media, + + Stickers: u.Stickers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicmessagedetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicmessagemedia.go b/platformclientv2/queueconversationvideoeventtopicmessagemedia.go index a54d006c1..99b8e8b15 100644 --- a/platformclientv2/queueconversationvideoeventtopicmessagemedia.go +++ b/platformclientv2/queueconversationvideoeventtopicmessagemedia.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueconversationvideoeventtopicmessagemedia struct { } +func (u *Queueconversationvideoeventtopicmessagemedia) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicmessagemedia + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + ContentLengthBytes *int `json:"contentLengthBytes,omitempty"` + + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + MediaType: u.MediaType, + + ContentLengthBytes: u.ContentLengthBytes, + + Name: u.Name, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicmessagemedia) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicmessagesticker.go b/platformclientv2/queueconversationvideoeventtopicmessagesticker.go index b9ce472eb..b4467a398 100644 --- a/platformclientv2/queueconversationvideoeventtopicmessagesticker.go +++ b/platformclientv2/queueconversationvideoeventtopicmessagesticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicmessagesticker struct { } +func (u *Queueconversationvideoeventtopicmessagesticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicmessagesticker + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + Url: u.Url, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicmessagesticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicparticipant.go b/platformclientv2/queueconversationvideoeventtopicparticipant.go index 4cc9ea8bd..c4afc6ecf 100644 --- a/platformclientv2/queueconversationvideoeventtopicparticipant.go +++ b/platformclientv2/queueconversationvideoeventtopicparticipant.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -157,6 +158,198 @@ type Queueconversationvideoeventtopicparticipant struct { } +func (u *Queueconversationvideoeventtopicparticipant) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicparticipant + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + StartAcwTime := new(string) + if u.StartAcwTime != nil { + + *StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAcwTime = nil + } + + EndAcwTime := new(string) + if u.EndAcwTime != nil { + + *EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndAcwTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + UserId *string `json:"userId,omitempty"` + + ExternalContactId *string `json:"externalContactId,omitempty"` + + ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"` + + Name *string `json:"name,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + GroupId *string `json:"groupId,omitempty"` + + TeamId *string `json:"teamId,omitempty"` + + Purpose *string `json:"purpose,omitempty"` + + ConsultParticipantId *string `json:"consultParticipantId,omitempty"` + + Address *string `json:"address,omitempty"` + + WrapupRequired *bool `json:"wrapupRequired,omitempty"` + + WrapupExpected *bool `json:"wrapupExpected,omitempty"` + + WrapupPrompt *string `json:"wrapupPrompt,omitempty"` + + WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + StartAcwTime *string `json:"startAcwTime,omitempty"` + + EndAcwTime *string `json:"endAcwTime,omitempty"` + + ConversationRoutingData *Queueconversationvideoeventtopicconversationroutingdata `json:"conversationRoutingData,omitempty"` + + AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"` + + MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"` + + CoachedParticipantId *string `json:"coachedParticipantId,omitempty"` + + ScreenRecordingState *string `json:"screenRecordingState,omitempty"` + + FlaggedReason *string `json:"flaggedReason,omitempty"` + + Attributes *map[string]string `json:"attributes,omitempty"` + + Calls *[]Queueconversationvideoeventtopiccall `json:"calls,omitempty"` + + Callbacks *[]Queueconversationvideoeventtopiccallback `json:"callbacks,omitempty"` + + Chats *[]Queueconversationvideoeventtopicchat `json:"chats,omitempty"` + + Cobrowsesessions *[]Queueconversationvideoeventtopiccobrowse `json:"cobrowsesessions,omitempty"` + + Emails *[]Queueconversationvideoeventtopicemail `json:"emails,omitempty"` + + Messages *[]Queueconversationvideoeventtopicmessage `json:"messages,omitempty"` + + Screenshares *[]Queueconversationvideoeventtopicscreenshare `json:"screenshares,omitempty"` + + SocialExpressions *[]Queueconversationvideoeventtopicsocialexpression `json:"socialExpressions,omitempty"` + + Videos *[]Queueconversationvideoeventtopicvideo `json:"videos,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + ConnectedTime: ConnectedTime, + + EndTime: EndTime, + + UserId: u.UserId, + + ExternalContactId: u.ExternalContactId, + + ExternalOrganizationId: u.ExternalOrganizationId, + + Name: u.Name, + + QueueId: u.QueueId, + + GroupId: u.GroupId, + + TeamId: u.TeamId, + + Purpose: u.Purpose, + + ConsultParticipantId: u.ConsultParticipantId, + + Address: u.Address, + + WrapupRequired: u.WrapupRequired, + + WrapupExpected: u.WrapupExpected, + + WrapupPrompt: u.WrapupPrompt, + + WrapupTimeoutMs: u.WrapupTimeoutMs, + + Wrapup: u.Wrapup, + + StartAcwTime: StartAcwTime, + + EndAcwTime: EndAcwTime, + + ConversationRoutingData: u.ConversationRoutingData, + + AlertingTimeoutMs: u.AlertingTimeoutMs, + + MonitoredParticipantId: u.MonitoredParticipantId, + + CoachedParticipantId: u.CoachedParticipantId, + + ScreenRecordingState: u.ScreenRecordingState, + + FlaggedReason: u.FlaggedReason, + + Attributes: u.Attributes, + + Calls: u.Calls, + + Callbacks: u.Callbacks, + + Chats: u.Chats, + + Cobrowsesessions: u.Cobrowsesessions, + + Emails: u.Emails, + + Messages: u.Messages, + + Screenshares: u.Screenshares, + + SocialExpressions: u.SocialExpressions, + + Videos: u.Videos, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicparticipant) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicphonenumbercolumn.go b/platformclientv2/queueconversationvideoeventtopicphonenumbercolumn.go index 665be0018..f53acf03b 100644 --- a/platformclientv2/queueconversationvideoeventtopicphonenumbercolumn.go +++ b/platformclientv2/queueconversationvideoeventtopicphonenumbercolumn.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueconversationvideoeventtopicphonenumbercolumn struct { } +func (u *Queueconversationvideoeventtopicphonenumbercolumn) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicphonenumbercolumn + + + + return json.Marshal(&struct { + ColumnName *string `json:"columnName,omitempty"` + + VarType *string `json:"type,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + ColumnName: u.ColumnName, + + VarType: u.VarType, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicphonenumbercolumn) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicscoredagent.go b/platformclientv2/queueconversationvideoeventtopicscoredagent.go index a598aca8e..793253be1 100644 --- a/platformclientv2/queueconversationvideoeventtopicscoredagent.go +++ b/platformclientv2/queueconversationvideoeventtopicscoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicscoredagent struct { } +func (u *Queueconversationvideoeventtopicscoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicscoredagent + + + + return json.Marshal(&struct { + Agent *Queueconversationvideoeventtopicurireference `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicscoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicscreenshare.go b/platformclientv2/queueconversationvideoeventtopicscreenshare.go index 5c4d60fa2..819125096 100644 --- a/platformclientv2/queueconversationvideoeventtopicscreenshare.go +++ b/platformclientv2/queueconversationvideoeventtopicscreenshare.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Queueconversationvideoeventtopicscreenshare struct { } +func (u *Queueconversationvideoeventtopicscreenshare) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicscreenshare + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Queueconversationvideoeventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + Sharing *bool `json:"sharing,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + Sharing: u.Sharing, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicscreenshare) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicsocialexpression.go b/platformclientv2/queueconversationvideoeventtopicsocialexpression.go index b7c26311e..65cd82121 100644 --- a/platformclientv2/queueconversationvideoeventtopicsocialexpression.go +++ b/platformclientv2/queueconversationvideoeventtopicsocialexpression.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Queueconversationvideoeventtopicsocialexpression struct { } +func (u *Queueconversationvideoeventtopicsocialexpression) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicsocialexpression + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + SocialMediaId *string `json:"socialMediaId,omitempty"` + + SocialMediaHub *string `json:"socialMediaHub,omitempty"` + + SocialUserName *string `json:"socialUserName,omitempty"` + + PreviewText *string `json:"previewText,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Held *bool `json:"held,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + SocialMediaId: u.SocialMediaId, + + SocialMediaHub: u.SocialMediaHub, + + SocialUserName: u.SocialUserName, + + PreviewText: u.PreviewText, + + RecordingId: u.RecordingId, + + Held: u.Held, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicsocialexpression) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicurireference.go b/platformclientv2/queueconversationvideoeventtopicurireference.go index a5f67600c..00bc42de3 100644 --- a/platformclientv2/queueconversationvideoeventtopicurireference.go +++ b/platformclientv2/queueconversationvideoeventtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicurireference struct { } +func (u *Queueconversationvideoeventtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicvideo.go b/platformclientv2/queueconversationvideoeventtopicvideo.go index 4ecf22206..56c059b07 100644 --- a/platformclientv2/queueconversationvideoeventtopicvideo.go +++ b/platformclientv2/queueconversationvideoeventtopicvideo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Queueconversationvideoeventtopicvideo struct { } +func (u *Queueconversationvideoeventtopicvideo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicvideo + + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Self *Queueconversationvideoeventtopicaddress `json:"self,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + AudioMuted *bool `json:"audioMuted,omitempty"` + + VideoMuted *bool `json:"videoMuted,omitempty"` + + SharingScreen *bool `json:"sharingScreen,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Msids *[]string `json:"msids,omitempty"` + + Wrapup *Queueconversationvideoeventtopicwrapup `json:"wrapup,omitempty"` + + AfterCallWork *Queueconversationvideoeventtopicaftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + State: u.State, + + Self: u.Self, + + Id: u.Id, + + Context: u.Context, + + AudioMuted: u.AudioMuted, + + VideoMuted: u.VideoMuted, + + SharingScreen: u.SharingScreen, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + DisconnectType: u.DisconnectType, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Msids: u.Msids, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicvideo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicvoicemail.go b/platformclientv2/queueconversationvideoeventtopicvoicemail.go index 796466fb5..f58c131fe 100644 --- a/platformclientv2/queueconversationvideoeventtopicvoicemail.go +++ b/platformclientv2/queueconversationvideoeventtopicvoicemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueconversationvideoeventtopicvoicemail struct { } +func (u *Queueconversationvideoeventtopicvoicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicvoicemail + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + UploadStatus: u.UploadStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicvoicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueconversationvideoeventtopicwrapup.go b/platformclientv2/queueconversationvideoeventtopicwrapup.go index 5ebc2ee7f..e3222d742 100644 --- a/platformclientv2/queueconversationvideoeventtopicwrapup.go +++ b/platformclientv2/queueconversationvideoeventtopicwrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Queueconversationvideoeventtopicwrapup struct { } +func (u *Queueconversationvideoeventtopicwrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueconversationvideoeventtopicwrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Code: u.Code, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueconversationvideoeventtopicwrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueemailaddress.go b/platformclientv2/queueemailaddress.go index 1bcd954f5..7bcc3c14c 100644 --- a/platformclientv2/queueemailaddress.go +++ b/platformclientv2/queueemailaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueemailaddress struct { } +func (u *Queueemailaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueemailaddress + + + + return json.Marshal(&struct { + Domain *Domainentityref `json:"domain,omitempty"` + + Route *Inboundroute `json:"route,omitempty"` + *Alias + }{ + Domain: u.Domain, + + Route: u.Route, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueemailaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueentitylisting.go b/platformclientv2/queueentitylisting.go index d6e5d3878..668f9625d 100644 --- a/platformclientv2/queueentitylisting.go +++ b/platformclientv2/queueentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queueentitylisting struct { } +func (u *Queueentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueentitylisting + + + + return json.Marshal(&struct { + Entities *[]Queue `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queuemember.go b/platformclientv2/queuemember.go index d5ebb0a2c..3246c9a4a 100644 --- a/platformclientv2/queuemember.go +++ b/platformclientv2/queuemember.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Queuemember struct { } +func (u *Queuemember) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queuemember + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + User *User `json:"user,omitempty"` + + RingNumber *int `json:"ringNumber,omitempty"` + + Joined *bool `json:"joined,omitempty"` + + MemberBy *string `json:"memberBy,omitempty"` + + RoutingStatus *Routingstatus `json:"routingStatus,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + User: u.User, + + RingNumber: u.RingNumber, + + Joined: u.Joined, + + MemberBy: u.MemberBy, + + RoutingStatus: u.RoutingStatus, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queuemember) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queuememberentitylisting.go b/platformclientv2/queuememberentitylisting.go index 1f569d6ee..bd93d2755 100644 --- a/platformclientv2/queuememberentitylisting.go +++ b/platformclientv2/queuememberentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Queuememberentitylisting struct { } +func (u *Queuememberentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queuememberentitylisting + + + + return json.Marshal(&struct { + Entities *[]Queuemember `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queuememberentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queuemessagingaddresses.go b/platformclientv2/queuemessagingaddresses.go index 39e25c67e..274c1eff9 100644 --- a/platformclientv2/queuemessagingaddresses.go +++ b/platformclientv2/queuemessagingaddresses.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Queuemessagingaddresses struct { } +func (u *Queuemessagingaddresses) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queuemessagingaddresses + + + + return json.Marshal(&struct { + SmsAddress *Domainentityref `json:"smsAddress,omitempty"` + *Alias + }{ + SmsAddress: u.SmsAddress, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queuemessagingaddresses) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueobservationdatacontainer.go b/platformclientv2/queueobservationdatacontainer.go index bf8e90292..126e43b85 100644 --- a/platformclientv2/queueobservationdatacontainer.go +++ b/platformclientv2/queueobservationdatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueobservationdatacontainer struct { } +func (u *Queueobservationdatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueobservationdatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Observationmetricdata `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueobservationdatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueobservationquery.go b/platformclientv2/queueobservationquery.go index 241e61806..103c4dfd7 100644 --- a/platformclientv2/queueobservationquery.go +++ b/platformclientv2/queueobservationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueobservationquery struct { } +func (u *Queueobservationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueobservationquery + + + + return json.Marshal(&struct { + Filter *Queueobservationqueryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + DetailMetrics *[]string `json:"detailMetrics,omitempty"` + *Alias + }{ + Filter: u.Filter, + + Metrics: u.Metrics, + + DetailMetrics: u.DetailMetrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueobservationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueobservationqueryclause.go b/platformclientv2/queueobservationqueryclause.go index 3d4c50b3a..ed1902775 100644 --- a/platformclientv2/queueobservationqueryclause.go +++ b/platformclientv2/queueobservationqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueobservationqueryclause struct { } +func (u *Queueobservationqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueobservationqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Queueobservationquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueobservationqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueobservationqueryfilter.go b/platformclientv2/queueobservationqueryfilter.go index f97789c9e..bee6fbea8 100644 --- a/platformclientv2/queueobservationqueryfilter.go +++ b/platformclientv2/queueobservationqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Queueobservationqueryfilter struct { } +func (u *Queueobservationqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueobservationqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Queueobservationqueryclause `json:"clauses,omitempty"` + + Predicates *[]Queueobservationquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueobservationqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueobservationquerypredicate.go b/platformclientv2/queueobservationquerypredicate.go index 535e805ca..0b5c747a3 100644 --- a/platformclientv2/queueobservationquerypredicate.go +++ b/platformclientv2/queueobservationquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueobservationquerypredicate struct { } +func (u *Queueobservationquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueobservationquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueobservationquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueobservationqueryresponse.go b/platformclientv2/queueobservationqueryresponse.go index 330b3467a..e5fae78fa 100644 --- a/platformclientv2/queueobservationqueryresponse.go +++ b/platformclientv2/queueobservationqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queueobservationqueryresponse struct { } +func (u *Queueobservationqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueobservationqueryresponse + + + + return json.Marshal(&struct { + SystemToOrganizationMappings *map[string][]string `json:"systemToOrganizationMappings,omitempty"` + + Results *[]Queueobservationdatacontainer `json:"results,omitempty"` + *Alias + }{ + SystemToOrganizationMappings: u.SystemToOrganizationMappings, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueobservationqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queuereference.go b/platformclientv2/queuereference.go index d3680d52a..7ea175ecd 100644 --- a/platformclientv2/queuereference.go +++ b/platformclientv2/queuereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Queuereference struct { } +func (u *Queuereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queuereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queuereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queuerequest.go b/platformclientv2/queuerequest.go index 8c57ff76e..4b746a985 100644 --- a/platformclientv2/queuerequest.go +++ b/platformclientv2/queuerequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,138 @@ type Queuerequest struct { } +func (u *Queuerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queuerequest + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Writabledivision `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + JoinedMemberCount *int `json:"joinedMemberCount,omitempty"` + + MediaSettings *map[string]Mediasetting `json:"mediaSettings,omitempty"` + + RoutingRules *[]Routingrule `json:"routingRules,omitempty"` + + Bullseye *Bullseye `json:"bullseye,omitempty"` + + AcwSettings *Acwsettings `json:"acwSettings,omitempty"` + + SkillEvaluationMethod *string `json:"skillEvaluationMethod,omitempty"` + + QueueFlow *Domainentityref `json:"queueFlow,omitempty"` + + WhisperPrompt *Domainentityref `json:"whisperPrompt,omitempty"` + + AutoAnswerOnly *bool `json:"autoAnswerOnly,omitempty"` + + EnableTranscription *bool `json:"enableTranscription,omitempty"` + + EnableManualAssignment *bool `json:"enableManualAssignment,omitempty"` + + CallingPartyName *string `json:"callingPartyName,omitempty"` + + CallingPartyNumber *string `json:"callingPartyNumber,omitempty"` + + DefaultScripts *map[string]Script `json:"defaultScripts,omitempty"` + + OutboundMessagingAddresses *Queuemessagingaddresses `json:"outboundMessagingAddresses,omitempty"` + + OutboundEmailAddress *Queueemailaddress `json:"outboundEmailAddress,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + MemberCount: u.MemberCount, + + JoinedMemberCount: u.JoinedMemberCount, + + MediaSettings: u.MediaSettings, + + RoutingRules: u.RoutingRules, + + Bullseye: u.Bullseye, + + AcwSettings: u.AcwSettings, + + SkillEvaluationMethod: u.SkillEvaluationMethod, + + QueueFlow: u.QueueFlow, + + WhisperPrompt: u.WhisperPrompt, + + AutoAnswerOnly: u.AutoAnswerOnly, + + EnableTranscription: u.EnableTranscription, + + EnableManualAssignment: u.EnableManualAssignment, + + CallingPartyName: u.CallingPartyName, + + CallingPartyNumber: u.CallingPartyNumber, + + DefaultScripts: u.DefaultScripts, + + OutboundMessagingAddresses: u.OutboundMessagingAddresses, + + OutboundEmailAddress: u.OutboundEmailAddress, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queuerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueusereventtopicqueuemember.go b/platformclientv2/queueusereventtopicqueuemember.go index 650f26c71..d1561f134 100644 --- a/platformclientv2/queueusereventtopicqueuemember.go +++ b/platformclientv2/queueusereventtopicqueuemember.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Queueusereventtopicqueuemember struct { } +func (u *Queueusereventtopicqueuemember) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueusereventtopicqueuemember + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *Queueusereventtopicuserreference `json:"user,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + Joined *bool `json:"joined,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + QueueId: u.QueueId, + + Joined: u.Joined, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueusereventtopicqueuemember) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueusereventtopicuserreference.go b/platformclientv2/queueusereventtopicuserreference.go index 6fbde52a7..2fff16baf 100644 --- a/platformclientv2/queueusereventtopicuserreference.go +++ b/platformclientv2/queueusereventtopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Queueusereventtopicuserreference struct { } +func (u *Queueusereventtopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueusereventtopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueusereventtopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/queueutilizationdiagnostic.go b/platformclientv2/queueutilizationdiagnostic.go index ad260a16b..a94dcc17f 100644 --- a/platformclientv2/queueutilizationdiagnostic.go +++ b/platformclientv2/queueutilizationdiagnostic.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Queueutilizationdiagnostic struct { } +func (u *Queueutilizationdiagnostic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Queueutilizationdiagnostic + + + + return json.Marshal(&struct { + Queue *Domainentityref `json:"queue,omitempty"` + + UsersInQueue *int `json:"usersInQueue,omitempty"` + + ActiveUsersInQueue *int `json:"activeUsersInQueue,omitempty"` + + UsersOnQueue *int `json:"usersOnQueue,omitempty"` + + UsersNotUtilized *int `json:"usersNotUtilized,omitempty"` + + UsersOnQueueWithStation *int `json:"usersOnQueueWithStation,omitempty"` + + UsersOnACampaignCall *int `json:"usersOnACampaignCall,omitempty"` + + UsersOnDifferentEdgeGroup *int `json:"usersOnDifferentEdgeGroup,omitempty"` + + UsersOnANonCampaignCall *int `json:"usersOnANonCampaignCall,omitempty"` + *Alias + }{ + Queue: u.Queue, + + UsersInQueue: u.UsersInQueue, + + ActiveUsersInQueue: u.ActiveUsersInQueue, + + UsersOnQueue: u.UsersOnQueue, + + UsersNotUtilized: u.UsersNotUtilized, + + UsersOnQueueWithStation: u.UsersOnQueueWithStation, + + UsersOnACampaignCall: u.UsersOnACampaignCall, + + UsersOnDifferentEdgeGroup: u.UsersOnDifferentEdgeGroup, + + UsersOnANonCampaignCall: u.UsersOnANonCampaignCall, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Queueutilizationdiagnostic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/quickreply.go b/platformclientv2/quickreply.go index fdc8042c0..e3ba79292 100644 --- a/platformclientv2/quickreply.go +++ b/platformclientv2/quickreply.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Quickreply struct { } +func (u *Quickreply) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Quickreply + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Payload *string `json:"payload,omitempty"` + + Url *string `json:"url,omitempty"` + + Action *string `json:"action,omitempty"` + + IsSelected *bool `json:"isSelected,omitempty"` + *Alias + }{ + Text: u.Text, + + Payload: u.Payload, + + Url: u.Url, + + Action: u.Action, + + IsSelected: u.IsSelected, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Quickreply) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reaction.go b/platformclientv2/reaction.go index 8582e0000..fd2642b47 100644 --- a/platformclientv2/reaction.go +++ b/platformclientv2/reaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Reaction struct { } +func (u *Reaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reaction + + + + return json.Marshal(&struct { + Data *string `json:"data,omitempty"` + + Name *string `json:"name,omitempty"` + + ReactionType *string `json:"reactionType,omitempty"` + *Alias + }{ + Data: u.Data, + + Name: u.Name, + + ReactionType: u.ReactionType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recallentry.go b/platformclientv2/recallentry.go index d59cfc938..ac47ba6e8 100644 --- a/platformclientv2/recallentry.go +++ b/platformclientv2/recallentry.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Recallentry struct { } +func (u *Recallentry) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recallentry + + + + return json.Marshal(&struct { + NbrAttempts *int `json:"nbrAttempts,omitempty"` + + MinutesBetweenAttempts *int `json:"minutesBetweenAttempts,omitempty"` + *Alias + }{ + NbrAttempts: u.NbrAttempts, + + MinutesBetweenAttempts: u.MinutesBetweenAttempts, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recallentry) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recipient.go b/platformclientv2/recipient.go index 20e2e17f1..a91120119 100644 --- a/platformclientv2/recipient.go +++ b/platformclientv2/recipient.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Recipient struct { } +func (u *Recipient) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recipient + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Flow *Flow `json:"flow,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + ModifiedBy *User `json:"modifiedBy,omitempty"` + + MessengerType *string `json:"messengerType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Flow: u.Flow, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + MessengerType: u.MessengerType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recipient) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recipientlisting.go b/platformclientv2/recipientlisting.go index 60952210b..3d954a748 100644 --- a/platformclientv2/recipientlisting.go +++ b/platformclientv2/recipientlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Recipientlisting struct { } +func (u *Recipientlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recipientlisting + + + + return json.Marshal(&struct { + Entities *[]Recipient `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recipientlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/record.go b/platformclientv2/record.go index eaeb5ec84..0a85f9e4c 100644 --- a/platformclientv2/record.go +++ b/platformclientv2/record.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Record struct { } +func (u *Record) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Record + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Record) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recording.go b/platformclientv2/recording.go index 7fa025abe..f8c2d12fe 100644 --- a/platformclientv2/recording.go +++ b/platformclientv2/recording.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -129,6 +130,178 @@ type Recording struct { } +func (u *Recording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recording + + + RestoreExpirationTime := new(string) + if u.RestoreExpirationTime != nil { + + *RestoreExpirationTime = timeutil.Strftime(u.RestoreExpirationTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RestoreExpirationTime = nil + } + + ArchiveDate := new(string) + if u.ArchiveDate != nil { + + *ArchiveDate = timeutil.Strftime(u.ArchiveDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ArchiveDate = nil + } + + DeleteDate := new(string) + if u.DeleteDate != nil { + + *DeleteDate = timeutil.Strftime(u.DeleteDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DeleteDate = nil + } + + ExportDate := new(string) + if u.ExportDate != nil { + + *ExportDate = timeutil.Strftime(u.ExportDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExportDate = nil + } + + ExportedDate := new(string) + if u.ExportedDate != nil { + + *ExportedDate = timeutil.Strftime(u.ExportedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExportedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + Path *string `json:"path,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + Media *string `json:"media,omitempty"` + + Annotations *[]Annotation `json:"annotations,omitempty"` + + Transcript *[]Chatmessage `json:"transcript,omitempty"` + + EmailTranscript *[]Recordingemailmessage `json:"emailTranscript,omitempty"` + + MessagingTranscript *[]Recordingmessagingmessage `json:"messagingTranscript,omitempty"` + + FileState *string `json:"fileState,omitempty"` + + RestoreExpirationTime *string `json:"restoreExpirationTime,omitempty"` + + MediaUris *map[string]Mediaresult `json:"mediaUris,omitempty"` + + EstimatedTranscodeTimeMs *int `json:"estimatedTranscodeTimeMs,omitempty"` + + ActualTranscodeTimeMs *int `json:"actualTranscodeTimeMs,omitempty"` + + ArchiveDate *string `json:"archiveDate,omitempty"` + + ArchiveMedium *string `json:"archiveMedium,omitempty"` + + DeleteDate *string `json:"deleteDate,omitempty"` + + ExportDate *string `json:"exportDate,omitempty"` + + ExportedDate *string `json:"exportedDate,omitempty"` + + OutputDurationMs *int `json:"outputDurationMs,omitempty"` + + OutputSizeInBytes *int `json:"outputSizeInBytes,omitempty"` + + MaxAllowedRestorationsForOrg *int `json:"maxAllowedRestorationsForOrg,omitempty"` + + RemainingRestorationsAllowedForOrg *int `json:"remainingRestorationsAllowedForOrg,omitempty"` + + SessionId *string `json:"sessionId,omitempty"` + + Users *[]User `json:"users,omitempty"` + + RecordingFileRole *string `json:"recordingFileRole,omitempty"` + + RecordingErrorStatus *string `json:"recordingErrorStatus,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ConversationId: u.ConversationId, + + Path: u.Path, + + StartTime: u.StartTime, + + EndTime: u.EndTime, + + Media: u.Media, + + Annotations: u.Annotations, + + Transcript: u.Transcript, + + EmailTranscript: u.EmailTranscript, + + MessagingTranscript: u.MessagingTranscript, + + FileState: u.FileState, + + RestoreExpirationTime: RestoreExpirationTime, + + MediaUris: u.MediaUris, + + EstimatedTranscodeTimeMs: u.EstimatedTranscodeTimeMs, + + ActualTranscodeTimeMs: u.ActualTranscodeTimeMs, + + ArchiveDate: ArchiveDate, + + ArchiveMedium: u.ArchiveMedium, + + DeleteDate: DeleteDate, + + ExportDate: ExportDate, + + ExportedDate: ExportedDate, + + OutputDurationMs: u.OutputDurationMs, + + OutputSizeInBytes: u.OutputSizeInBytes, + + MaxAllowedRestorationsForOrg: u.MaxAllowedRestorationsForOrg, + + RemainingRestorationsAllowedForOrg: u.RemainingRestorationsAllowedForOrg, + + SessionId: u.SessionId, + + Users: u.Users, + + RecordingFileRole: u.RecordingFileRole, + + RecordingErrorStatus: u.RecordingErrorStatus, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingarchiverestoretopicmediaresult.go b/platformclientv2/recordingarchiverestoretopicmediaresult.go index 42bffc8d4..326bf39bd 100644 --- a/platformclientv2/recordingarchiverestoretopicmediaresult.go +++ b/platformclientv2/recordingarchiverestoretopicmediaresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Recordingarchiverestoretopicmediaresult struct { } +func (u *Recordingarchiverestoretopicmediaresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingarchiverestoretopicmediaresult + + + + return json.Marshal(&struct { + ChannelId *string `json:"channelId,omitempty"` + + WaveUri *string `json:"waveUri,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + WaveformData *[]float32 `json:"waveformData,omitempty"` + *Alias + }{ + ChannelId: u.ChannelId, + + WaveUri: u.WaveUri, + + MediaUri: u.MediaUri, + + WaveformData: u.WaveformData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingarchiverestoretopicmediaresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingarchiverestoretopicrecording.go b/platformclientv2/recordingarchiverestoretopicrecording.go index ed64960de..c62c33b4c 100644 --- a/platformclientv2/recordingarchiverestoretopicrecording.go +++ b/platformclientv2/recordingarchiverestoretopicrecording.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Recordingarchiverestoretopicrecording struct { } +func (u *Recordingarchiverestoretopicrecording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingarchiverestoretopicrecording + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + FileState *string `json:"fileState,omitempty"` + + MediaUris *[]Recordingarchiverestoretopicmediaresult `json:"mediaUris,omitempty"` + + EstimatedTranscodeTimeMs *float32 `json:"estimatedTranscodeTimeMs,omitempty"` + + ActualTranscodeTimeMs *float32 `json:"actualTranscodeTimeMs,omitempty"` + *Alias + }{ + Id: u.Id, + + ConversationId: u.ConversationId, + + FileState: u.FileState, + + MediaUris: u.MediaUris, + + EstimatedTranscodeTimeMs: u.EstimatedTranscodeTimeMs, + + ActualTranscodeTimeMs: u.ActualTranscodeTimeMs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingarchiverestoretopicrecording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingemailmessage.go b/platformclientv2/recordingemailmessage.go index e255ca251..3b66fe5f7 100644 --- a/platformclientv2/recordingemailmessage.go +++ b/platformclientv2/recordingemailmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,66 @@ type Recordingemailmessage struct { } +func (u *Recordingemailmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingemailmessage + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + + return json.Marshal(&struct { + HtmlBody *string `json:"htmlBody,omitempty"` + + TextBody *string `json:"textBody,omitempty"` + + Id *string `json:"id,omitempty"` + + To *[]Emailaddress `json:"to,omitempty"` + + Cc *[]Emailaddress `json:"cc,omitempty"` + + Bcc *[]Emailaddress `json:"bcc,omitempty"` + + From *Emailaddress `json:"from,omitempty"` + + Subject *string `json:"subject,omitempty"` + + Attachments *[]Emailattachment `json:"attachments,omitempty"` + + Time *string `json:"time,omitempty"` + *Alias + }{ + HtmlBody: u.HtmlBody, + + TextBody: u.TextBody, + + Id: u.Id, + + To: u.To, + + Cc: u.Cc, + + Bcc: u.Bcc, + + From: u.From, + + Subject: u.Subject, + + Attachments: u.Attachments, + + Time: Time, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingemailmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingeventmediaresult.go b/platformclientv2/recordingeventmediaresult.go index fe22c232e..755e51415 100644 --- a/platformclientv2/recordingeventmediaresult.go +++ b/platformclientv2/recordingeventmediaresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Recordingeventmediaresult struct { } +func (u *Recordingeventmediaresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingeventmediaresult + + + + return json.Marshal(&struct { + ChannelId *string `json:"channelId,omitempty"` + + WaveUri *string `json:"waveUri,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + WaveformData *[]float32 `json:"waveformData,omitempty"` + *Alias + }{ + ChannelId: u.ChannelId, + + WaveUri: u.WaveUri, + + MediaUri: u.MediaUri, + + WaveformData: u.WaveformData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingeventmediaresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingeventrecording.go b/platformclientv2/recordingeventrecording.go index 142618c81..8182bd96b 100644 --- a/platformclientv2/recordingeventrecording.go +++ b/platformclientv2/recordingeventrecording.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Recordingeventrecording struct { } +func (u *Recordingeventrecording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingeventrecording + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + FileState *string `json:"fileState,omitempty"` + + MediaUris *[]Recordingeventmediaresult `json:"mediaUris,omitempty"` + + EstimatedTranscodeTimeMs *float32 `json:"estimatedTranscodeTimeMs,omitempty"` + + ActualTranscodeTimeMs *float32 `json:"actualTranscodeTimeMs,omitempty"` + *Alias + }{ + Id: u.Id, + + ConversationId: u.ConversationId, + + FileState: u.FileState, + + MediaUris: u.MediaUris, + + EstimatedTranscodeTimeMs: u.EstimatedTranscodeTimeMs, + + ActualTranscodeTimeMs: u.ActualTranscodeTimeMs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingeventrecording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingjob.go b/platformclientv2/recordingjob.go index 59f604173..82b86ccf7 100644 --- a/platformclientv2/recordingjob.go +++ b/platformclientv2/recordingjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,74 @@ type Recordingjob struct { } +func (u *Recordingjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + RecordingJobsQuery *Recordingjobsquery `json:"recordingJobsQuery,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + TotalConversations *int `json:"totalConversations,omitempty"` + + TotalRecordings *int `json:"totalRecordings,omitempty"` + + TotalProcessedRecordings *int `json:"totalProcessedRecordings,omitempty"` + + PercentProgress *int `json:"percentProgress,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + FailedRecordings *string `json:"failedRecordings,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + User *Addressableentityref `json:"user,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + RecordingJobsQuery: u.RecordingJobsQuery, + + DateCreated: DateCreated, + + TotalConversations: u.TotalConversations, + + TotalRecordings: u.TotalRecordings, + + TotalProcessedRecordings: u.TotalProcessedRecordings, + + PercentProgress: u.PercentProgress, + + ErrorMessage: u.ErrorMessage, + + FailedRecordings: u.FailedRecordings, + + SelfUri: u.SelfUri, + + User: u.User, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingjobentitylisting.go b/platformclientv2/recordingjobentitylisting.go index 6306cfa1e..3ee4e8494 100644 --- a/platformclientv2/recordingjobentitylisting.go +++ b/platformclientv2/recordingjobentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Recordingjobentitylisting struct { } +func (u *Recordingjobentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingjobentitylisting + + + + return json.Marshal(&struct { + Entities *[]Recordingjob `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingjobentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingjobfailedrecording.go b/platformclientv2/recordingjobfailedrecording.go index 76d8e714e..ccb04b100 100644 --- a/platformclientv2/recordingjobfailedrecording.go +++ b/platformclientv2/recordingjobfailedrecording.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Recordingjobfailedrecording struct { } +func (u *Recordingjobfailedrecording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingjobfailedrecording + + + + return json.Marshal(&struct { + Conversation *Addressableentityref `json:"conversation,omitempty"` + + Recording *Addressableentityref `json:"recording,omitempty"` + *Alias + }{ + Conversation: u.Conversation, + + Recording: u.Recording, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingjobfailedrecording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingjobsquery.go b/platformclientv2/recordingjobsquery.go index 582ce18b8..07c3865ad 100644 --- a/platformclientv2/recordingjobsquery.go +++ b/platformclientv2/recordingjobsquery.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Recordingjobsquery struct { } +func (u *Recordingjobsquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingjobsquery + + + ActionDate := new(string) + if u.ActionDate != nil { + + *ActionDate = timeutil.Strftime(u.ActionDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ActionDate = nil + } + + + return json.Marshal(&struct { + Action *string `json:"action,omitempty"` + + ActionDate *string `json:"actionDate,omitempty"` + + IntegrationId *string `json:"integrationId,omitempty"` + + IncludeScreenRecordings *bool `json:"includeScreenRecordings,omitempty"` + + ConversationQuery *Asyncconversationquery `json:"conversationQuery,omitempty"` + *Alias + }{ + Action: u.Action, + + ActionDate: ActionDate, + + IntegrationId: u.IntegrationId, + + IncludeScreenRecordings: u.IncludeScreenRecordings, + + ConversationQuery: u.ConversationQuery, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingjobsquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingmessagingmessage.go b/platformclientv2/recordingmessagingmessage.go index 76ed90e29..2facd2deb 100644 --- a/platformclientv2/recordingmessagingmessage.go +++ b/platformclientv2/recordingmessagingmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,62 @@ type Recordingmessagingmessage struct { } +func (u *Recordingmessagingmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingmessagingmessage + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + From *string `json:"from,omitempty"` + + FromUser *User `json:"fromUser,omitempty"` + + FromExternalContact *Externalcontact `json:"fromExternalContact,omitempty"` + + To *string `json:"to,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + Id *string `json:"id,omitempty"` + + MessageText *string `json:"messageText,omitempty"` + + MessageMediaAttachments *[]Messagemediaattachment `json:"messageMediaAttachments,omitempty"` + + MessageStickerAttachments *[]Messagestickerattachment `json:"messageStickerAttachments,omitempty"` + *Alias + }{ + From: u.From, + + FromUser: u.FromUser, + + FromExternalContact: u.FromExternalContact, + + To: u.To, + + Timestamp: Timestamp, + + Id: u.Id, + + MessageText: u.MessageText, + + MessageMediaAttachments: u.MessageMediaAttachments, + + MessageStickerAttachments: u.MessageStickerAttachments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingmessagingmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingmetadata.go b/platformclientv2/recordingmetadata.go index 6da598f67..139dfc6fc 100644 --- a/platformclientv2/recordingmetadata.go +++ b/platformclientv2/recordingmetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,134 @@ type Recordingmetadata struct { } +func (u *Recordingmetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingmetadata + + + RestoreExpirationTime := new(string) + if u.RestoreExpirationTime != nil { + + *RestoreExpirationTime = timeutil.Strftime(u.RestoreExpirationTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RestoreExpirationTime = nil + } + + ArchiveDate := new(string) + if u.ArchiveDate != nil { + + *ArchiveDate = timeutil.Strftime(u.ArchiveDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ArchiveDate = nil + } + + DeleteDate := new(string) + if u.DeleteDate != nil { + + *DeleteDate = timeutil.Strftime(u.DeleteDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DeleteDate = nil + } + + ExportDate := new(string) + if u.ExportDate != nil { + + *ExportDate = timeutil.Strftime(u.ExportDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExportDate = nil + } + + ExportedDate := new(string) + if u.ExportedDate != nil { + + *ExportedDate = timeutil.Strftime(u.ExportedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ExportedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + Path *string `json:"path,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + Media *string `json:"media,omitempty"` + + Annotations *[]Annotation `json:"annotations,omitempty"` + + FileState *string `json:"fileState,omitempty"` + + RestoreExpirationTime *string `json:"restoreExpirationTime,omitempty"` + + ArchiveDate *string `json:"archiveDate,omitempty"` + + ArchiveMedium *string `json:"archiveMedium,omitempty"` + + DeleteDate *string `json:"deleteDate,omitempty"` + + ExportDate *string `json:"exportDate,omitempty"` + + ExportedDate *string `json:"exportedDate,omitempty"` + + MaxAllowedRestorationsForOrg *int `json:"maxAllowedRestorationsForOrg,omitempty"` + + RemainingRestorationsAllowedForOrg *int `json:"remainingRestorationsAllowedForOrg,omitempty"` + + SessionId *string `json:"sessionId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ConversationId: u.ConversationId, + + Path: u.Path, + + StartTime: u.StartTime, + + EndTime: u.EndTime, + + Media: u.Media, + + Annotations: u.Annotations, + + FileState: u.FileState, + + RestoreExpirationTime: RestoreExpirationTime, + + ArchiveDate: ArchiveDate, + + ArchiveMedium: u.ArchiveMedium, + + DeleteDate: DeleteDate, + + ExportDate: ExportDate, + + ExportedDate: ExportedDate, + + MaxAllowedRestorationsForOrg: u.MaxAllowedRestorationsForOrg, + + RemainingRestorationsAllowedForOrg: u.RemainingRestorationsAllowedForOrg, + + SessionId: u.SessionId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingmetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingsettings.go b/platformclientv2/recordingsettings.go index 04eef548a..2f919b086 100644 --- a/platformclientv2/recordingsettings.go +++ b/platformclientv2/recordingsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Recordingsettings struct { } +func (u *Recordingsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingsettings + + + + return json.Marshal(&struct { + MaxSimultaneousStreams *int `json:"maxSimultaneousStreams,omitempty"` + + MaxConfigurableScreenRecordingStreams *int `json:"maxConfigurableScreenRecordingStreams,omitempty"` + *Alias + }{ + MaxSimultaneousStreams: u.MaxSimultaneousStreams, + + MaxConfigurableScreenRecordingStreams: u.MaxConfigurableScreenRecordingStreams, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingtranscodecompletetopicmediaresult.go b/platformclientv2/recordingtranscodecompletetopicmediaresult.go index 21e543ed6..734e8313f 100644 --- a/platformclientv2/recordingtranscodecompletetopicmediaresult.go +++ b/platformclientv2/recordingtranscodecompletetopicmediaresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Recordingtranscodecompletetopicmediaresult struct { } +func (u *Recordingtranscodecompletetopicmediaresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingtranscodecompletetopicmediaresult + + + + return json.Marshal(&struct { + ChannelId *string `json:"channelId,omitempty"` + + WaveUri *string `json:"waveUri,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + WaveformData *[]float32 `json:"waveformData,omitempty"` + *Alias + }{ + ChannelId: u.ChannelId, + + WaveUri: u.WaveUri, + + MediaUri: u.MediaUri, + + WaveformData: u.WaveformData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingtranscodecompletetopicmediaresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/recordingtranscodecompletetopicrecording.go b/platformclientv2/recordingtranscodecompletetopicrecording.go index 35985bf63..3f2bb9c43 100644 --- a/platformclientv2/recordingtranscodecompletetopicrecording.go +++ b/platformclientv2/recordingtranscodecompletetopicrecording.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Recordingtranscodecompletetopicrecording struct { } +func (u *Recordingtranscodecompletetopicrecording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Recordingtranscodecompletetopicrecording + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + FileState *string `json:"fileState,omitempty"` + + MediaUris *[]Recordingtranscodecompletetopicmediaresult `json:"mediaUris,omitempty"` + + EstimatedTranscodeTimeMs *float32 `json:"estimatedTranscodeTimeMs,omitempty"` + + ActualTranscodeTimeMs *float32 `json:"actualTranscodeTimeMs,omitempty"` + *Alias + }{ + Id: u.Id, + + ConversationId: u.ConversationId, + + FileState: u.FileState, + + MediaUris: u.MediaUris, + + EstimatedTranscodeTimeMs: u.EstimatedTranscodeTimeMs, + + ActualTranscodeTimeMs: u.ActualTranscodeTimeMs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Recordingtranscodecompletetopicrecording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/regiontimezone.go b/platformclientv2/regiontimezone.go index b94eee192..4711b94ee 100644 --- a/platformclientv2/regiontimezone.go +++ b/platformclientv2/regiontimezone.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Regiontimezone struct { } +func (u *Regiontimezone) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Regiontimezone + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Offset *int `json:"offset,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Offset: u.Offset, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Regiontimezone) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/relationship.go b/platformclientv2/relationship.go index 6a96af67f..3486acae1 100644 --- a/platformclientv2/relationship.go +++ b/platformclientv2/relationship.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Relationship struct { } +func (u *Relationship) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Relationship + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *User `json:"user,omitempty"` + + ExternalOrganization *Externalorganization `json:"externalOrganization,omitempty"` + + Relationship *string `json:"relationship,omitempty"` + + ExternalDataSources *[]Externaldatasource `json:"externalDataSources,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + ExternalOrganization: u.ExternalOrganization, + + Relationship: u.Relationship, + + ExternalDataSources: u.ExternalDataSources, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Relationship) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/relationshiplisting.go b/platformclientv2/relationshiplisting.go index 28e026973..a4e9bdcbe 100644 --- a/platformclientv2/relationshiplisting.go +++ b/platformclientv2/relationshiplisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Relationshiplisting struct { } +func (u *Relationshiplisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Relationshiplisting + + + + return json.Marshal(&struct { + Entities *[]Relationship `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Relationshiplisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/replacementterm.go b/platformclientv2/replacementterm.go index 9be777980..c0831e36a 100644 --- a/platformclientv2/replacementterm.go +++ b/platformclientv2/replacementterm.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Replacementterm struct { } +func (u *Replacementterm) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Replacementterm + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + ExistingValue *string `json:"existingValue,omitempty"` + + UpdatedValue *string `json:"updatedValue,omitempty"` + *Alias + }{ + VarType: u.VarType, + + ExistingValue: u.ExistingValue, + + UpdatedValue: u.UpdatedValue, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Replacementterm) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/replacerequest.go b/platformclientv2/replacerequest.go index 4f62130e1..be6b7cf7e 100644 --- a/platformclientv2/replacerequest.go +++ b/platformclientv2/replacerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Replacerequest struct { } +func (u *Replacerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Replacerequest + + + + return json.Marshal(&struct { + ChangeNumber *int `json:"changeNumber,omitempty"` + + Name *string `json:"name,omitempty"` + + AuthToken *string `json:"authToken,omitempty"` + *Alias + }{ + ChangeNumber: u.ChangeNumber, + + Name: u.Name, + + AuthToken: u.AuthToken, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Replacerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/replaceresponse.go b/platformclientv2/replaceresponse.go index bef92d4a4..5ed6a5d2f 100644 --- a/platformclientv2/replaceresponse.go +++ b/platformclientv2/replaceresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Replaceresponse struct { } +func (u *Replaceresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Replaceresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ChangeNumber *int `json:"changeNumber,omitempty"` + + UploadStatus *Domainentityref `json:"uploadStatus,omitempty"` + + UploadDestinationUri *string `json:"uploadDestinationUri,omitempty"` + + UploadMethod *string `json:"uploadMethod,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ChangeNumber: u.ChangeNumber, + + UploadStatus: u.UploadStatus, + + UploadDestinationUri: u.UploadDestinationUri, + + UploadMethod: u.UploadMethod, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Replaceresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/replytoemailaddress.go b/platformclientv2/replytoemailaddress.go index 8f2a8386f..712bb8153 100644 --- a/platformclientv2/replytoemailaddress.go +++ b/platformclientv2/replytoemailaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Replytoemailaddress struct { } +func (u *Replytoemailaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Replytoemailaddress + + + + return json.Marshal(&struct { + Domain *Domainentityref `json:"domain,omitempty"` + + Route *Domainentityref `json:"route,omitempty"` + *Alias + }{ + Domain: u.Domain, + + Route: u.Route, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Replytoemailaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportingdataexporttopicdataexportnotification.go b/platformclientv2/reportingdataexporttopicdataexportnotification.go index a9a5d1a1d..f310847cd 100644 --- a/platformclientv2/reportingdataexporttopicdataexportnotification.go +++ b/platformclientv2/reportingdataexporttopicdataexportnotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Reportingdataexporttopicdataexportnotification struct { } +func (u *Reportingdataexporttopicdataexportnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportingdataexporttopicdataexportnotification + + + CreatedDateTime := new(string) + if u.CreatedDateTime != nil { + + *CreatedDateTime = timeutil.Strftime(u.CreatedDateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDateTime = nil + } + + ModifiedDateTime := new(string) + if u.ModifiedDateTime != nil { + + *ModifiedDateTime = timeutil.Strftime(u.ModifiedDateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDateTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + RunId *string `json:"runId,omitempty"` + + Name *string `json:"name,omitempty"` + + Status *string `json:"status,omitempty"` + + ExportFormat *string `json:"exportFormat,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + + ViewType *string `json:"viewType,omitempty"` + + ExportErrorMessagesType *string `json:"exportErrorMessagesType,omitempty"` + + Read *bool `json:"read,omitempty"` + + CreatedDateTime *string `json:"createdDateTime,omitempty"` + + ModifiedDateTime *string `json:"modifiedDateTime,omitempty"` + + PercentageComplete *float32 `json:"percentageComplete,omitempty"` + + EmailStatuses *map[string]string `json:"emailStatuses,omitempty"` + + EmailErrorDescription *string `json:"emailErrorDescription,omitempty"` + + ScheduleExpression *string `json:"scheduleExpression,omitempty"` + *Alias + }{ + Id: u.Id, + + RunId: u.RunId, + + Name: u.Name, + + Status: u.Status, + + ExportFormat: u.ExportFormat, + + DownloadUrl: u.DownloadUrl, + + ViewType: u.ViewType, + + ExportErrorMessagesType: u.ExportErrorMessagesType, + + Read: u.Read, + + CreatedDateTime: CreatedDateTime, + + ModifiedDateTime: ModifiedDateTime, + + PercentageComplete: u.PercentageComplete, + + EmailStatuses: u.EmailStatuses, + + EmailErrorDescription: u.EmailErrorDescription, + + ScheduleExpression: u.ScheduleExpression, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportingdataexporttopicdataexportnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportingexportjoblisting.go b/platformclientv2/reportingexportjoblisting.go index 0c37a1d5e..c5c1b85c2 100644 --- a/platformclientv2/reportingexportjoblisting.go +++ b/platformclientv2/reportingexportjoblisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Reportingexportjoblisting struct { } +func (u *Reportingexportjoblisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportingexportjoblisting + + + + return json.Marshal(&struct { + Entities *[]Reportingexportjobresponse `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportingexportjoblisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportingexportjobrequest.go b/platformclientv2/reportingexportjobrequest.go index 05e662279..78859dd1e 100644 --- a/platformclientv2/reportingexportjobrequest.go +++ b/platformclientv2/reportingexportjobrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -80,6 +81,90 @@ type Reportingexportjobrequest struct { } +func (u *Reportingexportjobrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportingexportjobrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + ExportFormat *string `json:"exportFormat,omitempty"` + + Interval *string `json:"interval,omitempty"` + + Period *string `json:"period,omitempty"` + + ViewType *string `json:"viewType,omitempty"` + + Filter *Viewfilter `json:"filter,omitempty"` + + Read *bool `json:"read,omitempty"` + + Locale *string `json:"locale,omitempty"` + + HasFormatDurations *bool `json:"hasFormatDurations,omitempty"` + + HasSplitFilters *bool `json:"hasSplitFilters,omitempty"` + + ExcludeEmptyRows *bool `json:"excludeEmptyRows,omitempty"` + + HasSplitByMedia *bool `json:"hasSplitByMedia,omitempty"` + + HasSummaryRow *bool `json:"hasSummaryRow,omitempty"` + + CsvDelimiter *string `json:"csvDelimiter,omitempty"` + + SelectedColumns *[]Selectedcolumns `json:"selectedColumns,omitempty"` + + HasCustomParticipantAttributes *bool `json:"hasCustomParticipantAttributes,omitempty"` + + RecipientEmails *[]string `json:"recipientEmails,omitempty"` + *Alias + }{ + Name: u.Name, + + TimeZone: u.TimeZone, + + ExportFormat: u.ExportFormat, + + Interval: u.Interval, + + Period: u.Period, + + ViewType: u.ViewType, + + Filter: u.Filter, + + Read: u.Read, + + Locale: u.Locale, + + HasFormatDurations: u.HasFormatDurations, + + HasSplitFilters: u.HasSplitFilters, + + ExcludeEmptyRows: u.ExcludeEmptyRows, + + HasSplitByMedia: u.HasSplitByMedia, + + HasSummaryRow: u.HasSummaryRow, + + CsvDelimiter: u.CsvDelimiter, + + SelectedColumns: u.SelectedColumns, + + HasCustomParticipantAttributes: u.HasCustomParticipantAttributes, + + RecipientEmails: u.RecipientEmails, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportingexportjobrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportingexportjobresponse.go b/platformclientv2/reportingexportjobresponse.go index be5d1809d..e1d37b6aa 100644 --- a/platformclientv2/reportingexportjobresponse.go +++ b/platformclientv2/reportingexportjobresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -129,6 +130,154 @@ type Reportingexportjobresponse struct { } +func (u *Reportingexportjobresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportingexportjobresponse + + + CreatedDateTime := new(string) + if u.CreatedDateTime != nil { + + *CreatedDateTime = timeutil.Strftime(u.CreatedDateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDateTime = nil + } + + ModifiedDateTime := new(string) + if u.ModifiedDateTime != nil { + + *ModifiedDateTime = timeutil.Strftime(u.ModifiedDateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDateTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + RunId *string `json:"runId,omitempty"` + + Status *string `json:"status,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + ExportFormat *string `json:"exportFormat,omitempty"` + + Interval *string `json:"interval,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + + ViewType *string `json:"viewType,omitempty"` + + ExportErrorMessagesType *string `json:"exportErrorMessagesType,omitempty"` + + Period *string `json:"period,omitempty"` + + Filter *Viewfilter `json:"filter,omitempty"` + + Read *bool `json:"read,omitempty"` + + CreatedDateTime *string `json:"createdDateTime,omitempty"` + + ModifiedDateTime *string `json:"modifiedDateTime,omitempty"` + + Locale *string `json:"locale,omitempty"` + + PercentageComplete *float64 `json:"percentageComplete,omitempty"` + + HasFormatDurations *bool `json:"hasFormatDurations,omitempty"` + + HasSplitFilters *bool `json:"hasSplitFilters,omitempty"` + + ExcludeEmptyRows *bool `json:"excludeEmptyRows,omitempty"` + + HasSplitByMedia *bool `json:"hasSplitByMedia,omitempty"` + + HasSummaryRow *bool `json:"hasSummaryRow,omitempty"` + + CsvDelimiter *string `json:"csvDelimiter,omitempty"` + + SelectedColumns *[]Selectedcolumns `json:"selectedColumns,omitempty"` + + HasCustomParticipantAttributes *bool `json:"hasCustomParticipantAttributes,omitempty"` + + RecipientEmails *[]string `json:"recipientEmails,omitempty"` + + EmailStatuses *map[string]string `json:"emailStatuses,omitempty"` + + EmailErrorDescription *string `json:"emailErrorDescription,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + RunId: u.RunId, + + Status: u.Status, + + TimeZone: u.TimeZone, + + ExportFormat: u.ExportFormat, + + Interval: u.Interval, + + DownloadUrl: u.DownloadUrl, + + ViewType: u.ViewType, + + ExportErrorMessagesType: u.ExportErrorMessagesType, + + Period: u.Period, + + Filter: u.Filter, + + Read: u.Read, + + CreatedDateTime: CreatedDateTime, + + ModifiedDateTime: ModifiedDateTime, + + Locale: u.Locale, + + PercentageComplete: u.PercentageComplete, + + HasFormatDurations: u.HasFormatDurations, + + HasSplitFilters: u.HasSplitFilters, + + ExcludeEmptyRows: u.ExcludeEmptyRows, + + HasSplitByMedia: u.HasSplitByMedia, + + HasSummaryRow: u.HasSummaryRow, + + CsvDelimiter: u.CsvDelimiter, + + SelectedColumns: u.SelectedColumns, + + HasCustomParticipantAttributes: u.HasCustomParticipantAttributes, + + RecipientEmails: u.RecipientEmails, + + EmailStatuses: u.EmailStatuses, + + EmailErrorDescription: u.EmailErrorDescription, + + Enabled: u.Enabled, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportingexportjobresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportingexportmetadatajoblisting.go b/platformclientv2/reportingexportmetadatajoblisting.go index fa7c2abb6..2e8fae077 100644 --- a/platformclientv2/reportingexportmetadatajoblisting.go +++ b/platformclientv2/reportingexportmetadatajoblisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Reportingexportmetadatajoblisting struct { } +func (u *Reportingexportmetadatajoblisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportingexportmetadatajoblisting + + + + return json.Marshal(&struct { + Entities *[]Reportingexportmetadatajobresponse `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportingexportmetadatajoblisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportingexportmetadatajobresponse.go b/platformclientv2/reportingexportmetadatajobresponse.go index b6c823bbf..d1570417a 100644 --- a/platformclientv2/reportingexportmetadatajobresponse.go +++ b/platformclientv2/reportingexportmetadatajobresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Reportingexportmetadatajobresponse struct { } +func (u *Reportingexportmetadatajobresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportingexportmetadatajobresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ViewType *string `json:"viewType,omitempty"` + + DateLimitations *string `json:"dateLimitations,omitempty"` + + RequiredFilters *[]string `json:"requiredFilters,omitempty"` + + SupportedFilters *[]string `json:"supportedFilters,omitempty"` + + RequiredColumnIds *[]string `json:"requiredColumnIds,omitempty"` + + DependentColumnIds *map[string][]string `json:"dependentColumnIds,omitempty"` + + AvailableColumnIds *[]string `json:"availableColumnIds,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ViewType: u.ViewType, + + DateLimitations: u.DateLimitations, + + RequiredFilters: u.RequiredFilters, + + SupportedFilters: u.SupportedFilters, + + RequiredColumnIds: u.RequiredColumnIds, + + DependentColumnIds: u.DependentColumnIds, + + AvailableColumnIds: u.AvailableColumnIds, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportingexportmetadatajobresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportinginterval.go b/platformclientv2/reportinginterval.go index 37bf078ec..3140527ae 100644 --- a/platformclientv2/reportinginterval.go +++ b/platformclientv2/reportinginterval.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Reportinginterval struct { } +func (u *Reportinginterval) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportinginterval + + + + return json.Marshal(&struct { + IntervalType *string `json:"intervalType,omitempty"` + + IntervalValue *int `json:"intervalValue,omitempty"` + *Alias + }{ + IntervalType: u.IntervalType, + + IntervalValue: u.IntervalValue, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportinginterval) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportmetadata.go b/platformclientv2/reportmetadata.go index 70f1a1711..4956a6d27 100644 --- a/platformclientv2/reportmetadata.go +++ b/platformclientv2/reportmetadata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Reportmetadata struct { } +func (u *Reportmetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportmetadata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Title *string `json:"title,omitempty"` + + Description *string `json:"description,omitempty"` + + Keywords *[]string `json:"keywords,omitempty"` + + AvailableLocales *[]string `json:"availableLocales,omitempty"` + + Parameters *[]Parameter `json:"parameters,omitempty"` + + ExampleUrl *string `json:"exampleUrl,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Title: u.Title, + + Description: u.Description, + + Keywords: u.Keywords, + + AvailableLocales: u.AvailableLocales, + + Parameters: u.Parameters, + + ExampleUrl: u.ExampleUrl, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportmetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportmetadataentitylisting.go b/platformclientv2/reportmetadataentitylisting.go index 9e9eba376..5aa7cfa3b 100644 --- a/platformclientv2/reportmetadataentitylisting.go +++ b/platformclientv2/reportmetadataentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Reportmetadataentitylisting struct { } +func (u *Reportmetadataentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportmetadataentitylisting + + + + return json.Marshal(&struct { + Entities *[]Reportmetadata `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportmetadataentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportrunentry.go b/platformclientv2/reportrunentry.go index 2ea5338bf..4ced24551 100644 --- a/platformclientv2/reportrunentry.go +++ b/platformclientv2/reportrunentry.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Reportrunentry struct { } +func (u *Reportrunentry) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportrunentry + + + RunTime := new(string) + if u.RunTime != nil { + + *RunTime = timeutil.Strftime(u.RunTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RunTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ReportId *string `json:"reportId,omitempty"` + + RunTime *string `json:"runTime,omitempty"` + + RunStatus *string `json:"runStatus,omitempty"` + + ErrorMessage *string `json:"errorMessage,omitempty"` + + RunDurationMsec *int `json:"runDurationMsec,omitempty"` + + ReportUrl *string `json:"reportUrl,omitempty"` + + ReportFormat *string `json:"reportFormat,omitempty"` + + ScheduleUri *string `json:"scheduleUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ReportId: u.ReportId, + + RunTime: RunTime, + + RunStatus: u.RunStatus, + + ErrorMessage: u.ErrorMessage, + + RunDurationMsec: u.RunDurationMsec, + + ReportUrl: u.ReportUrl, + + ReportFormat: u.ReportFormat, + + ScheduleUri: u.ScheduleUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportrunentry) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportrunentryentitydomainlisting.go b/platformclientv2/reportrunentryentitydomainlisting.go index 74b19aea7..cab5d71cd 100644 --- a/platformclientv2/reportrunentryentitydomainlisting.go +++ b/platformclientv2/reportrunentryentitydomainlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Reportrunentryentitydomainlisting struct { } +func (u *Reportrunentryentitydomainlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportrunentryentitydomainlisting + + + + return json.Marshal(&struct { + Entities *[]Reportrunentry `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportrunentryentitydomainlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportschedule.go b/platformclientv2/reportschedule.go index a0870e5a9..1ef3c4536 100644 --- a/platformclientv2/reportschedule.go +++ b/platformclientv2/reportschedule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Reportschedule struct { } +func (u *Reportschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportschedule + + + NextFireTime := new(string) + if u.NextFireTime != nil { + + *NextFireTime = timeutil.Strftime(u.NextFireTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + NextFireTime = nil + } + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + QuartzCronExpression *string `json:"quartzCronExpression,omitempty"` + + NextFireTime *string `json:"nextFireTime,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Description *string `json:"description,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + TimePeriod *string `json:"timePeriod,omitempty"` + + Interval *string `json:"interval,omitempty"` + + ReportFormat *string `json:"reportFormat,omitempty"` + + Locale *string `json:"locale,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + ReportId *string `json:"reportId,omitempty"` + + Parameters *map[string]interface{} `json:"parameters,omitempty"` + + LastRun *Reportrunentry `json:"lastRun,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + QuartzCronExpression: u.QuartzCronExpression, + + NextFireTime: NextFireTime, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Description: u.Description, + + TimeZone: u.TimeZone, + + TimePeriod: u.TimePeriod, + + Interval: u.Interval, + + ReportFormat: u.ReportFormat, + + Locale: u.Locale, + + Enabled: u.Enabled, + + ReportId: u.ReportId, + + Parameters: u.Parameters, + + LastRun: u.LastRun, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reportscheduleentitylisting.go b/platformclientv2/reportscheduleentitylisting.go index 9e798ae6d..9c0bd5a05 100644 --- a/platformclientv2/reportscheduleentitylisting.go +++ b/platformclientv2/reportscheduleentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Reportscheduleentitylisting struct { } +func (u *Reportscheduleentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reportscheduleentitylisting + + + + return json.Marshal(&struct { + Entities *[]Reportschedule `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reportscheduleentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/requestconfig.go b/platformclientv2/requestconfig.go index 7ab55ba29..827f0367d 100644 --- a/platformclientv2/requestconfig.go +++ b/platformclientv2/requestconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Requestconfig struct { } +func (u *Requestconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Requestconfig + + + + return json.Marshal(&struct { + RequestUrlTemplate *string `json:"requestUrlTemplate,omitempty"` + + RequestTemplate *string `json:"requestTemplate,omitempty"` + + RequestTemplateUri *string `json:"requestTemplateUri,omitempty"` + + RequestType *string `json:"requestType,omitempty"` + + Headers *map[string]string `json:"headers,omitempty"` + *Alias + }{ + RequestUrlTemplate: u.RequestUrlTemplate, + + RequestTemplate: u.RequestTemplate, + + RequestTemplateUri: u.RequestTemplateUri, + + RequestType: u.RequestType, + + Headers: u.Headers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Requestconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/requestmapping.go b/platformclientv2/requestmapping.go index 4c8610de7..79971beb3 100644 --- a/platformclientv2/requestmapping.go +++ b/platformclientv2/requestmapping.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Requestmapping struct { } +func (u *Requestmapping) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Requestmapping + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + AttributeType *string `json:"attributeType,omitempty"` + + MappingType *string `json:"mappingType,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Name: u.Name, + + AttributeType: u.AttributeType, + + MappingType: u.MappingType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Requestmapping) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reschedulingmanagementunitresponse.go b/platformclientv2/reschedulingmanagementunitresponse.go index dd4621e4f..52e506741 100644 --- a/platformclientv2/reschedulingmanagementunitresponse.go +++ b/platformclientv2/reschedulingmanagementunitresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Reschedulingmanagementunitresponse struct { } +func (u *Reschedulingmanagementunitresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reschedulingmanagementunitresponse + + + + return json.Marshal(&struct { + ManagementUnit *Managementunitreference `json:"managementUnit,omitempty"` + + Applied *bool `json:"applied,omitempty"` + *Alias + }{ + ManagementUnit: u.ManagementUnit, + + Applied: u.Applied, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reschedulingmanagementunitresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reschedulingoptionsrunresponse.go b/platformclientv2/reschedulingoptionsrunresponse.go index ee6a0d3fb..6a445ed40 100644 --- a/platformclientv2/reschedulingoptionsrunresponse.go +++ b/platformclientv2/reschedulingoptionsrunresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Reschedulingoptionsrunresponse struct { } +func (u *Reschedulingoptionsrunresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reschedulingoptionsrunresponse + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + ExistingSchedule *Buschedulereference `json:"existingSchedule,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + ManagementUnits *[]Reschedulingmanagementunitresponse `json:"managementUnits,omitempty"` + + AgentCount *int `json:"agentCount,omitempty"` + + ActivityCodeIds *[]string `json:"activityCodeIds,omitempty"` + + DoNotChangeWeeklyPaidTime *bool `json:"doNotChangeWeeklyPaidTime,omitempty"` + + DoNotChangeDailyPaidTime *bool `json:"doNotChangeDailyPaidTime,omitempty"` + + DoNotChangeShiftStartTimes *bool `json:"doNotChangeShiftStartTimes,omitempty"` + + DoNotChangeManuallyEditedShifts *bool `json:"doNotChangeManuallyEditedShifts,omitempty"` + *Alias + }{ + ExistingSchedule: u.ExistingSchedule, + + StartDate: StartDate, + + EndDate: EndDate, + + ManagementUnits: u.ManagementUnits, + + AgentCount: u.AgentCount, + + ActivityCodeIds: u.ActivityCodeIds, + + DoNotChangeWeeklyPaidTime: u.DoNotChangeWeeklyPaidTime, + + DoNotChangeDailyPaidTime: u.DoNotChangeDailyPaidTime, + + DoNotChangeShiftStartTimes: u.DoNotChangeShiftStartTimes, + + DoNotChangeManuallyEditedShifts: u.DoNotChangeManuallyEditedShifts, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reschedulingoptionsrunresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resolutiondetailqueryclause.go b/platformclientv2/resolutiondetailqueryclause.go index f89e0df79..1f719f9d3 100644 --- a/platformclientv2/resolutiondetailqueryclause.go +++ b/platformclientv2/resolutiondetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Resolutiondetailqueryclause struct { } +func (u *Resolutiondetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resolutiondetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Resolutiondetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resolutiondetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resolutiondetailqueryfilter.go b/platformclientv2/resolutiondetailqueryfilter.go index 5d3398421..356cef363 100644 --- a/platformclientv2/resolutiondetailqueryfilter.go +++ b/platformclientv2/resolutiondetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Resolutiondetailqueryfilter struct { } +func (u *Resolutiondetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resolutiondetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Resolutiondetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Resolutiondetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resolutiondetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resolutiondetailquerypredicate.go b/platformclientv2/resolutiondetailquerypredicate.go index 40aac319e..f6ae55162 100644 --- a/platformclientv2/resolutiondetailquerypredicate.go +++ b/platformclientv2/resolutiondetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Resolutiondetailquerypredicate struct { } +func (u *Resolutiondetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resolutiondetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Metric *string `json:"metric,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Metric: u.Metric, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resolutiondetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resourceconditionnode.go b/platformclientv2/resourceconditionnode.go index 8e2eb1826..eb3a39872 100644 --- a/platformclientv2/resourceconditionnode.go +++ b/platformclientv2/resourceconditionnode.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Resourceconditionnode struct { } +func (u *Resourceconditionnode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resourceconditionnode + + + + return json.Marshal(&struct { + VariableName *string `json:"variableName,omitempty"` + + Conjunction *string `json:"conjunction,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Operands *[]Resourceconditionvalue `json:"operands,omitempty"` + + Terms *[]Resourceconditionnode `json:"terms,omitempty"` + *Alias + }{ + VariableName: u.VariableName, + + Conjunction: u.Conjunction, + + Operator: u.Operator, + + Operands: u.Operands, + + Terms: u.Terms, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resourceconditionnode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resourceconditionvalue.go b/platformclientv2/resourceconditionvalue.go index 5bd21ad56..33a984d56 100644 --- a/platformclientv2/resourceconditionvalue.go +++ b/platformclientv2/resourceconditionvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Resourceconditionvalue struct { } +func (u *Resourceconditionvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resourceconditionvalue + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resourceconditionvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resourcepermissionpolicy.go b/platformclientv2/resourcepermissionpolicy.go index d143b30a1..0c7991a85 100644 --- a/platformclientv2/resourcepermissionpolicy.go +++ b/platformclientv2/resourcepermissionpolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Resourcepermissionpolicy struct { } +func (u *Resourcepermissionpolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resourcepermissionpolicy + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Domain *string `json:"domain,omitempty"` + + EntityName *string `json:"entityName,omitempty"` + + PolicyName *string `json:"policyName,omitempty"` + + PolicyDescription *string `json:"policyDescription,omitempty"` + + ActionSetKey *string `json:"actionSetKey,omitempty"` + + AllowConditions *bool `json:"allowConditions,omitempty"` + + ResourceConditionNode *Resourceconditionnode `json:"resourceConditionNode,omitempty"` + + NamedResources *[]string `json:"namedResources,omitempty"` + + ResourceCondition *string `json:"resourceCondition,omitempty"` + + ActionSet *[]string `json:"actionSet,omitempty"` + *Alias + }{ + Id: u.Id, + + Domain: u.Domain, + + EntityName: u.EntityName, + + PolicyName: u.PolicyName, + + PolicyDescription: u.PolicyDescription, + + ActionSetKey: u.ActionSetKey, + + AllowConditions: u.AllowConditions, + + ResourceConditionNode: u.ResourceConditionNode, + + NamedResources: u.NamedResources, + + ResourceCondition: u.ResourceCondition, + + ActionSet: u.ActionSet, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resourcepermissionpolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/response.go b/platformclientv2/response.go index 4f9b0b491..6f93e9456 100644 --- a/platformclientv2/response.go +++ b/platformclientv2/response.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,82 @@ type Response struct { } +func (u *Response) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Response + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *int `json:"version,omitempty"` + + Libraries *[]Domainentityref `json:"libraries,omitempty"` + + Texts *[]Responsetext `json:"texts,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + InteractionType *string `json:"interactionType,omitempty"` + + Substitutions *[]Responsesubstitution `json:"substitutions,omitempty"` + + SubstitutionsSchema *Jsonschemadocument `json:"substitutionsSchema,omitempty"` + + ResponseType *string `json:"responseType,omitempty"` + + MessagingTemplate *Messagingtemplate `json:"messagingTemplate,omitempty"` + + Assets *[]Addressableentityref `json:"assets,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + Libraries: u.Libraries, + + Texts: u.Texts, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + InteractionType: u.InteractionType, + + Substitutions: u.Substitutions, + + SubstitutionsSchema: u.SubstitutionsSchema, + + ResponseType: u.ResponseType, + + MessagingTemplate: u.MessagingTemplate, + + Assets: u.Assets, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Response) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responseconfig.go b/platformclientv2/responseconfig.go index 9a7cef879..f2545e0a4 100644 --- a/platformclientv2/responseconfig.go +++ b/platformclientv2/responseconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Responseconfig struct { } +func (u *Responseconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responseconfig + + + + return json.Marshal(&struct { + TranslationMap *map[string]string `json:"translationMap,omitempty"` + + TranslationMapDefaults *map[string]string `json:"translationMapDefaults,omitempty"` + + SuccessTemplate *string `json:"successTemplate,omitempty"` + + SuccessTemplateUri *string `json:"successTemplateUri,omitempty"` + *Alias + }{ + TranslationMap: u.TranslationMap, + + TranslationMapDefaults: u.TranslationMapDefaults, + + SuccessTemplate: u.SuccessTemplate, + + SuccessTemplateUri: u.SuccessTemplateUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responseconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responseentitylist.go b/platformclientv2/responseentitylist.go index a1153e8c5..c3476d802 100644 --- a/platformclientv2/responseentitylist.go +++ b/platformclientv2/responseentitylist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Responseentitylist struct { } +func (u *Responseentitylist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responseentitylist + + + + return json.Marshal(&struct { + Entities *[]Response `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responseentitylist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responseentitylisting.go b/platformclientv2/responseentitylisting.go index bb3eb4d40..1551b42ad 100644 --- a/platformclientv2/responseentitylisting.go +++ b/platformclientv2/responseentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Responseentitylisting struct { } +func (u *Responseentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responseentitylisting + + + + return json.Marshal(&struct { + Entities *[]Response `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responseentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responsefilter.go b/platformclientv2/responsefilter.go index dcf04d648..53205a66e 100644 --- a/platformclientv2/responsefilter.go +++ b/platformclientv2/responsefilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Responsefilter struct { } +func (u *Responsefilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responsefilter + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Name: u.Name, + + Operator: u.Operator, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responsefilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responsequeryrequest.go b/platformclientv2/responsequeryrequest.go index 8bd61408e..a84f7fd92 100644 --- a/platformclientv2/responsequeryrequest.go +++ b/platformclientv2/responsequeryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Responsequeryrequest struct { } +func (u *Responsequeryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responsequeryrequest + + + + return json.Marshal(&struct { + QueryPhrase *string `json:"queryPhrase,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + Filters *[]Responsefilter `json:"filters,omitempty"` + *Alias + }{ + QueryPhrase: u.QueryPhrase, + + PageSize: u.PageSize, + + Filters: u.Filters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responsequeryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responsequeryresults.go b/platformclientv2/responsequeryresults.go index 44b7be96b..2acc46a34 100644 --- a/platformclientv2/responsequeryresults.go +++ b/platformclientv2/responsequeryresults.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Responsequeryresults struct { } +func (u *Responsequeryresults) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responsequeryresults + + + + return json.Marshal(&struct { + Results *Responseentitylist `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responsequeryresults) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responseset.go b/platformclientv2/responseset.go index 6c7f76514..706d2c58e 100644 --- a/platformclientv2/responseset.go +++ b/platformclientv2/responseset.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Responseset struct { } +func (u *Responseset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responseset + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Responses *map[string]Reaction `json:"responses,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Responses: u.Responses, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responseset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responsesetentitylisting.go b/platformclientv2/responsesetentitylisting.go index d84f1215f..480748725 100644 --- a/platformclientv2/responsesetentitylisting.go +++ b/platformclientv2/responsesetentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Responsesetentitylisting struct { } +func (u *Responsesetentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responsesetentitylisting + + + + return json.Marshal(&struct { + Entities *[]Responseset `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responsesetentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responsesubstitution.go b/platformclientv2/responsesubstitution.go index 704100bd3..d03751efa 100644 --- a/platformclientv2/responsesubstitution.go +++ b/platformclientv2/responsesubstitution.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Responsesubstitution struct { } +func (u *Responsesubstitution) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responsesubstitution + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Description *string `json:"description,omitempty"` + + DefaultValue *string `json:"defaultValue,omitempty"` + *Alias + }{ + Id: u.Id, + + Description: u.Description, + + DefaultValue: u.DefaultValue, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responsesubstitution) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/responsetext.go b/platformclientv2/responsetext.go index 92f0cf5ad..a2831ef32 100644 --- a/platformclientv2/responsetext.go +++ b/platformclientv2/responsetext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Responsetext struct { } +func (u *Responsetext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Responsetext + + + + return json.Marshal(&struct { + Content *string `json:"content,omitempty"` + + ContentType *string `json:"contentType,omitempty"` + *Alias + }{ + Content: u.Content, + + ContentType: u.ContentType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Responsetext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resterrordetail.go b/platformclientv2/resterrordetail.go index 0768fe505..08347f516 100644 --- a/platformclientv2/resterrordetail.go +++ b/platformclientv2/resterrordetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Resterrordetail struct { } +func (u *Resterrordetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resterrordetail + + + + return json.Marshal(&struct { + VarError *string `json:"error,omitempty"` + + Details *string `json:"details,omitempty"` + *Alias + }{ + VarError: u.VarError, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resterrordetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/resultcounters.go b/platformclientv2/resultcounters.go index 0fab85274..82b8acea5 100644 --- a/platformclientv2/resultcounters.go +++ b/platformclientv2/resultcounters.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Resultcounters struct { } +func (u *Resultcounters) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Resultcounters + + + + return json.Marshal(&struct { + Success *int `json:"success,omitempty"` + + Failure *int `json:"failure,omitempty"` + *Alias + }{ + Success: u.Success, + + Failure: u.Failure, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Resultcounters) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/retentionduration.go b/platformclientv2/retentionduration.go index f7dc069a8..abc1f8065 100644 --- a/platformclientv2/retentionduration.go +++ b/platformclientv2/retentionduration.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Retentionduration struct { } +func (u *Retentionduration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Retentionduration + + + + return json.Marshal(&struct { + ArchiveRetention *Archiveretention `json:"archiveRetention,omitempty"` + + DeleteRetention *Deleteretention `json:"deleteRetention,omitempty"` + *Alias + }{ + ArchiveRetention: u.ArchiveRetention, + + DeleteRetention: u.DeleteRetention, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Retentionduration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/reversewhitepageslookupresult.go b/platformclientv2/reversewhitepageslookupresult.go index 8108afa5a..4dadf5f54 100644 --- a/platformclientv2/reversewhitepageslookupresult.go +++ b/platformclientv2/reversewhitepageslookupresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Reversewhitepageslookupresult struct { } +func (u *Reversewhitepageslookupresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Reversewhitepageslookupresult + + + + return json.Marshal(&struct { + Contacts *[]Externalcontact `json:"contacts,omitempty"` + + ExternalOrganizations *[]Externalorganization `json:"externalOrganizations,omitempty"` + *Alias + }{ + Contacts: u.Contacts, + + ExternalOrganizations: u.ExternalOrganizations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Reversewhitepageslookupresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ring.go b/platformclientv2/ring.go index 60a4d68b4..238f10122 100644 --- a/platformclientv2/ring.go +++ b/platformclientv2/ring.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Ring struct { } +func (u *Ring) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ring + + + + return json.Marshal(&struct { + ExpansionCriteria *[]Expansioncriterium `json:"expansionCriteria,omitempty"` + + Actions *Actions `json:"actions,omitempty"` + *Alias + }{ + ExpansionCriteria: u.ExpansionCriteria, + + Actions: u.Actions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ring) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/roledivision.go b/platformclientv2/roledivision.go index 2cd3d05fe..79d04f91f 100644 --- a/platformclientv2/roledivision.go +++ b/platformclientv2/roledivision.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Roledivision struct { } +func (u *Roledivision) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Roledivision + + + + return json.Marshal(&struct { + RoleId *string `json:"roleId,omitempty"` + + DivisionId *string `json:"divisionId,omitempty"` + *Alias + }{ + RoleId: u.RoleId, + + DivisionId: u.DivisionId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Roledivision) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/roledivisiongrants.go b/platformclientv2/roledivisiongrants.go index 84dc71e6d..32eedbc2c 100644 --- a/platformclientv2/roledivisiongrants.go +++ b/platformclientv2/roledivisiongrants.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Roledivisiongrants struct { } +func (u *Roledivisiongrants) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Roledivisiongrants + + + + return json.Marshal(&struct { + Grants *[]Roledivisionpair `json:"grants,omitempty"` + *Alias + }{ + Grants: u.Grants, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Roledivisiongrants) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/roledivisionpair.go b/platformclientv2/roledivisionpair.go index 67e082d95..ae6239d60 100644 --- a/platformclientv2/roledivisionpair.go +++ b/platformclientv2/roledivisionpair.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Roledivisionpair struct { } +func (u *Roledivisionpair) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Roledivisionpair + + + + return json.Marshal(&struct { + RoleId *string `json:"roleId,omitempty"` + + DivisionId *string `json:"divisionId,omitempty"` + *Alias + }{ + RoleId: u.RoleId, + + DivisionId: u.DivisionId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Roledivisionpair) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routepathrequest.go b/platformclientv2/routepathrequest.go index 8cb070be1..e84a8e458 100644 --- a/platformclientv2/routepathrequest.go +++ b/platformclientv2/routepathrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Routepathrequest struct { } +func (u *Routepathrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routepathrequest + + + + return json.Marshal(&struct { + QueueId *string `json:"queueId,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + LanguageId *string `json:"languageId,omitempty"` + + SkillIds *[]string `json:"skillIds,omitempty"` + + SourcePlanningGroup *Sourceplanninggrouprequest `json:"sourcePlanningGroup,omitempty"` + *Alias + }{ + QueueId: u.QueueId, + + MediaType: u.MediaType, + + LanguageId: u.LanguageId, + + SkillIds: u.SkillIds, + + SourcePlanningGroup: u.SourcePlanningGroup, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routepathrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routepathresponse.go b/platformclientv2/routepathresponse.go index bc4ca7f5d..deefc2c9b 100644 --- a/platformclientv2/routepathresponse.go +++ b/platformclientv2/routepathresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Routepathresponse struct { } +func (u *Routepathresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routepathresponse + + + + return json.Marshal(&struct { + Queue *Queuereference `json:"queue,omitempty"` + + MediaType *string `json:"mediaType,omitempty"` + + Language *Languagereference `json:"language,omitempty"` + + Skills *[]Routingskillreference `json:"skills,omitempty"` + *Alias + }{ + Queue: u.Queue, + + MediaType: u.MediaType, + + Language: u.Language, + + Skills: u.Skills, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routepathresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingconversationattributesrequest.go b/platformclientv2/routingconversationattributesrequest.go index 7f7e2760c..fbeda1378 100644 --- a/platformclientv2/routingconversationattributesrequest.go +++ b/platformclientv2/routingconversationattributesrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Routingconversationattributesrequest struct { } +func (u *Routingconversationattributesrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingconversationattributesrequest + + + + return json.Marshal(&struct { + Priority *int `json:"priority,omitempty"` + + SkillIds *[]string `json:"skillIds,omitempty"` + + LanguageId *string `json:"languageId,omitempty"` + *Alias + }{ + Priority: u.Priority, + + SkillIds: u.SkillIds, + + LanguageId: u.LanguageId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingconversationattributesrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingconversationattributesresponse.go b/platformclientv2/routingconversationattributesresponse.go index 26269eb74..a245fe342 100644 --- a/platformclientv2/routingconversationattributesresponse.go +++ b/platformclientv2/routingconversationattributesresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Routingconversationattributesresponse struct { } +func (u *Routingconversationattributesresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingconversationattributesresponse + + + + return json.Marshal(&struct { + Priority *int `json:"priority,omitempty"` + + Skills *[]Routingskill `json:"skills,omitempty"` + + Language *Language `json:"language,omitempty"` + *Alias + }{ + Priority: u.Priority, + + Skills: u.Skills, + + Language: u.Language, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingconversationattributesresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingdata.go b/platformclientv2/routingdata.go index 40a66562e..75382cd15 100644 --- a/platformclientv2/routingdata.go +++ b/platformclientv2/routingdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Routingdata struct { } +func (u *Routingdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingdata + + + + return json.Marshal(&struct { + QueueId *string `json:"queueId,omitempty"` + + LanguageId *string `json:"languageId,omitempty"` + + Priority *int `json:"priority,omitempty"` + + SkillIds *[]string `json:"skillIds,omitempty"` + + PreferredAgentIds *[]string `json:"preferredAgentIds,omitempty"` + + ScoredAgents *[]Scoredagent `json:"scoredAgents,omitempty"` + *Alias + }{ + QueueId: u.QueueId, + + LanguageId: u.LanguageId, + + Priority: u.Priority, + + SkillIds: u.SkillIds, + + PreferredAgentIds: u.PreferredAgentIds, + + ScoredAgents: u.ScoredAgents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingrule.go b/platformclientv2/routingrule.go index 89e0ec532..94d485569 100644 --- a/platformclientv2/routingrule.go +++ b/platformclientv2/routingrule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Routingrule struct { } +func (u *Routingrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingrule + + + + return json.Marshal(&struct { + Operator *string `json:"operator,omitempty"` + + Threshold *int `json:"threshold,omitempty"` + + WaitSeconds *float64 `json:"waitSeconds,omitempty"` + *Alias + }{ + Operator: u.Operator, + + Threshold: u.Threshold, + + WaitSeconds: u.WaitSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingsettings.go b/platformclientv2/routingsettings.go index 6c8eb6c58..2ecd2851c 100644 --- a/platformclientv2/routingsettings.go +++ b/platformclientv2/routingsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Routingsettings struct { } +func (u *Routingsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingsettings + + + + return json.Marshal(&struct { + ResetAgentScoreOnPresenceChange *bool `json:"resetAgentScoreOnPresenceChange,omitempty"` + *Alias + }{ + ResetAgentScoreOnPresenceChange: u.ResetAgentScoreOnPresenceChange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingskill.go b/platformclientv2/routingskill.go index b9ad6988c..80d9d4e0d 100644 --- a/platformclientv2/routingskill.go +++ b/platformclientv2/routingskill.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Routingskill struct { } +func (u *Routingskill) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingskill + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + State *string `json:"state,omitempty"` + + Version *string `json:"version,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateModified: DateModified, + + State: u.State, + + Version: u.Version, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingskill) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingskillreference.go b/platformclientv2/routingskillreference.go index 79c5e3b03..f6e014c1c 100644 --- a/platformclientv2/routingskillreference.go +++ b/platformclientv2/routingskillreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Routingskillreference struct { } +func (u *Routingskillreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingskillreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingskillreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingstatus.go b/platformclientv2/routingstatus.go index 60b320ca8..a6f01b7a5 100644 --- a/platformclientv2/routingstatus.go +++ b/platformclientv2/routingstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Routingstatus struct { } +func (u *Routingstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingstatus + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + Status *string `json:"status,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + *Alias + }{ + UserId: u.UserId, + + Status: u.Status, + + StartTime: StartTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingstatusdetailqueryclause.go b/platformclientv2/routingstatusdetailqueryclause.go index 32f559999..63e1c0c2b 100644 --- a/platformclientv2/routingstatusdetailqueryclause.go +++ b/platformclientv2/routingstatusdetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Routingstatusdetailqueryclause struct { } +func (u *Routingstatusdetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingstatusdetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Routingstatusdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingstatusdetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingstatusdetailqueryfilter.go b/platformclientv2/routingstatusdetailqueryfilter.go index 05d8d0772..f8bf9ffe0 100644 --- a/platformclientv2/routingstatusdetailqueryfilter.go +++ b/platformclientv2/routingstatusdetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Routingstatusdetailqueryfilter struct { } +func (u *Routingstatusdetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingstatusdetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Routingstatusdetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Routingstatusdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingstatusdetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/routingstatusdetailquerypredicate.go b/platformclientv2/routingstatusdetailquerypredicate.go index 7b0fa514b..3969d0d01 100644 --- a/platformclientv2/routingstatusdetailquerypredicate.go +++ b/platformclientv2/routingstatusdetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Routingstatusdetailquerypredicate struct { } +func (u *Routingstatusdetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Routingstatusdetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Routingstatusdetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ruleset.go b/platformclientv2/ruleset.go index 98866e44f..352af0009 100644 --- a/platformclientv2/ruleset.go +++ b/platformclientv2/ruleset.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Ruleset struct { } +func (u *Ruleset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ruleset + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + ContactList *Domainentityref `json:"contactList,omitempty"` + + Queue *Domainentityref `json:"queue,omitempty"` + + Rules *[]Dialerrule `json:"rules,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + ContactList: u.ContactList, + + Queue: u.Queue, + + Rules: u.Rules, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ruleset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/rulesetdiagnostic.go b/platformclientv2/rulesetdiagnostic.go index fa5104363..538249edf 100644 --- a/platformclientv2/rulesetdiagnostic.go +++ b/platformclientv2/rulesetdiagnostic.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Rulesetdiagnostic struct { } +func (u *Rulesetdiagnostic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Rulesetdiagnostic + + + + return json.Marshal(&struct { + RuleSet *Domainentityref `json:"ruleSet,omitempty"` + + Warnings *[]string `json:"warnings,omitempty"` + *Alias + }{ + RuleSet: u.RuleSet, + + Warnings: u.Warnings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Rulesetdiagnostic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/rulesetentitylisting.go b/platformclientv2/rulesetentitylisting.go index 4a82244e3..d0943d6ce 100644 --- a/platformclientv2/rulesetentitylisting.go +++ b/platformclientv2/rulesetentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Rulesetentitylisting struct { } +func (u *Rulesetentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Rulesetentitylisting + + + + return json.Marshal(&struct { + Entities *[]Ruleset `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Rulesetentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/runnowresponse.go b/platformclientv2/runnowresponse.go index 47de888a4..85f2f40d1 100644 --- a/platformclientv2/runnowresponse.go +++ b/platformclientv2/runnowresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Runnowresponse struct { } +func (u *Runnowresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Runnowresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Runnowresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/salesforce.go b/platformclientv2/salesforce.go index ccf1b0ee2..a63d16715 100644 --- a/platformclientv2/salesforce.go +++ b/platformclientv2/salesforce.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Salesforce struct { } +func (u *Salesforce) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Salesforce + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + IssuerURI *string `json:"issuerURI,omitempty"` + + SsoTargetURI *string `json:"ssoTargetURI,omitempty"` + + SloURI *string `json:"sloURI,omitempty"` + + SloBinding *string `json:"sloBinding,omitempty"` + + Certificate *string `json:"certificate,omitempty"` + + Certificates *[]string `json:"certificates,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Disabled: u.Disabled, + + IssuerURI: u.IssuerURI, + + SsoTargetURI: u.SsoTargetURI, + + SloURI: u.SloURI, + + SloBinding: u.SloBinding, + + Certificate: u.Certificate, + + Certificates: u.Certificates, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Salesforce) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedule.go b/platformclientv2/schedule.go index 2b2ce8765..d9c9d364e 100644 --- a/platformclientv2/schedule.go +++ b/platformclientv2/schedule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,110 @@ type Schedule struct { } +func (u *Schedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + Start := new(string) + if u.Start != nil { + *Start = timeutil.Strftime(u.Start, "%Y-%m-%dT%H:%M:%S.%f") + + } else { + Start = nil + } + + End := new(string) + if u.End != nil { + *End = timeutil.Strftime(u.End, "%Y-%m-%dT%H:%M:%S.%f") + + } else { + End = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + Start *string `json:"start,omitempty"` + + End *string `json:"end,omitempty"` + + Rrule *string `json:"rrule,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + Start: Start, + + End: End, + + Rrule: u.Rrule, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scheduleentitylisting.go b/platformclientv2/scheduleentitylisting.go index b7baed56c..517fe1c40 100644 --- a/platformclientv2/scheduleentitylisting.go +++ b/platformclientv2/scheduleentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Scheduleentitylisting struct { } +func (u *Scheduleentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scheduleentitylisting + + + + return json.Marshal(&struct { + Entities *[]Schedule `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scheduleentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulegenerationmessage.go b/platformclientv2/schedulegenerationmessage.go index 7ba61a9a9..275011507 100644 --- a/platformclientv2/schedulegenerationmessage.go +++ b/platformclientv2/schedulegenerationmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Schedulegenerationmessage struct { } +func (u *Schedulegenerationmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulegenerationmessage + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Arguments *[]Schedulermessageargument `json:"arguments,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Arguments: u.Arguments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulegenerationmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulegenerationresult.go b/platformclientv2/schedulegenerationresult.go index 8a6149fae..95badabff 100644 --- a/platformclientv2/schedulegenerationresult.go +++ b/platformclientv2/schedulegenerationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Schedulegenerationresult struct { } +func (u *Schedulegenerationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulegenerationresult + + + + return json.Marshal(&struct { + Failed *bool `json:"failed,omitempty"` + + RunId *string `json:"runId,omitempty"` + + MessageCount *int `json:"messageCount,omitempty"` + + Messages *[]Schedulegenerationmessage `json:"messages,omitempty"` + *Alias + }{ + Failed: u.Failed, + + RunId: u.RunId, + + MessageCount: u.MessageCount, + + Messages: u.Messages, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulegenerationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulegenerationresultsummary.go b/platformclientv2/schedulegenerationresultsummary.go index 60cf31983..6cdad2178 100644 --- a/platformclientv2/schedulegenerationresultsummary.go +++ b/platformclientv2/schedulegenerationresultsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Schedulegenerationresultsummary struct { } +func (u *Schedulegenerationresultsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulegenerationresultsummary + + + + return json.Marshal(&struct { + Failed *bool `json:"failed,omitempty"` + + RunId *string `json:"runId,omitempty"` + + MessageCount *int `json:"messageCount,omitempty"` + *Alias + }{ + Failed: u.Failed, + + RunId: u.RunId, + + MessageCount: u.MessageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulegenerationresultsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulegenerationwarning.go b/platformclientv2/schedulegenerationwarning.go index 1d1a691f5..2b8e70921 100644 --- a/platformclientv2/schedulegenerationwarning.go +++ b/platformclientv2/schedulegenerationwarning.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Schedulegenerationwarning struct { } +func (u *Schedulegenerationwarning) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulegenerationwarning + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + UserNotLicensed *bool `json:"userNotLicensed,omitempty"` + + UnableToMeetMaxDays *bool `json:"unableToMeetMaxDays,omitempty"` + + UnableToScheduleRequiredDays *[]string `json:"unableToScheduleRequiredDays,omitempty"` + + UnableToMeetMinPaidForTheWeek *bool `json:"unableToMeetMinPaidForTheWeek,omitempty"` + + UnableToMeetMaxPaidForTheWeek *bool `json:"unableToMeetMaxPaidForTheWeek,omitempty"` + + NoNeedDays *[]string `json:"noNeedDays,omitempty"` + + ShiftsTooCloseTogether *bool `json:"shiftsTooCloseTogether,omitempty"` + *Alias + }{ + UserId: u.UserId, + + UserNotLicensed: u.UserNotLicensed, + + UnableToMeetMaxDays: u.UnableToMeetMaxDays, + + UnableToScheduleRequiredDays: u.UnableToScheduleRequiredDays, + + UnableToMeetMinPaidForTheWeek: u.UnableToMeetMinPaidForTheWeek, + + UnableToMeetMaxPaidForTheWeek: u.UnableToMeetMaxPaidForTheWeek, + + NoNeedDays: u.NoNeedDays, + + ShiftsTooCloseTogether: u.ShiftsTooCloseTogether, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulegenerationwarning) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulegroup.go b/platformclientv2/schedulegroup.go index a3fe3283b..f6d727c0d 100644 --- a/platformclientv2/schedulegroup.go +++ b/platformclientv2/schedulegroup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Schedulegroup struct { } +func (u *Schedulegroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulegroup + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + OpenSchedules *[]Domainentityref `json:"openSchedules,omitempty"` + + ClosedSchedules *[]Domainentityref `json:"closedSchedules,omitempty"` + + HolidaySchedules *[]Domainentityref `json:"holidaySchedules,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + TimeZone: u.TimeZone, + + OpenSchedules: u.OpenSchedules, + + ClosedSchedules: u.ClosedSchedules, + + HolidaySchedules: u.HolidaySchedules, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulegroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulegroupentitylisting.go b/platformclientv2/schedulegroupentitylisting.go index 0edcc9431..e58594552 100644 --- a/platformclientv2/schedulegroupentitylisting.go +++ b/platformclientv2/schedulegroupentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Schedulegroupentitylisting struct { } +func (u *Schedulegroupentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulegroupentitylisting + + + + return json.Marshal(&struct { + Entities *[]Schedulegroup `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulegroupentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scheduleinterval.go b/platformclientv2/scheduleinterval.go index 601a456af..1065df0d4 100644 --- a/platformclientv2/scheduleinterval.go +++ b/platformclientv2/scheduleinterval.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scheduleinterval struct { } +func (u *Scheduleinterval) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scheduleinterval + + + + return json.Marshal(&struct { + Start *string `json:"start,omitempty"` + + End *string `json:"end,omitempty"` + *Alias + }{ + Start: u.Start, + + End: u.End, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scheduleinterval) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulermessageargument.go b/platformclientv2/schedulermessageargument.go index 41f5eb1e1..061d07618 100644 --- a/platformclientv2/schedulermessageargument.go +++ b/platformclientv2/schedulermessageargument.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Schedulermessageargument struct { } +func (u *Schedulermessageargument) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulermessageargument + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulermessageargument) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulingprocessingerror.go b/platformclientv2/schedulingprocessingerror.go index 274ab15fd..e8acc1f84 100644 --- a/platformclientv2/schedulingprocessingerror.go +++ b/platformclientv2/schedulingprocessingerror.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Schedulingprocessingerror struct { } +func (u *Schedulingprocessingerror) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulingprocessingerror + + + + return json.Marshal(&struct { + InternalErrorCode *string `json:"internalErrorCode,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + InternalErrorCode: u.InternalErrorCode, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulingprocessingerror) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulingsettingsrequest.go b/platformclientv2/schedulingsettingsrequest.go index 43fba884c..ce79fa7f5 100644 --- a/platformclientv2/schedulingsettingsrequest.go +++ b/platformclientv2/schedulingsettingsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Schedulingsettingsrequest struct { } +func (u *Schedulingsettingsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulingsettingsrequest + + + + return json.Marshal(&struct { + MaxOccupancyPercentForDeferredWork *int `json:"maxOccupancyPercentForDeferredWork,omitempty"` + + DefaultShrinkagePercent *float64 `json:"defaultShrinkagePercent,omitempty"` + + ShrinkageOverrides *Shrinkageoverrides `json:"shrinkageOverrides,omitempty"` + + PlanningPeriod *Valuewrapperplanningperiodsettings `json:"planningPeriod,omitempty"` + + StartDayOfWeekend *string `json:"startDayOfWeekend,omitempty"` + *Alias + }{ + MaxOccupancyPercentForDeferredWork: u.MaxOccupancyPercentForDeferredWork, + + DefaultShrinkagePercent: u.DefaultShrinkagePercent, + + ShrinkageOverrides: u.ShrinkageOverrides, + + PlanningPeriod: u.PlanningPeriod, + + StartDayOfWeekend: u.StartDayOfWeekend, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulingsettingsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulingsettingsresponse.go b/platformclientv2/schedulingsettingsresponse.go index d7b2cd303..e7a5bac74 100644 --- a/platformclientv2/schedulingsettingsresponse.go +++ b/platformclientv2/schedulingsettingsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Schedulingsettingsresponse struct { } +func (u *Schedulingsettingsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulingsettingsresponse + + + + return json.Marshal(&struct { + MaxOccupancyPercentForDeferredWork *int `json:"maxOccupancyPercentForDeferredWork,omitempty"` + + DefaultShrinkagePercent *float64 `json:"defaultShrinkagePercent,omitempty"` + + ShrinkageOverrides *Shrinkageoverrides `json:"shrinkageOverrides,omitempty"` + + PlanningPeriod *Planningperiodsettings `json:"planningPeriod,omitempty"` + + StartDayOfWeekend *string `json:"startDayOfWeekend,omitempty"` + *Alias + }{ + MaxOccupancyPercentForDeferredWork: u.MaxOccupancyPercentForDeferredWork, + + DefaultShrinkagePercent: u.DefaultShrinkagePercent, + + ShrinkageOverrides: u.ShrinkageOverrides, + + PlanningPeriod: u.PlanningPeriod, + + StartDayOfWeekend: u.StartDayOfWeekend, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulingsettingsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulingstatusresponse.go b/platformclientv2/schedulingstatusresponse.go index dc4d348f1..241e1722d 100644 --- a/platformclientv2/schedulingstatusresponse.go +++ b/platformclientv2/schedulingstatusresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Schedulingstatusresponse struct { } +func (u *Schedulingstatusresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulingstatusresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Status *string `json:"status,omitempty"` + + ErrorDetails *[]Schedulingprocessingerror `json:"errorDetails,omitempty"` + + SchedulingResultUri *string `json:"schedulingResultUri,omitempty"` + + PercentComplete *int `json:"percentComplete,omitempty"` + *Alias + }{ + Id: u.Id, + + Status: u.Status, + + ErrorDetails: u.ErrorDetails, + + SchedulingResultUri: u.SchedulingResultUri, + + PercentComplete: u.PercentComplete, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulingstatusresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schedulingtestingoptionsrequest.go b/platformclientv2/schedulingtestingoptionsrequest.go index 6d17c1d4e..cf4a968d8 100644 --- a/platformclientv2/schedulingtestingoptionsrequest.go +++ b/platformclientv2/schedulingtestingoptionsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Schedulingtestingoptionsrequest struct { } +func (u *Schedulingtestingoptionsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schedulingtestingoptionsrequest + + + + return json.Marshal(&struct { + FastScheduling *bool `json:"fastScheduling,omitempty"` + + DelayScheduling *bool `json:"delayScheduling,omitempty"` + + FailScheduling *bool `json:"failScheduling,omitempty"` + + PopulateWarnings *bool `json:"populateWarnings,omitempty"` + *Alias + }{ + FastScheduling: u.FastScheduling, + + DelayScheduling: u.DelayScheduling, + + FailScheduling: u.FailScheduling, + + PopulateWarnings: u.PopulateWarnings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schedulingtestingoptionsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schema.go b/platformclientv2/schema.go index 485ef6f0a..631cd9abe 100644 --- a/platformclientv2/schema.go +++ b/platformclientv2/schema.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Schema struct { } +func (u *Schema) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schema + + + + return json.Marshal(&struct { + Title *string `json:"title,omitempty"` + + Description *string `json:"description,omitempty"` + + VarType *[]string `json:"type,omitempty"` + + Items *Items `json:"items,omitempty"` + + Pattern *string `json:"pattern,omitempty"` + *Alias + }{ + Title: u.Title, + + Description: u.Description, + + VarType: u.VarType, + + Items: u.Items, + + Pattern: u.Pattern, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schema) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schemacategory.go b/platformclientv2/schemacategory.go index faeff0453..3884d75dd 100644 --- a/platformclientv2/schemacategory.go +++ b/platformclientv2/schemacategory.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Schemacategory struct { } +func (u *Schemacategory) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schemacategory + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schemacategory) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schemacategoryentitylisting.go b/platformclientv2/schemacategoryentitylisting.go index 986269f1b..222411d00 100644 --- a/platformclientv2/schemacategoryentitylisting.go +++ b/platformclientv2/schemacategoryentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Schemacategoryentitylisting struct { } +func (u *Schemacategoryentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schemacategoryentitylisting + + + + return json.Marshal(&struct { + Entities *[]Schemacategory `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schemacategoryentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schemaquantitylimits.go b/platformclientv2/schemaquantitylimits.go index 842e3c318..bdeb06bbf 100644 --- a/platformclientv2/schemaquantitylimits.go +++ b/platformclientv2/schemaquantitylimits.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Schemaquantitylimits struct { } +func (u *Schemaquantitylimits) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schemaquantitylimits + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + MinFieldNameCharacters *int `json:"minFieldNameCharacters,omitempty"` + + MaxFieldNameCharacters *int `json:"maxFieldNameCharacters,omitempty"` + + MinFieldDescriptionCharacters *int `json:"minFieldDescriptionCharacters,omitempty"` + + MaxFieldDescriptionCharacters *int `json:"maxFieldDescriptionCharacters,omitempty"` + + MinSchemaNameCharacters *int `json:"minSchemaNameCharacters,omitempty"` + + MaxSchemaNameCharacters *int `json:"maxSchemaNameCharacters,omitempty"` + + MinSchemaDescriptionCharacters *int `json:"minSchemaDescriptionCharacters,omitempty"` + + MaxSchemaDescriptionCharacters *int `json:"maxSchemaDescriptionCharacters,omitempty"` + + MaxNumberOfSchemasPerOrg *int `json:"maxNumberOfSchemasPerOrg,omitempty"` + + MaxNumberOfFieldsPerSchema *int `json:"maxNumberOfFieldsPerSchema,omitempty"` + + MaxNumberOfFieldsPerOrg *int `json:"maxNumberOfFieldsPerOrg,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + MinFieldNameCharacters: u.MinFieldNameCharacters, + + MaxFieldNameCharacters: u.MaxFieldNameCharacters, + + MinFieldDescriptionCharacters: u.MinFieldDescriptionCharacters, + + MaxFieldDescriptionCharacters: u.MaxFieldDescriptionCharacters, + + MinSchemaNameCharacters: u.MinSchemaNameCharacters, + + MaxSchemaNameCharacters: u.MaxSchemaNameCharacters, + + MinSchemaDescriptionCharacters: u.MinSchemaDescriptionCharacters, + + MaxSchemaDescriptionCharacters: u.MaxSchemaDescriptionCharacters, + + MaxNumberOfSchemasPerOrg: u.MaxNumberOfSchemasPerOrg, + + MaxNumberOfFieldsPerSchema: u.MaxNumberOfFieldsPerSchema, + + MaxNumberOfFieldsPerOrg: u.MaxNumberOfFieldsPerOrg, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schemaquantitylimits) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/schemareferenceentitylisting.go b/platformclientv2/schemareferenceentitylisting.go index 62f75533e..ebdfd8b06 100644 --- a/platformclientv2/schemareferenceentitylisting.go +++ b/platformclientv2/schemareferenceentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Schemareferenceentitylisting struct { } +func (u *Schemareferenceentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Schemareferenceentitylisting + + + + return json.Marshal(&struct { + Entities *[]Domainschemareference `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Schemareferenceentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimconfigresourcetype.go b/platformclientv2/scimconfigresourcetype.go index 4088d8964..ae536e2e2 100644 --- a/platformclientv2/scimconfigresourcetype.go +++ b/platformclientv2/scimconfigresourcetype.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Scimconfigresourcetype struct { } +func (u *Scimconfigresourcetype) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimconfigresourcetype + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Schemas *[]string `json:"schemas,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Schema *string `json:"schema,omitempty"` + + SchemaExtensions *[]Scimconfigresourcetypeschemaextension `json:"schemaExtensions,omitempty"` + + Endpoint *string `json:"endpoint,omitempty"` + + Meta *Scimmetadata `json:"meta,omitempty"` + *Alias + }{ + Id: u.Id, + + Schemas: u.Schemas, + + Name: u.Name, + + Description: u.Description, + + Schema: u.Schema, + + SchemaExtensions: u.SchemaExtensions, + + Endpoint: u.Endpoint, + + Meta: u.Meta, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimconfigresourcetype) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimconfigresourcetypeschemaextension.go b/platformclientv2/scimconfigresourcetypeschemaextension.go index 14e58926c..d621c4c66 100644 --- a/platformclientv2/scimconfigresourcetypeschemaextension.go +++ b/platformclientv2/scimconfigresourcetypeschemaextension.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scimconfigresourcetypeschemaextension struct { } +func (u *Scimconfigresourcetypeschemaextension) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimconfigresourcetypeschemaextension + + + + return json.Marshal(&struct { + Schema *string `json:"schema,omitempty"` + + Required *bool `json:"required,omitempty"` + *Alias + }{ + Schema: u.Schema, + + Required: u.Required, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimconfigresourcetypeschemaextension) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimconfigresourcetypeslistresponse.go b/platformclientv2/scimconfigresourcetypeslistresponse.go index 3b47b4393..b98e94d75 100644 --- a/platformclientv2/scimconfigresourcetypeslistresponse.go +++ b/platformclientv2/scimconfigresourcetypeslistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Scimconfigresourcetypeslistresponse struct { } +func (u *Scimconfigresourcetypeslistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimconfigresourcetypeslistresponse + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + TotalResults *int `json:"totalResults,omitempty"` + + StartIndex *int `json:"startIndex,omitempty"` + + ItemsPerPage *int `json:"itemsPerPage,omitempty"` + + Resources *[]Scimconfigresourcetype `json:"Resources,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + TotalResults: u.TotalResults, + + StartIndex: u.StartIndex, + + ItemsPerPage: u.ItemsPerPage, + + Resources: u.Resources, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimconfigresourcetypeslistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimemail.go b/platformclientv2/scimemail.go index 253479f46..f96c36bd7 100644 --- a/platformclientv2/scimemail.go +++ b/platformclientv2/scimemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Scimemail struct { } +func (u *Scimemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimemail + + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + + VarType *string `json:"type,omitempty"` + + Primary *bool `json:"primary,omitempty"` + *Alias + }{ + Value: u.Value, + + VarType: u.VarType, + + Primary: u.Primary, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimerror.go b/platformclientv2/scimerror.go index 312b4d74c..bf0e0b177 100644 --- a/platformclientv2/scimerror.go +++ b/platformclientv2/scimerror.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Scimerror struct { } +func (u *Scimerror) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimerror + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + Status *string `json:"status,omitempty"` + + ScimType *string `json:"scimType,omitempty"` + + Detail *string `json:"detail,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + Status: u.Status, + + ScimType: u.ScimType, + + Detail: u.Detail, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimerror) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimgenesysuserexternalid.go b/platformclientv2/scimgenesysuserexternalid.go index c5e631b12..2b8d9efd9 100644 --- a/platformclientv2/scimgenesysuserexternalid.go +++ b/platformclientv2/scimgenesysuserexternalid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scimgenesysuserexternalid struct { } +func (u *Scimgenesysuserexternalid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimgenesysuserexternalid + + + + return json.Marshal(&struct { + Authority *string `json:"authority,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Authority: u.Authority, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimgenesysuserexternalid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimgrouplistresponse.go b/platformclientv2/scimgrouplistresponse.go index 600ddc105..85aec239d 100644 --- a/platformclientv2/scimgrouplistresponse.go +++ b/platformclientv2/scimgrouplistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Scimgrouplistresponse struct { } +func (u *Scimgrouplistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimgrouplistresponse + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + TotalResults *int `json:"totalResults,omitempty"` + + StartIndex *int `json:"startIndex,omitempty"` + + ItemsPerPage *int `json:"itemsPerPage,omitempty"` + + Resources *[]Scimv2group `json:"Resources,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + TotalResults: u.TotalResults, + + StartIndex: u.StartIndex, + + ItemsPerPage: u.ItemsPerPage, + + Resources: u.Resources, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimgrouplistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimmetadata.go b/platformclientv2/scimmetadata.go index 98b63ab11..7100321ec 100644 --- a/platformclientv2/scimmetadata.go +++ b/platformclientv2/scimmetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Scimmetadata struct { } +func (u *Scimmetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimmetadata + + + LastModified := new(string) + if u.LastModified != nil { + + *LastModified = timeutil.Strftime(u.LastModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + LastModified = nil + } + + + return json.Marshal(&struct { + ResourceType *string `json:"resourceType,omitempty"` + + LastModified *string `json:"lastModified,omitempty"` + + Location *string `json:"location,omitempty"` + + Version *string `json:"version,omitempty"` + *Alias + }{ + ResourceType: u.ResourceType, + + LastModified: LastModified, + + Location: u.Location, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimmetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimphonenumber.go b/platformclientv2/scimphonenumber.go index c1d4821b6..fbd281abf 100644 --- a/platformclientv2/scimphonenumber.go +++ b/platformclientv2/scimphonenumber.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Scimphonenumber struct { } +func (u *Scimphonenumber) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimphonenumber + + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + + VarType *string `json:"type,omitempty"` + + Primary *bool `json:"primary,omitempty"` + *Alias + }{ + Value: u.Value, + + VarType: u.VarType, + + Primary: u.Primary, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimphonenumber) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimserviceproviderconfig.go b/platformclientv2/scimserviceproviderconfig.go index 91b63754f..dff3835f2 100644 --- a/platformclientv2/scimserviceproviderconfig.go +++ b/platformclientv2/scimserviceproviderconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Scimserviceproviderconfig struct { } +func (u *Scimserviceproviderconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimserviceproviderconfig + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + DocumentationUri *string `json:"documentationUri,omitempty"` + + Patch *Scimserviceproviderconfigsimplefeature `json:"patch,omitempty"` + + Filter *Scimserviceproviderconfigfilterfeature `json:"filter,omitempty"` + + Etag *Scimserviceproviderconfigsimplefeature `json:"etag,omitempty"` + + Sort *Scimserviceproviderconfigsimplefeature `json:"sort,omitempty"` + + Bulk *Scimserviceproviderconfigbulkfeature `json:"bulk,omitempty"` + + ChangePassword *Scimserviceproviderconfigsimplefeature `json:"changePassword,omitempty"` + + AuthenticationSchemes *[]Scimserviceproviderconfigauthenticationscheme `json:"authenticationSchemes,omitempty"` + + Meta *Scimmetadata `json:"meta,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + DocumentationUri: u.DocumentationUri, + + Patch: u.Patch, + + Filter: u.Filter, + + Etag: u.Etag, + + Sort: u.Sort, + + Bulk: u.Bulk, + + ChangePassword: u.ChangePassword, + + AuthenticationSchemes: u.AuthenticationSchemes, + + Meta: u.Meta, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimserviceproviderconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimserviceproviderconfigauthenticationscheme.go b/platformclientv2/scimserviceproviderconfigauthenticationscheme.go index 96bf10995..339d2ee33 100644 --- a/platformclientv2/scimserviceproviderconfigauthenticationscheme.go +++ b/platformclientv2/scimserviceproviderconfigauthenticationscheme.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Scimserviceproviderconfigauthenticationscheme struct { } +func (u *Scimserviceproviderconfigauthenticationscheme) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimserviceproviderconfigauthenticationscheme + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + SpecUri *string `json:"specUri,omitempty"` + + DocumentationUri *string `json:"documentationUri,omitempty"` + + VarType *string `json:"type,omitempty"` + + Primary *bool `json:"primary,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + SpecUri: u.SpecUri, + + DocumentationUri: u.DocumentationUri, + + VarType: u.VarType, + + Primary: u.Primary, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimserviceproviderconfigauthenticationscheme) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimserviceproviderconfigbulkfeature.go b/platformclientv2/scimserviceproviderconfigbulkfeature.go index c9bfa2932..7e9251142 100644 --- a/platformclientv2/scimserviceproviderconfigbulkfeature.go +++ b/platformclientv2/scimserviceproviderconfigbulkfeature.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Scimserviceproviderconfigbulkfeature struct { } +func (u *Scimserviceproviderconfigbulkfeature) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimserviceproviderconfigbulkfeature + + + + return json.Marshal(&struct { + Supported *bool `json:"supported,omitempty"` + + MaxOperations *int `json:"maxOperations,omitempty"` + + MaxPayloadSize *int `json:"maxPayloadSize,omitempty"` + *Alias + }{ + Supported: u.Supported, + + MaxOperations: u.MaxOperations, + + MaxPayloadSize: u.MaxPayloadSize, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimserviceproviderconfigbulkfeature) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimserviceproviderconfigfilterfeature.go b/platformclientv2/scimserviceproviderconfigfilterfeature.go index 9e6c119b1..1aeac3009 100644 --- a/platformclientv2/scimserviceproviderconfigfilterfeature.go +++ b/platformclientv2/scimserviceproviderconfigfilterfeature.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scimserviceproviderconfigfilterfeature struct { } +func (u *Scimserviceproviderconfigfilterfeature) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimserviceproviderconfigfilterfeature + + + + return json.Marshal(&struct { + Supported *bool `json:"supported,omitempty"` + + MaxResults *int `json:"maxResults,omitempty"` + *Alias + }{ + Supported: u.Supported, + + MaxResults: u.MaxResults, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimserviceproviderconfigfilterfeature) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimserviceproviderconfigsimplefeature.go b/platformclientv2/scimserviceproviderconfigsimplefeature.go index 53ae21563..5636ef415 100644 --- a/platformclientv2/scimserviceproviderconfigsimplefeature.go +++ b/platformclientv2/scimserviceproviderconfigsimplefeature.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Scimserviceproviderconfigsimplefeature struct { } +func (u *Scimserviceproviderconfigsimplefeature) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimserviceproviderconfigsimplefeature + + + + return json.Marshal(&struct { + Supported *bool `json:"supported,omitempty"` + *Alias + }{ + Supported: u.Supported, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimserviceproviderconfigsimplefeature) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimuserextensions.go b/platformclientv2/scimuserextensions.go index 685d79a53..ddc3ea505 100644 --- a/platformclientv2/scimuserextensions.go +++ b/platformclientv2/scimuserextensions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Scimuserextensions struct { } +func (u *Scimuserextensions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimuserextensions + + + + return json.Marshal(&struct { + RoutingSkills *[]Scimuserroutingskill `json:"routingSkills,omitempty"` + + RoutingLanguages *[]Scimuserroutinglanguage `json:"routingLanguages,omitempty"` + + ExternalIds *[]Scimgenesysuserexternalid `json:"externalIds,omitempty"` + *Alias + }{ + RoutingSkills: u.RoutingSkills, + + RoutingLanguages: u.RoutingLanguages, + + ExternalIds: u.ExternalIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimuserextensions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimuserlistresponse.go b/platformclientv2/scimuserlistresponse.go index 85813eafe..c0aea18b1 100644 --- a/platformclientv2/scimuserlistresponse.go +++ b/platformclientv2/scimuserlistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Scimuserlistresponse struct { } +func (u *Scimuserlistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimuserlistresponse + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + TotalResults *int `json:"totalResults,omitempty"` + + StartIndex *int `json:"startIndex,omitempty"` + + ItemsPerPage *int `json:"itemsPerPage,omitempty"` + + Resources *[]Scimv2user `json:"Resources,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + TotalResults: u.TotalResults, + + StartIndex: u.StartIndex, + + ItemsPerPage: u.ItemsPerPage, + + Resources: u.Resources, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimuserlistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimuserrole.go b/platformclientv2/scimuserrole.go index 230c05e2f..b3a370965 100644 --- a/platformclientv2/scimuserrole.go +++ b/platformclientv2/scimuserrole.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Scimuserrole struct { } +func (u *Scimuserrole) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimuserrole + + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + *Alias + }{ + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimuserrole) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimuserroutinglanguage.go b/platformclientv2/scimuserroutinglanguage.go index 3f14fc53d..452ea7fd9 100644 --- a/platformclientv2/scimuserroutinglanguage.go +++ b/platformclientv2/scimuserroutinglanguage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scimuserroutinglanguage struct { } +func (u *Scimuserroutinglanguage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimuserroutinglanguage + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Proficiency *float64 `json:"proficiency,omitempty"` + *Alias + }{ + Name: u.Name, + + Proficiency: u.Proficiency, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimuserroutinglanguage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimuserroutingskill.go b/platformclientv2/scimuserroutingskill.go index 9d79b9018..fb295da91 100644 --- a/platformclientv2/scimuserroutingskill.go +++ b/platformclientv2/scimuserroutingskill.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scimuserroutingskill struct { } +func (u *Scimuserroutingskill) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimuserroutingskill + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Proficiency *float64 `json:"proficiency,omitempty"` + *Alias + }{ + Name: u.Name, + + Proficiency: u.Proficiency, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimuserroutingskill) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2createuser.go b/platformclientv2/scimv2createuser.go index 02f499cf5..0d196e504 100644 --- a/platformclientv2/scimv2createuser.go +++ b/platformclientv2/scimv2createuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -60,6 +61,70 @@ type Scimv2createuser struct { } +func (u *Scimv2createuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2createuser + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + Active *bool `json:"active,omitempty"` + + UserName *string `json:"userName,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + Password *string `json:"password,omitempty"` + + Title *string `json:"title,omitempty"` + + PhoneNumbers *[]Scimphonenumber `json:"phoneNumbers,omitempty"` + + Emails *[]Scimemail `json:"emails,omitempty"` + + ExternalId *string `json:"externalId,omitempty"` + + Groups *[]Scimv2groupreference `json:"groups,omitempty"` + + Roles *[]Scimuserrole `json:"roles,omitempty"` + + UrnIetfParamsScimSchemasExtensionEnterprise20User *Scimv2enterpriseuser `json:"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User,omitempty"` + + UrnIetfParamsScimSchemasExtensionGenesysPurecloud20User *Scimuserextensions `json:"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + Active: u.Active, + + UserName: u.UserName, + + DisplayName: u.DisplayName, + + Password: u.Password, + + Title: u.Title, + + PhoneNumbers: u.PhoneNumbers, + + Emails: u.Emails, + + ExternalId: u.ExternalId, + + Groups: u.Groups, + + Roles: u.Roles, + + UrnIetfParamsScimSchemasExtensionEnterprise20User: u.UrnIetfParamsScimSchemasExtensionEnterprise20User, + + UrnIetfParamsScimSchemasExtensionGenesysPurecloud20User: u.UrnIetfParamsScimSchemasExtensionGenesysPurecloud20User, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2createuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2enterpriseuser.go b/platformclientv2/scimv2enterpriseuser.go index a008807d4..0ec0c8ce2 100644 --- a/platformclientv2/scimv2enterpriseuser.go +++ b/platformclientv2/scimv2enterpriseuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Scimv2enterpriseuser struct { } +func (u *Scimv2enterpriseuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2enterpriseuser + + + + return json.Marshal(&struct { + Division *string `json:"division,omitempty"` + + Department *string `json:"department,omitempty"` + + Manager *Manager `json:"manager,omitempty"` + + EmployeeNumber *string `json:"employeeNumber,omitempty"` + *Alias + }{ + Division: u.Division, + + Department: u.Department, + + Manager: u.Manager, + + EmployeeNumber: u.EmployeeNumber, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2enterpriseuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2group.go b/platformclientv2/scimv2group.go index faf12f7ae..4d4d4666a 100644 --- a/platformclientv2/scimv2group.go +++ b/platformclientv2/scimv2group.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Scimv2group struct { } +func (u *Scimv2group) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2group + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Schemas *[]string `json:"schemas,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + ExternalId *string `json:"externalId,omitempty"` + + Members *[]Scimv2memberreference `json:"members,omitempty"` + + Meta *Scimmetadata `json:"meta,omitempty"` + *Alias + }{ + Id: u.Id, + + Schemas: u.Schemas, + + DisplayName: u.DisplayName, + + ExternalId: u.ExternalId, + + Members: u.Members, + + Meta: u.Meta, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2group) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2groupreference.go b/platformclientv2/scimv2groupreference.go index b7d137edf..010ed5d22 100644 --- a/platformclientv2/scimv2groupreference.go +++ b/platformclientv2/scimv2groupreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Scimv2groupreference struct { } +func (u *Scimv2groupreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2groupreference + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + + Ref *string `json:"$ref,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + + Ref: u.Ref, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2groupreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2memberreference.go b/platformclientv2/scimv2memberreference.go index a32039394..d40f422f0 100644 --- a/platformclientv2/scimv2memberreference.go +++ b/platformclientv2/scimv2memberreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Scimv2memberreference struct { } +func (u *Scimv2memberreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2memberreference + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + + Ref *string `json:"$ref,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + + Ref: u.Ref, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2memberreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2patchoperation.go b/platformclientv2/scimv2patchoperation.go index c1e41ae91..95686ec5a 100644 --- a/platformclientv2/scimv2patchoperation.go +++ b/platformclientv2/scimv2patchoperation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Scimv2patchoperation struct { } +func (u *Scimv2patchoperation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2patchoperation + + + + return json.Marshal(&struct { + Op *string `json:"op,omitempty"` + + Path *string `json:"path,omitempty"` + + Value *Jsonnode `json:"value,omitempty"` + *Alias + }{ + Op: u.Op, + + Path: u.Path, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2patchoperation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2patchrequest.go b/platformclientv2/scimv2patchrequest.go index a04fdd5d2..df9a01ce3 100644 --- a/platformclientv2/scimv2patchrequest.go +++ b/platformclientv2/scimv2patchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scimv2patchrequest struct { } +func (u *Scimv2patchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2patchrequest + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + Operations *[]Scimv2patchoperation `json:"Operations,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + Operations: u.Operations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2patchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2schemaattribute.go b/platformclientv2/scimv2schemaattribute.go index 23e59f07e..57c9d2a80 100644 --- a/platformclientv2/scimv2schemaattribute.go +++ b/platformclientv2/scimv2schemaattribute.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Scimv2schemaattribute struct { } +func (u *Scimv2schemaattribute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2schemaattribute + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + SubAttributes *[]Scimv2schemaattribute `json:"subAttributes,omitempty"` + + MultiValued *bool `json:"multiValued,omitempty"` + + Description *string `json:"description,omitempty"` + + Required *bool `json:"required,omitempty"` + + CanonicalValues *[]string `json:"canonicalValues,omitempty"` + + CaseExact *bool `json:"caseExact,omitempty"` + + Mutability *string `json:"mutability,omitempty"` + + Returned *string `json:"returned,omitempty"` + + Uniqueness *string `json:"uniqueness,omitempty"` + + ReferenceTypes *[]string `json:"referenceTypes,omitempty"` + *Alias + }{ + Name: u.Name, + + VarType: u.VarType, + + SubAttributes: u.SubAttributes, + + MultiValued: u.MultiValued, + + Description: u.Description, + + Required: u.Required, + + CanonicalValues: u.CanonicalValues, + + CaseExact: u.CaseExact, + + Mutability: u.Mutability, + + Returned: u.Returned, + + Uniqueness: u.Uniqueness, + + ReferenceTypes: u.ReferenceTypes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2schemaattribute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2schemadefinition.go b/platformclientv2/scimv2schemadefinition.go index d998fbbe2..c12618617 100644 --- a/platformclientv2/scimv2schemadefinition.go +++ b/platformclientv2/scimv2schemadefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Scimv2schemadefinition struct { } +func (u *Scimv2schemadefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2schemadefinition + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Attributes *[]Scimv2schemaattribute `json:"attributes,omitempty"` + + Meta *Scimmetadata `json:"meta,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Attributes: u.Attributes, + + Meta: u.Meta, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2schemadefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2schemalistresponse.go b/platformclientv2/scimv2schemalistresponse.go index e979a1ed1..165857e61 100644 --- a/platformclientv2/scimv2schemalistresponse.go +++ b/platformclientv2/scimv2schemalistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Scimv2schemalistresponse struct { } +func (u *Scimv2schemalistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2schemalistresponse + + + + return json.Marshal(&struct { + Schemas *[]string `json:"schemas,omitempty"` + + TotalResults *int `json:"totalResults,omitempty"` + + StartIndex *int `json:"startIndex,omitempty"` + + ItemsPerPage *int `json:"itemsPerPage,omitempty"` + + Resources *[]Scimv2schemadefinition `json:"Resources,omitempty"` + *Alias + }{ + Schemas: u.Schemas, + + TotalResults: u.TotalResults, + + StartIndex: u.StartIndex, + + ItemsPerPage: u.ItemsPerPage, + + Resources: u.Resources, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2schemalistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scimv2user.go b/platformclientv2/scimv2user.go index 6bdbf74c4..28e9d011c 100644 --- a/platformclientv2/scimv2user.go +++ b/platformclientv2/scimv2user.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -68,6 +69,78 @@ type Scimv2user struct { } +func (u *Scimv2user) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scimv2user + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Schemas *[]string `json:"schemas,omitempty"` + + Active *bool `json:"active,omitempty"` + + UserName *string `json:"userName,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + Password *string `json:"password,omitempty"` + + Title *string `json:"title,omitempty"` + + PhoneNumbers *[]Scimphonenumber `json:"phoneNumbers,omitempty"` + + Emails *[]Scimemail `json:"emails,omitempty"` + + ExternalId *string `json:"externalId,omitempty"` + + Groups *[]Scimv2groupreference `json:"groups,omitempty"` + + Roles *[]Scimuserrole `json:"roles,omitempty"` + + UrnIetfParamsScimSchemasExtensionEnterprise20User *Scimv2enterpriseuser `json:"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User,omitempty"` + + UrnIetfParamsScimSchemasExtensionGenesysPurecloud20User *Scimuserextensions `json:"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User,omitempty"` + + Meta *Scimmetadata `json:"meta,omitempty"` + *Alias + }{ + Id: u.Id, + + Schemas: u.Schemas, + + Active: u.Active, + + UserName: u.UserName, + + DisplayName: u.DisplayName, + + Password: u.Password, + + Title: u.Title, + + PhoneNumbers: u.PhoneNumbers, + + Emails: u.Emails, + + ExternalId: u.ExternalId, + + Groups: u.Groups, + + Roles: u.Roles, + + UrnIetfParamsScimSchemasExtensionEnterprise20User: u.UrnIetfParamsScimSchemasExtensionEnterprise20User, + + UrnIetfParamsScimSchemasExtensionGenesysPurecloud20User: u.UrnIetfParamsScimSchemasExtensionGenesysPurecloud20User, + + Meta: u.Meta, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scimv2user) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scorablesurvey.go b/platformclientv2/scorablesurvey.go index 30a10431f..d71d9385b 100644 --- a/platformclientv2/scorablesurvey.go +++ b/platformclientv2/scorablesurvey.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Scorablesurvey struct { } +func (u *Scorablesurvey) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scorablesurvey + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SurveyForm *Surveyform `json:"surveyForm,omitempty"` + + Status *string `json:"status,omitempty"` + + Answers *Surveyscoringset `json:"answers,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SurveyForm: u.SurveyForm, + + Status: u.Status, + + Answers: u.Answers, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scorablesurvey) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scoredagent.go b/platformclientv2/scoredagent.go index ba9d77b5e..f94242a17 100644 --- a/platformclientv2/scoredagent.go +++ b/platformclientv2/scoredagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scoredagent struct { } +func (u *Scoredagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scoredagent + + + + return json.Marshal(&struct { + Agent *Addressableentityref `json:"agent,omitempty"` + + Score *int `json:"score,omitempty"` + *Alias + }{ + Agent: u.Agent, + + Score: u.Score, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scoredagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/screenrecordingmetadata.go b/platformclientv2/screenrecordingmetadata.go index 279e8cbfd..dae0cf608 100644 --- a/platformclientv2/screenrecordingmetadata.go +++ b/platformclientv2/screenrecordingmetadata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Screenrecordingmetadata struct { } +func (u *Screenrecordingmetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Screenrecordingmetadata + + + + return json.Marshal(&struct { + TrackId *string `json:"trackId,omitempty"` + + MediaId *string `json:"mediaId,omitempty"` + + ScreenId *string `json:"screenId,omitempty"` + + OriginX *int `json:"originX,omitempty"` + + OriginY *int `json:"originY,omitempty"` + + Primary *bool `json:"primary,omitempty"` + + Main *bool `json:"main,omitempty"` + *Alias + }{ + TrackId: u.TrackId, + + MediaId: u.MediaId, + + ScreenId: u.ScreenId, + + OriginX: u.OriginX, + + OriginY: u.OriginY, + + Primary: u.Primary, + + Main: u.Main, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Screenrecordingmetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/screenrecordingmetadatarequest.go b/platformclientv2/screenrecordingmetadatarequest.go index 8b3a95890..a197aad30 100644 --- a/platformclientv2/screenrecordingmetadatarequest.go +++ b/platformclientv2/screenrecordingmetadatarequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Screenrecordingmetadatarequest struct { } +func (u *Screenrecordingmetadatarequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Screenrecordingmetadatarequest + + + + return json.Marshal(&struct { + ParticipantJid *string `json:"participantJid,omitempty"` + + RoomId *string `json:"roomId,omitempty"` + + MetaData *[]Screenrecordingmetadata `json:"metaData,omitempty"` + *Alias + }{ + ParticipantJid: u.ParticipantJid, + + RoomId: u.RoomId, + + MetaData: u.MetaData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Screenrecordingmetadatarequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/screenrecordingsession.go b/platformclientv2/screenrecordingsession.go index 07d67d90e..f41b0add0 100644 --- a/platformclientv2/screenrecordingsession.go +++ b/platformclientv2/screenrecordingsession.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Screenrecordingsession struct { } +func (u *Screenrecordingsession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Screenrecordingsession + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + User *User `json:"user,omitempty"` + + CommunicationId *string `json:"communicationId,omitempty"` + + Conversation *Conversation `json:"conversation,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + User: u.User, + + CommunicationId: u.CommunicationId, + + Conversation: u.Conversation, + + StartTime: StartTime, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Screenrecordingsession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/screenrecordingsessionlisting.go b/platformclientv2/screenrecordingsessionlisting.go index c6e7243b7..3e1727140 100644 --- a/platformclientv2/screenrecordingsessionlisting.go +++ b/platformclientv2/screenrecordingsessionlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Screenrecordingsessionlisting struct { } +func (u *Screenrecordingsessionlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Screenrecordingsessionlisting + + + + return json.Marshal(&struct { + Entities *[]Screenrecordingsession `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Screenrecordingsessionlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/screenrecordingsessionrequest.go b/platformclientv2/screenrecordingsessionrequest.go index c662024b2..5c739482c 100644 --- a/platformclientv2/screenrecordingsessionrequest.go +++ b/platformclientv2/screenrecordingsessionrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,46 @@ type Screenrecordingsessionrequest struct { } +func (u *Screenrecordingsessionrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Screenrecordingsessionrequest + + + ArchiveDate := new(string) + if u.ArchiveDate != nil { + + *ArchiveDate = timeutil.Strftime(u.ArchiveDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ArchiveDate = nil + } + + DeleteDate := new(string) + if u.DeleteDate != nil { + + *DeleteDate = timeutil.Strftime(u.DeleteDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DeleteDate = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + ArchiveDate *string `json:"archiveDate,omitempty"` + + DeleteDate *string `json:"deleteDate,omitempty"` + *Alias + }{ + State: u.State, + + ArchiveDate: ArchiveDate, + + DeleteDate: DeleteDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Screenrecordingsessionrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/screenshare.go b/platformclientv2/screenshare.go index f2db0689f..3da6052b3 100644 --- a/platformclientv2/screenshare.go +++ b/platformclientv2/screenshare.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,102 @@ type Screenshare struct { } +func (u *Screenshare) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Screenshare + + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + Sharing *bool `json:"sharing,omitempty"` + + PeerCount *int `json:"peerCount,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Provider *string `json:"provider,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Context: u.Context, + + Sharing: u.Sharing, + + PeerCount: u.PeerCount, + + DisconnectType: u.DisconnectType, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Provider: u.Provider, + + PeerId: u.PeerId, + + Segments: u.Segments, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Screenshare) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/script.go b/platformclientv2/script.go index 653b8881e..7a7e3a67d 100644 --- a/platformclientv2/script.go +++ b/platformclientv2/script.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,106 @@ type Script struct { } +func (u *Script) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Script + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + PublishedDate := new(string) + if u.PublishedDate != nil { + + *PublishedDate = timeutil.Strftime(u.PublishedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PublishedDate = nil + } + + VersionDate := new(string) + if u.VersionDate != nil { + + *VersionDate = timeutil.Strftime(u.VersionDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + VersionDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VersionId *string `json:"versionId,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + PublishedDate *string `json:"publishedDate,omitempty"` + + VersionDate *string `json:"versionDate,omitempty"` + + StartPageId *string `json:"startPageId,omitempty"` + + StartPageName *string `json:"startPageName,omitempty"` + + Features *interface{} `json:"features,omitempty"` + + Variables *interface{} `json:"variables,omitempty"` + + CustomActions *interface{} `json:"customActions,omitempty"` + + Pages *[]Page `json:"pages,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VersionId: u.VersionId, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + + PublishedDate: PublishedDate, + + VersionDate: VersionDate, + + StartPageId: u.StartPageId, + + StartPageName: u.StartPageName, + + Features: u.Features, + + Variables: u.Variables, + + CustomActions: u.CustomActions, + + Pages: u.Pages, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Script) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scriptentitylisting.go b/platformclientv2/scriptentitylisting.go index a7a558c11..b9b2a5ea0 100644 --- a/platformclientv2/scriptentitylisting.go +++ b/platformclientv2/scriptentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Scriptentitylisting struct { } +func (u *Scriptentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scriptentitylisting + + + + return json.Marshal(&struct { + Entities *[]Script `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scriptentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/scrollpercentageeventtrigger.go b/platformclientv2/scrollpercentageeventtrigger.go index c2af1a5fb..c453e9ca2 100644 --- a/platformclientv2/scrollpercentageeventtrigger.go +++ b/platformclientv2/scrollpercentageeventtrigger.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Scrollpercentageeventtrigger struct { } +func (u *Scrollpercentageeventtrigger) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Scrollpercentageeventtrigger + + + + return json.Marshal(&struct { + Percentage *int `json:"percentage,omitempty"` + + EventName *string `json:"eventName,omitempty"` + *Alias + }{ + Percentage: u.Percentage, + + EventName: u.EventName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Scrollpercentageeventtrigger) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/searchaggregation.go b/platformclientv2/searchaggregation.go index 6f96973dd..86808cf80 100644 --- a/platformclientv2/searchaggregation.go +++ b/platformclientv2/searchaggregation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Searchaggregation struct { } +func (u *Searchaggregation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Searchaggregation + + + + return json.Marshal(&struct { + Field *string `json:"field,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + + Size *int `json:"size,omitempty"` + + Order *[]string `json:"order,omitempty"` + *Alias + }{ + Field: u.Field, + + Name: u.Name, + + VarType: u.VarType, + + Value: u.Value, + + Size: u.Size, + + Order: u.Order, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Searchaggregation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/searchcriteria.go b/platformclientv2/searchcriteria.go index 5b883272a..ab1524014 100644 --- a/platformclientv2/searchcriteria.go +++ b/platformclientv2/searchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Searchcriteria struct { } +func (u *Searchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Searchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Searchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Searchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/searchrequest.go b/platformclientv2/searchrequest.go index d369a776b..04acb2952 100644 --- a/platformclientv2/searchrequest.go +++ b/platformclientv2/searchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Searchrequest struct { } +func (u *Searchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Searchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + ReturnFields *[]string `json:"returnFields,omitempty"` + + Expand *[]string `json:"expand,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Query *[]Searchcriteria `json:"query,omitempty"` + + Aggregations *[]Searchaggregation `json:"aggregations,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + ReturnFields: u.ReturnFields, + + Expand: u.Expand, + + Types: u.Types, + + Query: u.Query, + + Aggregations: u.Aggregations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Searchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/searchshifttraderesponse.go b/platformclientv2/searchshifttraderesponse.go index b67817bcb..525202110 100644 --- a/platformclientv2/searchshifttraderesponse.go +++ b/platformclientv2/searchshifttraderesponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Searchshifttraderesponse struct { } +func (u *Searchshifttraderesponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Searchshifttraderesponse + + + + return json.Marshal(&struct { + Trade *Shifttraderesponse `json:"trade,omitempty"` + + MatchingReceivingShiftIds *[]string `json:"matchingReceivingShiftIds,omitempty"` + + Preview *Shifttradepreviewresponse `json:"preview,omitempty"` + *Alias + }{ + Trade: u.Trade, + + MatchingReceivingShiftIds: u.MatchingReceivingShiftIds, + + Preview: u.Preview, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Searchshifttraderesponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/searchshifttradesrequest.go b/platformclientv2/searchshifttradesrequest.go index 3b7566abd..bb9e36ecf 100644 --- a/platformclientv2/searchshifttradesrequest.go +++ b/platformclientv2/searchshifttradesrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Searchshifttradesrequest struct { } +func (u *Searchshifttradesrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Searchshifttradesrequest + + + + return json.Marshal(&struct { + ReceivingScheduleId *string `json:"receivingScheduleId,omitempty"` + + ReceivingShiftIds *[]string `json:"receivingShiftIds,omitempty"` + *Alias + }{ + ReceivingScheduleId: u.ReceivingScheduleId, + + ReceivingShiftIds: u.ReceivingShiftIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Searchshifttradesrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/searchshifttradesresponse.go b/platformclientv2/searchshifttradesresponse.go index 2c945d3e7..493077d68 100644 --- a/platformclientv2/searchshifttradesresponse.go +++ b/platformclientv2/searchshifttradesresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Searchshifttradesresponse struct { } +func (u *Searchshifttradesresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Searchshifttradesresponse + + + + return json.Marshal(&struct { + Trades *[]Searchshifttraderesponse `json:"trades,omitempty"` + *Alias + }{ + Trades: u.Trades, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Searchshifttradesresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/searchsort.go b/platformclientv2/searchsort.go index 2f56e028b..436a2149e 100644 --- a/platformclientv2/searchsort.go +++ b/platformclientv2/searchsort.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Searchsort struct { } +func (u *Searchsort) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Searchsort + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Searchsort) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/section.go b/platformclientv2/section.go index 0eadb6824..a406a7195 100644 --- a/platformclientv2/section.go +++ b/platformclientv2/section.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Section struct { } +func (u *Section) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Section + + + + return json.Marshal(&struct { + FieldList *[]Fieldlist `json:"fieldList,omitempty"` + + InstructionText *string `json:"instructionText,omitempty"` + + Key *string `json:"key,omitempty"` + + State *string `json:"state,omitempty"` + *Alias + }{ + FieldList: u.FieldList, + + InstructionText: u.InstructionText, + + Key: u.Key, + + State: u.State, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Section) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/securesession.go b/platformclientv2/securesession.go index c1d7a95aa..d25dc4587 100644 --- a/platformclientv2/securesession.go +++ b/platformclientv2/securesession.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Securesession struct { } +func (u *Securesession) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Securesession + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Flow *Domainentityref `json:"flow,omitempty"` + + UserData *string `json:"userData,omitempty"` + + State *string `json:"state,omitempty"` + + SourceParticipantId *string `json:"sourceParticipantId,omitempty"` + + Disconnect *bool `json:"disconnect,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Flow: u.Flow, + + UserData: u.UserData, + + State: u.State, + + SourceParticipantId: u.SourceParticipantId, + + Disconnect: u.Disconnect, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Securesession) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/securesessionentitylisting.go b/platformclientv2/securesessionentitylisting.go index ac1a2bd05..e7197a162 100644 --- a/platformclientv2/securesessionentitylisting.go +++ b/platformclientv2/securesessionentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Securesessionentitylisting struct { } +func (u *Securesessionentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Securesessionentitylisting + + + + return json.Marshal(&struct { + Entities *[]Securesession `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Securesessionentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/securityprofile.go b/platformclientv2/securityprofile.go index ce4f7dd8d..e9c45925d 100644 --- a/platformclientv2/securityprofile.go +++ b/platformclientv2/securityprofile.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Securityprofile struct { } +func (u *Securityprofile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Securityprofile + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Permissions *[]string `json:"permissions,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Permissions: u.Permissions, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Securityprofile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/securityprofileentitylisting.go b/platformclientv2/securityprofileentitylisting.go index ea975dfcb..50858446a 100644 --- a/platformclientv2/securityprofileentitylisting.go +++ b/platformclientv2/securityprofileentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Securityprofileentitylisting struct { } +func (u *Securityprofileentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Securityprofileentitylisting + + + + return json.Marshal(&struct { + Entities *[]Securityprofile `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Securityprofileentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/segment.go b/platformclientv2/segment.go index ec5b9c16a..9a5413229 100644 --- a/platformclientv2/segment.go +++ b/platformclientv2/segment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Segment struct { } +func (u *Segment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Segment + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + VarType *string `json:"type,omitempty"` + + HowEnded *string `json:"howEnded,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + *Alias + }{ + StartTime: StartTime, + + EndTime: EndTime, + + VarType: u.VarType, + + HowEnded: u.HowEnded, + + DisconnectType: u.DisconnectType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Segment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/segmentdetailqueryclause.go b/platformclientv2/segmentdetailqueryclause.go index ab151c1d7..55e26a139 100644 --- a/platformclientv2/segmentdetailqueryclause.go +++ b/platformclientv2/segmentdetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Segmentdetailqueryclause struct { } +func (u *Segmentdetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Segmentdetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Segmentdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Segmentdetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/segmentdetailqueryfilter.go b/platformclientv2/segmentdetailqueryfilter.go index a003acb76..4a1c5c7e5 100644 --- a/platformclientv2/segmentdetailqueryfilter.go +++ b/platformclientv2/segmentdetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Segmentdetailqueryfilter struct { } +func (u *Segmentdetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Segmentdetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Segmentdetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Segmentdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Segmentdetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/segmentdetailquerypredicate.go b/platformclientv2/segmentdetailquerypredicate.go index 1fa4dabc2..46bd1b7ac 100644 --- a/platformclientv2/segmentdetailquerypredicate.go +++ b/platformclientv2/segmentdetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Segmentdetailquerypredicate struct { } +func (u *Segmentdetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Segmentdetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + PropertyType *string `json:"propertyType,omitempty"` + + Property *string `json:"property,omitempty"` + + Metric *string `json:"metric,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + PropertyType: u.PropertyType, + + Property: u.Property, + + Metric: u.Metric, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Segmentdetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/segmentlisting.go b/platformclientv2/segmentlisting.go index 6d70d4240..9abadad07 100644 --- a/platformclientv2/segmentlisting.go +++ b/platformclientv2/segmentlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Segmentlisting struct { } +func (u *Segmentlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Segmentlisting + + + + return json.Marshal(&struct { + Entities *[]Journeysegment `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Segmentlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/selectedcolumns.go b/platformclientv2/selectedcolumns.go index 6a426435f..6b12ad966 100644 --- a/platformclientv2/selectedcolumns.go +++ b/platformclientv2/selectedcolumns.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Selectedcolumns struct { } +func (u *Selectedcolumns) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Selectedcolumns + + + + return json.Marshal(&struct { + ColumnOrder *int `json:"columnOrder,omitempty"` + + ColumnName *string `json:"columnName,omitempty"` + *Alias + }{ + ColumnOrder: u.ColumnOrder, + + ColumnName: u.ColumnName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Selectedcolumns) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/selectoreventtrigger.go b/platformclientv2/selectoreventtrigger.go index f27cf3dc8..3744c5c4c 100644 --- a/platformclientv2/selectoreventtrigger.go +++ b/platformclientv2/selectoreventtrigger.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Selectoreventtrigger struct { } +func (u *Selectoreventtrigger) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Selectoreventtrigger + + + + return json.Marshal(&struct { + Selector *string `json:"selector,omitempty"` + + EventName *string `json:"eventName,omitempty"` + *Alias + }{ + Selector: u.Selector, + + EventName: u.EventName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Selectoreventtrigger) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sendagentlessoutboundmessagerequest.go b/platformclientv2/sendagentlessoutboundmessagerequest.go index 844301b5a..2cbbb87ea 100644 --- a/platformclientv2/sendagentlessoutboundmessagerequest.go +++ b/platformclientv2/sendagentlessoutboundmessagerequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Sendagentlessoutboundmessagerequest struct { } +func (u *Sendagentlessoutboundmessagerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sendagentlessoutboundmessagerequest + + + + return json.Marshal(&struct { + FromAddress *string `json:"fromAddress,omitempty"` + + ToAddress *string `json:"toAddress,omitempty"` + + ToAddressMessengerType *string `json:"toAddressMessengerType,omitempty"` + + TextBody *string `json:"textBody,omitempty"` + + MessagingTemplate *Messagingtemplaterequest `json:"messagingTemplate,omitempty"` + *Alias + }{ + FromAddress: u.FromAddress, + + ToAddress: u.ToAddress, + + ToAddressMessengerType: u.ToAddressMessengerType, + + TextBody: u.TextBody, + + MessagingTemplate: u.MessagingTemplate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sendagentlessoutboundmessagerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sendagentlessoutboundmessageresponse.go b/platformclientv2/sendagentlessoutboundmessageresponse.go index a8bfade0a..9575822f4 100644 --- a/platformclientv2/sendagentlessoutboundmessageresponse.go +++ b/platformclientv2/sendagentlessoutboundmessageresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,66 @@ type Sendagentlessoutboundmessageresponse struct { } +func (u *Sendagentlessoutboundmessageresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sendagentlessoutboundmessageresponse + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + FromAddress *string `json:"fromAddress,omitempty"` + + ToAddress *string `json:"toAddress,omitempty"` + + MessengerType *string `json:"messengerType,omitempty"` + + TextBody *string `json:"textBody,omitempty"` + + MessagingTemplate *Messagingtemplaterequest `json:"messagingTemplate,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + User *Addressableentityref `json:"user,omitempty"` + *Alias + }{ + Id: u.Id, + + ConversationId: u.ConversationId, + + FromAddress: u.FromAddress, + + ToAddress: u.ToAddress, + + MessengerType: u.MessengerType, + + TextBody: u.TextBody, + + MessagingTemplate: u.MessagingTemplate, + + Timestamp: Timestamp, + + SelfUri: u.SelfUri, + + User: u.User, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sendagentlessoutboundmessageresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sequenceschedule.go b/platformclientv2/sequenceschedule.go index 97917f773..b9ff79ea5 100644 --- a/platformclientv2/sequenceschedule.go +++ b/platformclientv2/sequenceschedule.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,70 @@ type Sequenceschedule struct { } +func (u *Sequenceschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sequenceschedule + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Intervals *[]Scheduleinterval `json:"intervals,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + Sequence *Domainentityref `json:"sequence,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + Intervals: u.Intervals, + + TimeZone: u.TimeZone, + + Sequence: u.Sequence, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sequenceschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/serverdate.go b/platformclientv2/serverdate.go index d710c20d1..3672a734d 100644 --- a/platformclientv2/serverdate.go +++ b/platformclientv2/serverdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -13,6 +14,30 @@ type Serverdate struct { } +func (u *Serverdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Serverdate + + + CurrentDate := new(string) + if u.CurrentDate != nil { + + *CurrentDate = timeutil.Strftime(u.CurrentDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CurrentDate = nil + } + + + return json.Marshal(&struct { + CurrentDate *string `json:"currentDate,omitempty"` + *Alias + }{ + CurrentDate: CurrentDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Serverdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/servicecontext.go b/platformclientv2/servicecontext.go index d2aae3a3c..2a24585dc 100644 --- a/platformclientv2/servicecontext.go +++ b/platformclientv2/servicecontext.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Servicecontext struct { } +func (u *Servicecontext) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Servicecontext + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Servicecontext) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/servicegoaltemplate.go b/platformclientv2/servicegoaltemplate.go index 6cb9444fa..031cf9bc0 100644 --- a/platformclientv2/servicegoaltemplate.go +++ b/platformclientv2/servicegoaltemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Servicegoaltemplate struct { } +func (u *Servicegoaltemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Servicegoaltemplate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ServiceLevel *Buservicelevel `json:"serviceLevel,omitempty"` + + AverageSpeedOfAnswer *Buaveragespeedofanswer `json:"averageSpeedOfAnswer,omitempty"` + + AbandonRate *Buabandonrate `json:"abandonRate,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ServiceLevel: u.ServiceLevel, + + AverageSpeedOfAnswer: u.AverageSpeedOfAnswer, + + AbandonRate: u.AbandonRate, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Servicegoaltemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/servicegoaltemplatelist.go b/platformclientv2/servicegoaltemplatelist.go index 4f16a90f2..005c7550b 100644 --- a/platformclientv2/servicegoaltemplatelist.go +++ b/platformclientv2/servicegoaltemplatelist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Servicegoaltemplatelist struct { } +func (u *Servicegoaltemplatelist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Servicegoaltemplatelist + + + + return json.Marshal(&struct { + Entities *[]Servicegoaltemplate `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Servicegoaltemplatelist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/servicegoaltemplatereference.go b/platformclientv2/servicegoaltemplatereference.go index 7be26931e..1fccd5d33 100644 --- a/platformclientv2/servicegoaltemplatereference.go +++ b/platformclientv2/servicegoaltemplatereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Servicegoaltemplatereference struct { } +func (u *Servicegoaltemplatereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Servicegoaltemplatereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Servicegoaltemplatereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/servicelevel.go b/platformclientv2/servicelevel.go index cb27fb9d8..e23aa0531 100644 --- a/platformclientv2/servicelevel.go +++ b/platformclientv2/servicelevel.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Servicelevel struct { } +func (u *Servicelevel) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Servicelevel + + + + return json.Marshal(&struct { + Percentage *float64 `json:"percentage,omitempty"` + + DurationMs *int `json:"durationMs,omitempty"` + *Alias + }{ + Percentage: u.Percentage, + + DurationMs: u.DurationMs, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Servicelevel) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/setuuidatarequest.go b/platformclientv2/setuuidatarequest.go index 4870b8427..d000e650c 100644 --- a/platformclientv2/setuuidatarequest.go +++ b/platformclientv2/setuuidatarequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Setuuidatarequest struct { } +func (u *Setuuidatarequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Setuuidatarequest + + + + return json.Marshal(&struct { + UuiData *string `json:"uuiData,omitempty"` + *Alias + }{ + UuiData: u.UuiData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Setuuidatarequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/setwrapperdayofweek.go b/platformclientv2/setwrapperdayofweek.go index 67638d3ce..bbb93b04b 100644 --- a/platformclientv2/setwrapperdayofweek.go +++ b/platformclientv2/setwrapperdayofweek.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Setwrapperdayofweek struct { } +func (u *Setwrapperdayofweek) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Setwrapperdayofweek + + + + return json.Marshal(&struct { + Values *[]string `json:"values,omitempty"` + *Alias + }{ + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Setwrapperdayofweek) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/setwrapperroutepathrequest.go b/platformclientv2/setwrapperroutepathrequest.go index f66e884e2..496771ecc 100644 --- a/platformclientv2/setwrapperroutepathrequest.go +++ b/platformclientv2/setwrapperroutepathrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Setwrapperroutepathrequest struct { } +func (u *Setwrapperroutepathrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Setwrapperroutepathrequest + + + + return json.Marshal(&struct { + Values *[]Routepathrequest `json:"values,omitempty"` + *Alias + }{ + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Setwrapperroutepathrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/share.go b/platformclientv2/share.go index ce1ba87e0..289f2869e 100644 --- a/platformclientv2/share.go +++ b/platformclientv2/share.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Share struct { } +func (u *Share) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Share + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SharedEntityType *string `json:"sharedEntityType,omitempty"` + + SharedEntity *Domainentityref `json:"sharedEntity,omitempty"` + + MemberType *string `json:"memberType,omitempty"` + + Member *Domainentityref `json:"member,omitempty"` + + SharedBy *Domainentityref `json:"sharedBy,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + User *User `json:"user,omitempty"` + + Group *Group `json:"group,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SharedEntityType: u.SharedEntityType, + + SharedEntity: u.SharedEntity, + + MemberType: u.MemberType, + + Member: u.Member, + + SharedBy: u.SharedBy, + + Workspace: u.Workspace, + + User: u.User, + + Group: u.Group, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Share) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sharedentity.go b/platformclientv2/sharedentity.go index 019eacee7..9df16cc50 100644 --- a/platformclientv2/sharedentity.go +++ b/platformclientv2/sharedentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Sharedentity struct { } +func (u *Sharedentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sharedentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sharedentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sharedresponse.go b/platformclientv2/sharedresponse.go index 8ff3c1a5f..b47220651 100644 --- a/platformclientv2/sharedresponse.go +++ b/platformclientv2/sharedresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Sharedresponse struct { } +func (u *Sharedresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sharedresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DownloadUri *string `json:"downloadUri,omitempty"` + + ViewUri *string `json:"viewUri,omitempty"` + + Document *Document `json:"document,omitempty"` + + Share *Share `json:"share,omitempty"` + *Alias + }{ + Id: u.Id, + + DownloadUri: u.DownloadUri, + + ViewUri: u.ViewUri, + + Document: u.Document, + + Share: u.Share, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sharedresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shareentitylisting.go b/platformclientv2/shareentitylisting.go index 9af7da122..741fe6853 100644 --- a/platformclientv2/shareentitylisting.go +++ b/platformclientv2/shareentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Shareentitylisting struct { } +func (u *Shareentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shareentitylisting + + + + return json.Marshal(&struct { + Entities *[]Share `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shareentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shiftstartvariance.go b/platformclientv2/shiftstartvariance.go index 913267cae..84e4ee5c0 100644 --- a/platformclientv2/shiftstartvariance.go +++ b/platformclientv2/shiftstartvariance.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Shiftstartvariance struct { } +func (u *Shiftstartvariance) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shiftstartvariance + + + + return json.Marshal(&struct { + ApplicableDays *[]string `json:"applicableDays,omitempty"` + + MaxShiftStartVarianceMinutes *int `json:"maxShiftStartVarianceMinutes,omitempty"` + *Alias + }{ + ApplicableDays: u.ApplicableDays, + + MaxShiftStartVarianceMinutes: u.MaxShiftStartVarianceMinutes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shiftstartvariance) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradeactivitypreviewresponse.go b/platformclientv2/shifttradeactivitypreviewresponse.go index 2c8dde0e9..419f37125 100644 --- a/platformclientv2/shifttradeactivitypreviewresponse.go +++ b/platformclientv2/shifttradeactivitypreviewresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Shifttradeactivitypreviewresponse struct { } +func (u *Shifttradeactivitypreviewresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradeactivitypreviewresponse + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + LengthMinutes *int `json:"lengthMinutes,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + *Alias + }{ + StartDate: StartDate, + + LengthMinutes: u.LengthMinutes, + + ActivityCodeId: u.ActivityCodeId, + + CountsAsPaidTime: u.CountsAsPaidTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradeactivitypreviewresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradeactivityrule.go b/platformclientv2/shifttradeactivityrule.go index 8a494e5ab..b08d7367d 100644 --- a/platformclientv2/shifttradeactivityrule.go +++ b/platformclientv2/shifttradeactivityrule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Shifttradeactivityrule struct { } +func (u *Shifttradeactivityrule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradeactivityrule + + + + return json.Marshal(&struct { + ActivityCategory *string `json:"activityCategory,omitempty"` + + Action *string `json:"action,omitempty"` + + ActivityCodeIdReplacement *string `json:"activityCodeIdReplacement,omitempty"` + *Alias + }{ + ActivityCategory: u.ActivityCategory, + + Action: u.Action, + + ActivityCodeIdReplacement: u.ActivityCodeIdReplacement, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradeactivityrule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradelistresponse.go b/platformclientv2/shifttradelistresponse.go index 27cc9f97f..0c8556b79 100644 --- a/platformclientv2/shifttradelistresponse.go +++ b/platformclientv2/shifttradelistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Shifttradelistresponse struct { } +func (u *Shifttradelistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradelistresponse + + + + return json.Marshal(&struct { + Entities *[]Shifttraderesponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradelistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradematchessummaryresponse.go b/platformclientv2/shifttradematchessummaryresponse.go index cb1ebc02d..450c1dbf6 100644 --- a/platformclientv2/shifttradematchessummaryresponse.go +++ b/platformclientv2/shifttradematchessummaryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Shifttradematchessummaryresponse struct { } +func (u *Shifttradematchessummaryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradematchessummaryresponse + + + + return json.Marshal(&struct { + Entities *[]Weekshifttradematchessummaryresponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradematchessummaryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradematchreviewresponse.go b/platformclientv2/shifttradematchreviewresponse.go index 438bd5754..530efd86f 100644 --- a/platformclientv2/shifttradematchreviewresponse.go +++ b/platformclientv2/shifttradematchreviewresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Shifttradematchreviewresponse struct { } +func (u *Shifttradematchreviewresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradematchreviewresponse + + + + return json.Marshal(&struct { + InitiatingUser *Shifttradematchreviewuserresponse `json:"initiatingUser,omitempty"` + + ReceivingUser *Shifttradematchreviewuserresponse `json:"receivingUser,omitempty"` + + Violations *[]Shifttradematchviolation `json:"violations,omitempty"` + + AdminReviewViolations *[]Shifttradematchviolation `json:"adminReviewViolations,omitempty"` + *Alias + }{ + InitiatingUser: u.InitiatingUser, + + ReceivingUser: u.ReceivingUser, + + Violations: u.Violations, + + AdminReviewViolations: u.AdminReviewViolations, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradematchreviewresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradematchreviewuserresponse.go b/platformclientv2/shifttradematchreviewuserresponse.go index e3a7fbf1b..f3382a8a2 100644 --- a/platformclientv2/shifttradematchreviewuserresponse.go +++ b/platformclientv2/shifttradematchreviewuserresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Shifttradematchreviewuserresponse struct { } +func (u *Shifttradematchreviewuserresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradematchreviewuserresponse + + + + return json.Marshal(&struct { + WeeklyMinimumPaidMinutes *int `json:"weeklyMinimumPaidMinutes,omitempty"` + + WeeklyMaximumPaidMinutes *int `json:"weeklyMaximumPaidMinutes,omitempty"` + + PreTradeSchedulePaidMinutes *int `json:"preTradeSchedulePaidMinutes,omitempty"` + + PostTradeSchedulePaidMinutes *int `json:"postTradeSchedulePaidMinutes,omitempty"` + + PostTradeNewShift *Shifttradepreviewresponse `json:"postTradeNewShift,omitempty"` + *Alias + }{ + WeeklyMinimumPaidMinutes: u.WeeklyMinimumPaidMinutes, + + WeeklyMaximumPaidMinutes: u.WeeklyMaximumPaidMinutes, + + PreTradeSchedulePaidMinutes: u.PreTradeSchedulePaidMinutes, + + PostTradeSchedulePaidMinutes: u.PostTradeSchedulePaidMinutes, + + PostTradeNewShift: u.PostTradeNewShift, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradematchreviewuserresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradematchviolation.go b/platformclientv2/shifttradematchviolation.go index 535ebdb70..b4e31c1ea 100644 --- a/platformclientv2/shifttradematchviolation.go +++ b/platformclientv2/shifttradematchviolation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Shifttradematchviolation struct { } +func (u *Shifttradematchviolation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradematchviolation + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Params *map[string]string `json:"params,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Params: u.Params, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradematchviolation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradenotification.go b/platformclientv2/shifttradenotification.go index 11298c7d9..5032760e0 100644 --- a/platformclientv2/shifttradenotification.go +++ b/platformclientv2/shifttradenotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Shifttradenotification struct { } +func (u *Shifttradenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradenotification + + + InitiatingShiftDate := new(string) + if u.InitiatingShiftDate != nil { + + *InitiatingShiftDate = timeutil.Strftime(u.InitiatingShiftDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + InitiatingShiftDate = nil + } + + ReceivingShiftDate := new(string) + if u.ReceivingShiftDate != nil { + + *ReceivingShiftDate = timeutil.Strftime(u.ReceivingShiftDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReceivingShiftDate = nil + } + + + return json.Marshal(&struct { + WeekDate *string `json:"weekDate,omitempty"` + + TradeId *string `json:"tradeId,omitempty"` + + OneSided *bool `json:"oneSided,omitempty"` + + NewState *string `json:"newState,omitempty"` + + InitiatingUser *Userreference `json:"initiatingUser,omitempty"` + + InitiatingShiftDate *string `json:"initiatingShiftDate,omitempty"` + + ReceivingUser *Userreference `json:"receivingUser,omitempty"` + + ReceivingShiftDate *string `json:"receivingShiftDate,omitempty"` + *Alias + }{ + WeekDate: u.WeekDate, + + TradeId: u.TradeId, + + OneSided: u.OneSided, + + NewState: u.NewState, + + InitiatingUser: u.InitiatingUser, + + InitiatingShiftDate: InitiatingShiftDate, + + ReceivingUser: u.ReceivingUser, + + ReceivingShiftDate: ReceivingShiftDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradepreviewresponse.go b/platformclientv2/shifttradepreviewresponse.go index b33abd078..1c58e14cc 100644 --- a/platformclientv2/shifttradepreviewresponse.go +++ b/platformclientv2/shifttradepreviewresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Shifttradepreviewresponse struct { } +func (u *Shifttradepreviewresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradepreviewresponse + + + + return json.Marshal(&struct { + Activities *[]Shifttradeactivitypreviewresponse `json:"activities,omitempty"` + *Alias + }{ + Activities: u.Activities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradepreviewresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttraderesponse.go b/platformclientv2/shifttraderesponse.go index d813301bf..365ea3df2 100644 --- a/platformclientv2/shifttraderesponse.go +++ b/platformclientv2/shifttraderesponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,145 @@ type Shifttraderesponse struct { } +func (u *Shifttraderesponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttraderesponse + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + InitiatingShiftStart := new(string) + if u.InitiatingShiftStart != nil { + + *InitiatingShiftStart = timeutil.Strftime(u.InitiatingShiftStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + InitiatingShiftStart = nil + } + + InitiatingShiftEnd := new(string) + if u.InitiatingShiftEnd != nil { + + *InitiatingShiftEnd = timeutil.Strftime(u.InitiatingShiftEnd, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + InitiatingShiftEnd = nil + } + + ReceivingShiftStart := new(string) + if u.ReceivingShiftStart != nil { + + *ReceivingShiftStart = timeutil.Strftime(u.ReceivingShiftStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReceivingShiftStart = nil + } + + ReceivingShiftEnd := new(string) + if u.ReceivingShiftEnd != nil { + + *ReceivingShiftEnd = timeutil.Strftime(u.ReceivingShiftEnd, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReceivingShiftEnd = nil + } + + Expiration := new(string) + if u.Expiration != nil { + + *Expiration = timeutil.Strftime(u.Expiration, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Expiration = nil + } + + ReviewedDate := new(string) + if u.ReviewedDate != nil { + + *ReviewedDate = timeutil.Strftime(u.ReviewedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReviewedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + Schedule *Buschedulereferenceformuroute `json:"schedule,omitempty"` + + State *string `json:"state,omitempty"` + + InitiatingUser *Userreference `json:"initiatingUser,omitempty"` + + InitiatingShiftId *string `json:"initiatingShiftId,omitempty"` + + InitiatingShiftStart *string `json:"initiatingShiftStart,omitempty"` + + InitiatingShiftEnd *string `json:"initiatingShiftEnd,omitempty"` + + ReceivingUser *Userreference `json:"receivingUser,omitempty"` + + ReceivingShiftId *string `json:"receivingShiftId,omitempty"` + + ReceivingShiftStart *string `json:"receivingShiftStart,omitempty"` + + ReceivingShiftEnd *string `json:"receivingShiftEnd,omitempty"` + + Expiration *string `json:"expiration,omitempty"` + + OneSided *bool `json:"oneSided,omitempty"` + + AcceptableIntervals *[]string `json:"acceptableIntervals,omitempty"` + + ReviewedBy *Userreference `json:"reviewedBy,omitempty"` + + ReviewedDate *string `json:"reviewedDate,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: WeekDate, + + Schedule: u.Schedule, + + State: u.State, + + InitiatingUser: u.InitiatingUser, + + InitiatingShiftId: u.InitiatingShiftId, + + InitiatingShiftStart: InitiatingShiftStart, + + InitiatingShiftEnd: InitiatingShiftEnd, + + ReceivingUser: u.ReceivingUser, + + ReceivingShiftId: u.ReceivingShiftId, + + ReceivingShiftStart: ReceivingShiftStart, + + ReceivingShiftEnd: ReceivingShiftEnd, + + Expiration: Expiration, + + OneSided: u.OneSided, + + AcceptableIntervals: u.AcceptableIntervals, + + ReviewedBy: u.ReviewedBy, + + ReviewedDate: ReviewedDate, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttraderesponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shifttradesettings.go b/platformclientv2/shifttradesettings.go index 02712e7c5..8f3f1cc87 100644 --- a/platformclientv2/shifttradesettings.go +++ b/platformclientv2/shifttradesettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -60,6 +61,70 @@ type Shifttradesettings struct { } +func (u *Shifttradesettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shifttradesettings + + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + AutoReview *bool `json:"autoReview,omitempty"` + + AllowDirectTrades *bool `json:"allowDirectTrades,omitempty"` + + MinHoursInFuture *int `json:"minHoursInFuture,omitempty"` + + UnequalPaid *string `json:"unequalPaid,omitempty"` + + OneSided *string `json:"oneSided,omitempty"` + + WeeklyMinPaidViolations *string `json:"weeklyMinPaidViolations,omitempty"` + + WeeklyMaxPaidViolations *string `json:"weeklyMaxPaidViolations,omitempty"` + + RequiresMatchingQueues *bool `json:"requiresMatchingQueues,omitempty"` + + RequiresMatchingLanguages *bool `json:"requiresMatchingLanguages,omitempty"` + + RequiresMatchingSkills *bool `json:"requiresMatchingSkills,omitempty"` + + RequiresMatchingPlanningGroups *bool `json:"requiresMatchingPlanningGroups,omitempty"` + + ActivityCategoryRules *[]Shifttradeactivityrule `json:"activityCategoryRules,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + AutoReview: u.AutoReview, + + AllowDirectTrades: u.AllowDirectTrades, + + MinHoursInFuture: u.MinHoursInFuture, + + UnequalPaid: u.UnequalPaid, + + OneSided: u.OneSided, + + WeeklyMinPaidViolations: u.WeeklyMinPaidViolations, + + WeeklyMaxPaidViolations: u.WeeklyMaxPaidViolations, + + RequiresMatchingQueues: u.RequiresMatchingQueues, + + RequiresMatchingLanguages: u.RequiresMatchingLanguages, + + RequiresMatchingSkills: u.RequiresMatchingSkills, + + RequiresMatchingPlanningGroups: u.RequiresMatchingPlanningGroups, + + ActivityCategoryRules: u.ActivityCategoryRules, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shifttradesettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shorttermforecastingsettings.go b/platformclientv2/shorttermforecastingsettings.go index 12c644de3..95da289a5 100644 --- a/platformclientv2/shorttermforecastingsettings.go +++ b/platformclientv2/shorttermforecastingsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Shorttermforecastingsettings struct { } +func (u *Shorttermforecastingsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shorttermforecastingsettings + + + + return json.Marshal(&struct { + DefaultHistoryWeeks *int `json:"defaultHistoryWeeks,omitempty"` + *Alias + }{ + DefaultHistoryWeeks: u.DefaultHistoryWeeks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shorttermforecastingsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shorttermforecastreference.go b/platformclientv2/shorttermforecastreference.go index 5524f8c54..910cc6b68 100644 --- a/platformclientv2/shorttermforecastreference.go +++ b/platformclientv2/shorttermforecastreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Shorttermforecastreference struct { } +func (u *Shorttermforecastreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shorttermforecastreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + + WeekDate: u.WeekDate, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shorttermforecastreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shrinkageoverride.go b/platformclientv2/shrinkageoverride.go index 1f77ba3f1..6661a5d73 100644 --- a/platformclientv2/shrinkageoverride.go +++ b/platformclientv2/shrinkageoverride.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Shrinkageoverride struct { } +func (u *Shrinkageoverride) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shrinkageoverride + + + + return json.Marshal(&struct { + IntervalIndex *int `json:"intervalIndex,omitempty"` + + ShrinkagePercent *float64 `json:"shrinkagePercent,omitempty"` + *Alias + }{ + IntervalIndex: u.IntervalIndex, + + ShrinkagePercent: u.ShrinkagePercent, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shrinkageoverride) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/shrinkageoverrides.go b/platformclientv2/shrinkageoverrides.go index 84c592586..eca08fa8b 100644 --- a/platformclientv2/shrinkageoverrides.go +++ b/platformclientv2/shrinkageoverrides.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Shrinkageoverrides struct { } +func (u *Shrinkageoverrides) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Shrinkageoverrides + + + + return json.Marshal(&struct { + Clear *bool `json:"clear,omitempty"` + + Values *[]Shrinkageoverride `json:"values,omitempty"` + *Alias + }{ + Clear: u.Clear, + + Values: u.Values, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Shrinkageoverrides) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/signedurlresponse.go b/platformclientv2/signedurlresponse.go index 62b26acd3..5543351d0 100644 --- a/platformclientv2/signedurlresponse.go +++ b/platformclientv2/signedurlresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Signedurlresponse struct { } +func (u *Signedurlresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Signedurlresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Url *string `json:"url,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Url: u.Url, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Signedurlresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/singleworkdayaveragepoints.go b/platformclientv2/singleworkdayaveragepoints.go index ea21b9950..8ffa9ba81 100644 --- a/platformclientv2/singleworkdayaveragepoints.go +++ b/platformclientv2/singleworkdayaveragepoints.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,37 @@ type Singleworkdayaveragepoints struct { } +func (u *Singleworkdayaveragepoints) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Singleworkdayaveragepoints + + + DateWorkday := new(string) + if u.DateWorkday != nil { + *DateWorkday = timeutil.Strftime(u.DateWorkday, "%Y-%m-%d") + } else { + DateWorkday = nil + } + + + return json.Marshal(&struct { + DateWorkday *string `json:"dateWorkday,omitempty"` + + Division *Division `json:"division,omitempty"` + + AveragePoints *float64 `json:"averagePoints,omitempty"` + *Alias + }{ + DateWorkday: DateWorkday, + + Division: u.Division, + + AveragePoints: u.AveragePoints, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Singleworkdayaveragepoints) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/singleworkdayaveragevalues.go b/platformclientv2/singleworkdayaveragevalues.go index f75972a6c..d7183714f 100644 --- a/platformclientv2/singleworkdayaveragevalues.go +++ b/platformclientv2/singleworkdayaveragevalues.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,45 @@ type Singleworkdayaveragevalues struct { } +func (u *Singleworkdayaveragevalues) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Singleworkdayaveragevalues + + + DateWorkday := new(string) + if u.DateWorkday != nil { + *DateWorkday = timeutil.Strftime(u.DateWorkday, "%Y-%m-%d") + } else { + DateWorkday = nil + } + + + return json.Marshal(&struct { + DateWorkday *string `json:"dateWorkday,omitempty"` + + Division *Division `json:"division,omitempty"` + + User *Userreference `json:"user,omitempty"` + + Timezone *string `json:"timezone,omitempty"` + + Results *[]Workdayvaluesmetricitem `json:"results,omitempty"` + *Alias + }{ + DateWorkday: DateWorkday, + + Division: u.Division, + + User: u.User, + + Timezone: u.Timezone, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Singleworkdayaveragevalues) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sipdownloadresponse.go b/platformclientv2/sipdownloadresponse.go index c7970b264..68d186e95 100644 --- a/platformclientv2/sipdownloadresponse.go +++ b/platformclientv2/sipdownloadresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Sipdownloadresponse struct { } +func (u *Sipdownloadresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sipdownloadresponse + + + + return json.Marshal(&struct { + DownloadId *string `json:"downloadId,omitempty"` + + DocumentId *string `json:"documentId,omitempty"` + *Alias + }{ + DownloadId: u.DownloadId, + + DocumentId: u.DocumentId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sipdownloadresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sipsearchpublicrequest.go b/platformclientv2/sipsearchpublicrequest.go index 5260218c1..d60308e7b 100644 --- a/platformclientv2/sipsearchpublicrequest.go +++ b/platformclientv2/sipsearchpublicrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -49,6 +50,74 @@ type Sipsearchpublicrequest struct { } +func (u *Sipsearchpublicrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sipsearchpublicrequest + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + DateEnd := new(string) + if u.DateEnd != nil { + + *DateEnd = timeutil.Strftime(u.DateEnd, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateEnd = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + CallId *string `json:"callId,omitempty"` + + ToUser *string `json:"toUser,omitempty"` + + FromUser *string `json:"fromUser,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + ParticipantId *string `json:"participantId,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + DateEnd *string `json:"dateEnd,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + CallId: u.CallId, + + ToUser: u.ToUser, + + FromUser: u.FromUser, + + ConversationId: u.ConversationId, + + ParticipantId: u.ParticipantId, + + DateStart: DateStart, + + DateEnd: DateEnd, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sipsearchpublicrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sipsearchresult.go b/platformclientv2/sipsearchresult.go index a894a9970..95ca3a6c4 100644 --- a/platformclientv2/sipsearchresult.go +++ b/platformclientv2/sipsearchresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Sipsearchresult struct { } +func (u *Sipsearchresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sipsearchresult + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Status *int `json:"status,omitempty"` + + Sid *string `json:"sid,omitempty"` + + Auth *string `json:"auth,omitempty"` + + Message *string `json:"message,omitempty"` + + Data *[]Homerrecord `json:"data,omitempty"` + + Count *int `json:"count,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Status: u.Status, + + Sid: u.Sid, + + Auth: u.Auth, + + Message: u.Message, + + Data: u.Data, + + Count: u.Count, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sipsearchresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/site.go b/platformclientv2/site.go index f7283979b..0cf43ab18 100644 --- a/platformclientv2/site.go +++ b/platformclientv2/site.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,138 @@ type Site struct { } +func (u *Site) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Site + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + PrimarySites *[]Domainentityref `json:"primarySites,omitempty"` + + SecondarySites *[]Domainentityref `json:"secondarySites,omitempty"` + + PrimaryEdges *[]Edge `json:"primaryEdges,omitempty"` + + SecondaryEdges *[]Edge `json:"secondaryEdges,omitempty"` + + Addresses *[]Contact `json:"addresses,omitempty"` + + Edges *[]Edge `json:"edges,omitempty"` + + EdgeAutoUpdateConfig *Edgeautoupdateconfig `json:"edgeAutoUpdateConfig,omitempty"` + + MediaRegionsUseLatencyBased *bool `json:"mediaRegionsUseLatencyBased,omitempty"` + + Location *Locationdefinition `json:"location,omitempty"` + + Managed *bool `json:"managed,omitempty"` + + NtpSettings *Ntpsettings `json:"ntpSettings,omitempty"` + + MediaModel *string `json:"mediaModel,omitempty"` + + CoreSite *bool `json:"coreSite,omitempty"` + + SiteConnections *[]Siteconnection `json:"siteConnections,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + PrimarySites: u.PrimarySites, + + SecondarySites: u.SecondarySites, + + PrimaryEdges: u.PrimaryEdges, + + SecondaryEdges: u.SecondaryEdges, + + Addresses: u.Addresses, + + Edges: u.Edges, + + EdgeAutoUpdateConfig: u.EdgeAutoUpdateConfig, + + MediaRegionsUseLatencyBased: u.MediaRegionsUseLatencyBased, + + Location: u.Location, + + Managed: u.Managed, + + NtpSettings: u.NtpSettings, + + MediaModel: u.MediaModel, + + CoreSite: u.CoreSite, + + SiteConnections: u.SiteConnections, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Site) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/siteconnection.go b/platformclientv2/siteconnection.go index aa95c549b..965dba093 100644 --- a/platformclientv2/siteconnection.go +++ b/platformclientv2/siteconnection.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Siteconnection struct { } +func (u *Siteconnection) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Siteconnection + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + Managed *bool `json:"managed,omitempty"` + + VarType *string `json:"type,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + MediaModel *string `json:"mediaModel,omitempty"` + + EdgeList *[]Connectededge `json:"edgeList,omitempty"` + + CoreSite *bool `json:"coreSite,omitempty"` + + PrimaryCoreSites *[]Domainentityref `json:"primaryCoreSites,omitempty"` + + SecondaryCoreSites *[]Domainentityref `json:"secondaryCoreSites,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + + Managed: u.Managed, + + VarType: u.VarType, + + Enabled: u.Enabled, + + MediaModel: u.MediaModel, + + EdgeList: u.EdgeList, + + CoreSite: u.CoreSite, + + PrimaryCoreSites: u.PrimaryCoreSites, + + SecondaryCoreSites: u.SecondaryCoreSites, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Siteconnection) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/siteentitylisting.go b/platformclientv2/siteentitylisting.go index 535f69519..0b1265942 100644 --- a/platformclientv2/siteentitylisting.go +++ b/platformclientv2/siteentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Siteentitylisting struct { } +func (u *Siteentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Siteentitylisting + + + + return json.Marshal(&struct { + Entities *[]Site `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Siteentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/skillentitylisting.go b/platformclientv2/skillentitylisting.go index d82ef4bd3..3c53fef93 100644 --- a/platformclientv2/skillentitylisting.go +++ b/platformclientv2/skillentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Skillentitylisting struct { } +func (u *Skillentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Skillentitylisting + + + + return json.Marshal(&struct { + Entities *[]Routingskill `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Skillentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/skillstoremove.go b/platformclientv2/skillstoremove.go index fceee70ed..930f3c227 100644 --- a/platformclientv2/skillstoremove.go +++ b/platformclientv2/skillstoremove.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Skillstoremove struct { } +func (u *Skillstoremove) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Skillstoremove + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Name: u.Name, + + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Skillstoremove) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsaddress.go b/platformclientv2/smsaddress.go index 57ee9c6c9..401435f20 100644 --- a/platformclientv2/smsaddress.go +++ b/platformclientv2/smsaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Smsaddress struct { } +func (u *Smsaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsaddress + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Street *string `json:"street,omitempty"` + + City *string `json:"city,omitempty"` + + Region *string `json:"region,omitempty"` + + PostalCode *string `json:"postalCode,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + Validated *bool `json:"validated,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Street: u.Street, + + City: u.City, + + Region: u.Region, + + PostalCode: u.PostalCode, + + CountryCode: u.CountryCode, + + Validated: u.Validated, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsaddressentitylisting.go b/platformclientv2/smsaddressentitylisting.go index 5a2f8afb3..f6e96722b 100644 --- a/platformclientv2/smsaddressentitylisting.go +++ b/platformclientv2/smsaddressentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Smsaddressentitylisting struct { } +func (u *Smsaddressentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsaddressentitylisting + + + + return json.Marshal(&struct { + Entities *[]Smsaddress `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsaddressentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsaddressprovision.go b/platformclientv2/smsaddressprovision.go index 662807a87..b7cae6883 100644 --- a/platformclientv2/smsaddressprovision.go +++ b/platformclientv2/smsaddressprovision.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Smsaddressprovision struct { } +func (u *Smsaddressprovision) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsaddressprovision + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Street *string `json:"street,omitempty"` + + City *string `json:"city,omitempty"` + + Region *string `json:"region,omitempty"` + + PostalCode *string `json:"postalCode,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + AutoCorrectAddress *bool `json:"autoCorrectAddress,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Street: u.Street, + + City: u.City, + + Region: u.Region, + + PostalCode: u.PostalCode, + + CountryCode: u.CountryCode, + + AutoCorrectAddress: u.AutoCorrectAddress, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsaddressprovision) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsavailablephonenumber.go b/platformclientv2/smsavailablephonenumber.go index 843b658f4..1bac74371 100644 --- a/platformclientv2/smsavailablephonenumber.go +++ b/platformclientv2/smsavailablephonenumber.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Smsavailablephonenumber struct { } +func (u *Smsavailablephonenumber) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsavailablephonenumber + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + Region *string `json:"region,omitempty"` + + City *string `json:"city,omitempty"` + + Capabilities *[]string `json:"capabilities,omitempty"` + + PhoneNumberType *string `json:"phoneNumberType,omitempty"` + + AddressRequirement *string `json:"addressRequirement,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PhoneNumber: u.PhoneNumber, + + CountryCode: u.CountryCode, + + Region: u.Region, + + City: u.City, + + Capabilities: u.Capabilities, + + PhoneNumberType: u.PhoneNumberType, + + AddressRequirement: u.AddressRequirement, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsavailablephonenumber) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsavailablephonenumberentitylisting.go b/platformclientv2/smsavailablephonenumberentitylisting.go index 0840a6a32..f4300c9bd 100644 --- a/platformclientv2/smsavailablephonenumberentitylisting.go +++ b/platformclientv2/smsavailablephonenumberentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Smsavailablephonenumberentitylisting struct { } +func (u *Smsavailablephonenumberentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsavailablephonenumberentitylisting + + + + return json.Marshal(&struct { + Entities *[]Smsavailablephonenumber `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsavailablephonenumberentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsconfig.go b/platformclientv2/smsconfig.go index b04900f26..f463a3dbb 100644 --- a/platformclientv2/smsconfig.go +++ b/platformclientv2/smsconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Smsconfig struct { } +func (u *Smsconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsconfig + + + + return json.Marshal(&struct { + MessageColumn *string `json:"messageColumn,omitempty"` + + PhoneColumn *string `json:"phoneColumn,omitempty"` + + SenderSmsPhoneNumber *Smsphonenumberref `json:"senderSmsPhoneNumber,omitempty"` + *Alias + }{ + MessageColumn: u.MessageColumn, + + PhoneColumn: u.PhoneColumn, + + SenderSmsPhoneNumber: u.SenderSmsPhoneNumber, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsphonenumber.go b/platformclientv2/smsphonenumber.go index 9839cde4d..efad430e8 100644 --- a/platformclientv2/smsphonenumber.go +++ b/platformclientv2/smsphonenumber.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -89,6 +90,138 @@ type Smsphonenumber struct { } +func (u *Smsphonenumber) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsphonenumber + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + PurchaseDate := new(string) + if u.PurchaseDate != nil { + + *PurchaseDate = timeutil.Strftime(u.PurchaseDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PurchaseDate = nil + } + + CancellationDate := new(string) + if u.CancellationDate != nil { + + *CancellationDate = timeutil.Strftime(u.CancellationDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CancellationDate = nil + } + + RenewalDate := new(string) + if u.RenewalDate != nil { + + *RenewalDate = timeutil.Strftime(u.RenewalDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RenewalDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + PhoneNumberType *string `json:"phoneNumberType,omitempty"` + + ProvisionedThroughPureCloud *bool `json:"provisionedThroughPureCloud,omitempty"` + + PhoneNumberStatus *string `json:"phoneNumberStatus,omitempty"` + + Capabilities *[]string `json:"capabilities,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *User `json:"createdBy,omitempty"` + + ModifiedBy *User `json:"modifiedBy,omitempty"` + + Version *int `json:"version,omitempty"` + + PurchaseDate *string `json:"purchaseDate,omitempty"` + + CancellationDate *string `json:"cancellationDate,omitempty"` + + RenewalDate *string `json:"renewalDate,omitempty"` + + AutoRenewable *string `json:"autoRenewable,omitempty"` + + AddressId *Smsaddress `json:"addressId,omitempty"` + + ShortCodeBillingType *string `json:"shortCodeBillingType,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PhoneNumber: u.PhoneNumber, + + PhoneNumberType: u.PhoneNumberType, + + ProvisionedThroughPureCloud: u.ProvisionedThroughPureCloud, + + PhoneNumberStatus: u.PhoneNumberStatus, + + Capabilities: u.Capabilities, + + CountryCode: u.CountryCode, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Version: u.Version, + + PurchaseDate: PurchaseDate, + + CancellationDate: CancellationDate, + + RenewalDate: RenewalDate, + + AutoRenewable: u.AutoRenewable, + + AddressId: u.AddressId, + + ShortCodeBillingType: u.ShortCodeBillingType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsphonenumber) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsphonenumberentitylisting.go b/platformclientv2/smsphonenumberentitylisting.go index 5def96ed3..8a15c4c32 100644 --- a/platformclientv2/smsphonenumberentitylisting.go +++ b/platformclientv2/smsphonenumberentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Smsphonenumberentitylisting struct { } +func (u *Smsphonenumberentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsphonenumberentitylisting + + + + return json.Marshal(&struct { + Entities *[]Smsphonenumber `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsphonenumberentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsphonenumberprovision.go b/platformclientv2/smsphonenumberprovision.go index 25c5c5083..d2e5f08cc 100644 --- a/platformclientv2/smsphonenumberprovision.go +++ b/platformclientv2/smsphonenumberprovision.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Smsphonenumberprovision struct { } +func (u *Smsphonenumberprovision) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsphonenumberprovision + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + PhoneNumberType *string `json:"phoneNumberType,omitempty"` + + CountryCode *string `json:"countryCode,omitempty"` + + AddressId *string `json:"addressId,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PhoneNumber: u.PhoneNumber, + + PhoneNumberType: u.PhoneNumberType, + + CountryCode: u.CountryCode, + + AddressId: u.AddressId, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsphonenumberprovision) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/smsphonenumberref.go b/platformclientv2/smsphonenumberref.go index eb4231292..b7ebb0933 100644 --- a/platformclientv2/smsphonenumberref.go +++ b/platformclientv2/smsphonenumberref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Smsphonenumberref struct { } +func (u *Smsphonenumberref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Smsphonenumberref + + + + return json.Marshal(&struct { + PhoneNumber *string `json:"phoneNumber,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + PhoneNumber: u.PhoneNumber, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Smsphonenumberref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/socialexpression.go b/platformclientv2/socialexpression.go index b82e81614..f3bedb49c 100644 --- a/platformclientv2/socialexpression.go +++ b/platformclientv2/socialexpression.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -89,6 +90,130 @@ type Socialexpression struct { } +func (u *Socialexpression) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Socialexpression + + + StartHoldTime := new(string) + if u.StartHoldTime != nil { + + *StartHoldTime = timeutil.Strftime(u.StartHoldTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartHoldTime = nil + } + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + SocialMediaId *string `json:"socialMediaId,omitempty"` + + SocialMediaHub *string `json:"socialMediaHub,omitempty"` + + SocialUserName *string `json:"socialUserName,omitempty"` + + PreviewText *string `json:"previewText,omitempty"` + + RecordingId *string `json:"recordingId,omitempty"` + + Segments *[]Segment `json:"segments,omitempty"` + + Held *bool `json:"held,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartHoldTime *string `json:"startHoldTime,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Provider *string `json:"provider,omitempty"` + + ScriptId *string `json:"scriptId,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + SocialMediaId: u.SocialMediaId, + + SocialMediaHub: u.SocialMediaHub, + + SocialUserName: u.SocialUserName, + + PreviewText: u.PreviewText, + + RecordingId: u.RecordingId, + + Segments: u.Segments, + + Held: u.Held, + + DisconnectType: u.DisconnectType, + + StartHoldTime: StartHoldTime, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Provider: u.Provider, + + ScriptId: u.ScriptId, + + PeerId: u.PeerId, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Socialexpression) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/socialhandle.go b/platformclientv2/socialhandle.go index 813e43bcd..c6c03845f 100644 --- a/platformclientv2/socialhandle.go +++ b/platformclientv2/socialhandle.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Socialhandle struct { } +func (u *Socialhandle) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Socialhandle + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Socialhandle) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sortitem.go b/platformclientv2/sortitem.go index a16978089..bc1a302a3 100644 --- a/platformclientv2/sortitem.go +++ b/platformclientv2/sortitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Sortitem struct { } +func (u *Sortitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sortitem + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Ascending *bool `json:"ascending,omitempty"` + *Alias + }{ + Name: u.Name, + + Ascending: u.Ascending, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sortitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/sourceplanninggrouprequest.go b/platformclientv2/sourceplanninggrouprequest.go index e34b63520..64b8cac8a 100644 --- a/platformclientv2/sourceplanninggrouprequest.go +++ b/platformclientv2/sourceplanninggrouprequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Sourceplanninggrouprequest struct { } +func (u *Sourceplanninggrouprequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Sourceplanninggrouprequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Sourceplanninggrouprequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/speechtextanalyticssettingsrequest.go b/platformclientv2/speechtextanalyticssettingsrequest.go index fc06c9c89..38217f10f 100644 --- a/platformclientv2/speechtextanalyticssettingsrequest.go +++ b/platformclientv2/speechtextanalyticssettingsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Speechtextanalyticssettingsrequest struct { } +func (u *Speechtextanalyticssettingsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Speechtextanalyticssettingsrequest + + + + return json.Marshal(&struct { + DefaultProgramId *string `json:"defaultProgramId,omitempty"` + + ExpectedDialects *[]string `json:"expectedDialects,omitempty"` + *Alias + }{ + DefaultProgramId: u.DefaultProgramId, + + ExpectedDialects: u.ExpectedDialects, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Speechtextanalyticssettingsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/speechtextanalyticssettingsresponse.go b/platformclientv2/speechtextanalyticssettingsresponse.go index 9ba7ce2d4..f6c92dab2 100644 --- a/platformclientv2/speechtextanalyticssettingsresponse.go +++ b/platformclientv2/speechtextanalyticssettingsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Speechtextanalyticssettingsresponse struct { } +func (u *Speechtextanalyticssettingsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Speechtextanalyticssettingsresponse + + + + return json.Marshal(&struct { + DefaultProgram *Addressableentityref `json:"defaultProgram,omitempty"` + + ExpectedDialects *[]string `json:"expectedDialects,omitempty"` + *Alias + }{ + DefaultProgram: u.DefaultProgram, + + ExpectedDialects: u.ExpectedDialects, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Speechtextanalyticssettingsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventcampaigntopicdatum.go b/platformclientv2/stateventcampaigntopicdatum.go index d33b6cacf..259051971 100644 --- a/platformclientv2/stateventcampaigntopicdatum.go +++ b/platformclientv2/stateventcampaigntopicdatum.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventcampaigntopicdatum struct { } +func (u *Stateventcampaigntopicdatum) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventcampaigntopicdatum + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Stateventcampaigntopicmetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventcampaigntopicdatum) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventcampaigntopicmetric.go b/platformclientv2/stateventcampaigntopicmetric.go index fa576b8f9..419e48486 100644 --- a/platformclientv2/stateventcampaigntopicmetric.go +++ b/platformclientv2/stateventcampaigntopicmetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Stateventcampaigntopicmetric struct { } +func (u *Stateventcampaigntopicmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventcampaigntopicmetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *map[string]float32 `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventcampaigntopicmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventcampaigntopicstatsnotification.go b/platformclientv2/stateventcampaigntopicstatsnotification.go index 042bb689c..b9d64d615 100644 --- a/platformclientv2/stateventcampaigntopicstatsnotification.go +++ b/platformclientv2/stateventcampaigntopicstatsnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventcampaigntopicstatsnotification struct { } +func (u *Stateventcampaigntopicstatsnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventcampaigntopicstatsnotification + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Stateventcampaigntopicdatum `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventcampaigntopicstatsnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventflowoutcometopicdatum.go b/platformclientv2/stateventflowoutcometopicdatum.go index f544fb265..17bece207 100644 --- a/platformclientv2/stateventflowoutcometopicdatum.go +++ b/platformclientv2/stateventflowoutcometopicdatum.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventflowoutcometopicdatum struct { } +func (u *Stateventflowoutcometopicdatum) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventflowoutcometopicdatum + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Stateventflowoutcometopicmetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventflowoutcometopicdatum) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventflowoutcometopicmetric.go b/platformclientv2/stateventflowoutcometopicmetric.go index 007649938..502e2aaea 100644 --- a/platformclientv2/stateventflowoutcometopicmetric.go +++ b/platformclientv2/stateventflowoutcometopicmetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Stateventflowoutcometopicmetric struct { } +func (u *Stateventflowoutcometopicmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventflowoutcometopicmetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *map[string]float32 `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventflowoutcometopicmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventflowoutcometopicstatsnotification.go b/platformclientv2/stateventflowoutcometopicstatsnotification.go index cbc1868d2..f53d2138f 100644 --- a/platformclientv2/stateventflowoutcometopicstatsnotification.go +++ b/platformclientv2/stateventflowoutcometopicstatsnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventflowoutcometopicstatsnotification struct { } +func (u *Stateventflowoutcometopicstatsnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventflowoutcometopicstatsnotification + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Stateventflowoutcometopicdatum `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventflowoutcometopicstatsnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventflowtopicdatum.go b/platformclientv2/stateventflowtopicdatum.go index 834b2b453..874542a19 100644 --- a/platformclientv2/stateventflowtopicdatum.go +++ b/platformclientv2/stateventflowtopicdatum.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventflowtopicdatum struct { } +func (u *Stateventflowtopicdatum) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventflowtopicdatum + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Stateventflowtopicmetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventflowtopicdatum) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventflowtopicmetric.go b/platformclientv2/stateventflowtopicmetric.go index 6eda2208c..928483b01 100644 --- a/platformclientv2/stateventflowtopicmetric.go +++ b/platformclientv2/stateventflowtopicmetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Stateventflowtopicmetric struct { } +func (u *Stateventflowtopicmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventflowtopicmetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *map[string]float32 `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventflowtopicmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventflowtopicstatsnotification.go b/platformclientv2/stateventflowtopicstatsnotification.go index 2b2c685e2..d2c79d8dc 100644 --- a/platformclientv2/stateventflowtopicstatsnotification.go +++ b/platformclientv2/stateventflowtopicstatsnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventflowtopicstatsnotification struct { } +func (u *Stateventflowtopicstatsnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventflowtopicstatsnotification + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Stateventflowtopicdatum `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventflowtopicstatsnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventqueuetopicdatum.go b/platformclientv2/stateventqueuetopicdatum.go index deac17b77..38b73e066 100644 --- a/platformclientv2/stateventqueuetopicdatum.go +++ b/platformclientv2/stateventqueuetopicdatum.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventqueuetopicdatum struct { } +func (u *Stateventqueuetopicdatum) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventqueuetopicdatum + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Stateventqueuetopicmetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventqueuetopicdatum) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventqueuetopicmetric.go b/platformclientv2/stateventqueuetopicmetric.go index 23ce13d99..bc59024e9 100644 --- a/platformclientv2/stateventqueuetopicmetric.go +++ b/platformclientv2/stateventqueuetopicmetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Stateventqueuetopicmetric struct { } +func (u *Stateventqueuetopicmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventqueuetopicmetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *map[string]float32 `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventqueuetopicmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventqueuetopicstatsnotification.go b/platformclientv2/stateventqueuetopicstatsnotification.go index d357ec75f..aba846946 100644 --- a/platformclientv2/stateventqueuetopicstatsnotification.go +++ b/platformclientv2/stateventqueuetopicstatsnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventqueuetopicstatsnotification struct { } +func (u *Stateventqueuetopicstatsnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventqueuetopicstatsnotification + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Stateventqueuetopicdatum `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventqueuetopicstatsnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventusertopicdatum.go b/platformclientv2/stateventusertopicdatum.go index b90968e8c..b45a053a5 100644 --- a/platformclientv2/stateventusertopicdatum.go +++ b/platformclientv2/stateventusertopicdatum.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventusertopicdatum struct { } +func (u *Stateventusertopicdatum) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventusertopicdatum + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Stateventusertopicmetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventusertopicdatum) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventusertopicmetric.go b/platformclientv2/stateventusertopicmetric.go index 93c7af862..a3f2d7ce4 100644 --- a/platformclientv2/stateventusertopicmetric.go +++ b/platformclientv2/stateventusertopicmetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Stateventusertopicmetric struct { } +func (u *Stateventusertopicmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventusertopicmetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *map[string]float32 `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventusertopicmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventusertopicstatsnotification.go b/platformclientv2/stateventusertopicstatsnotification.go index 848c84492..beb79aea9 100644 --- a/platformclientv2/stateventusertopicstatsnotification.go +++ b/platformclientv2/stateventusertopicstatsnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventusertopicstatsnotification struct { } +func (u *Stateventusertopicstatsnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventusertopicstatsnotification + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Stateventusertopicdatum `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventusertopicstatsnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventwrapupcodetopicdatum.go b/platformclientv2/stateventwrapupcodetopicdatum.go index 5d3c115bb..107c61ddd 100644 --- a/platformclientv2/stateventwrapupcodetopicdatum.go +++ b/platformclientv2/stateventwrapupcodetopicdatum.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventwrapupcodetopicdatum struct { } +func (u *Stateventwrapupcodetopicdatum) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventwrapupcodetopicdatum + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Stateventwrapupcodetopicmetric `json:"metrics,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventwrapupcodetopicdatum) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventwrapupcodetopicmetric.go b/platformclientv2/stateventwrapupcodetopicmetric.go index a8bd9760b..a6139430e 100644 --- a/platformclientv2/stateventwrapupcodetopicmetric.go +++ b/platformclientv2/stateventwrapupcodetopicmetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Stateventwrapupcodetopicmetric struct { } +func (u *Stateventwrapupcodetopicmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventwrapupcodetopicmetric + + + + return json.Marshal(&struct { + Metric *string `json:"metric,omitempty"` + + Qualifier *string `json:"qualifier,omitempty"` + + Stats *map[string]float32 `json:"stats,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Qualifier: u.Qualifier, + + Stats: u.Stats, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventwrapupcodetopicmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stateventwrapupcodetopicstatsnotification.go b/platformclientv2/stateventwrapupcodetopicstatsnotification.go index aba07b293..25f437c36 100644 --- a/platformclientv2/stateventwrapupcodetopicstatsnotification.go +++ b/platformclientv2/stateventwrapupcodetopicstatsnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Stateventwrapupcodetopicstatsnotification struct { } +func (u *Stateventwrapupcodetopicstatsnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stateventwrapupcodetopicstatsnotification + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Stateventwrapupcodetopicdatum `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stateventwrapupcodetopicstatsnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/station.go b/platformclientv2/station.go index d36ae1c23..6f54055f4 100644 --- a/platformclientv2/station.go +++ b/platformclientv2/station.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Station struct { } +func (u *Station) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Station + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Status *string `json:"status,omitempty"` + + UserId *string `json:"userId,omitempty"` + + WebRtcUserId *string `json:"webRtcUserId,omitempty"` + + PrimaryEdge *Domainentityref `json:"primaryEdge,omitempty"` + + SecondaryEdge *Domainentityref `json:"secondaryEdge,omitempty"` + + VarType *string `json:"type,omitempty"` + + LineAppearanceId *string `json:"lineAppearanceId,omitempty"` + + WebRtcMediaDscp *int `json:"webRtcMediaDscp,omitempty"` + + WebRtcPersistentEnabled *bool `json:"webRtcPersistentEnabled,omitempty"` + + WebRtcForceTurn *bool `json:"webRtcForceTurn,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Status: u.Status, + + UserId: u.UserId, + + WebRtcUserId: u.WebRtcUserId, + + PrimaryEdge: u.PrimaryEdge, + + SecondaryEdge: u.SecondaryEdge, + + VarType: u.VarType, + + LineAppearanceId: u.LineAppearanceId, + + WebRtcMediaDscp: u.WebRtcMediaDscp, + + WebRtcPersistentEnabled: u.WebRtcPersistentEnabled, + + WebRtcForceTurn: u.WebRtcForceTurn, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Station) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stationentitylisting.go b/platformclientv2/stationentitylisting.go index 1a84d787f..de8aa7efd 100644 --- a/platformclientv2/stationentitylisting.go +++ b/platformclientv2/stationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Stationentitylisting struct { } +func (u *Stationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Station `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/stationsettings.go b/platformclientv2/stationsettings.go index 790de0169..bb06f54c3 100644 --- a/platformclientv2/stationsettings.go +++ b/platformclientv2/stationsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Stationsettings struct { } +func (u *Stationsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Stationsettings + + + + return json.Marshal(&struct { + FreeSeatingConfiguration *Freeseatingconfiguration `json:"freeSeatingConfiguration,omitempty"` + *Alias + }{ + FreeSeatingConfiguration: u.FreeSeatingConfiguration, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Stationsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/statisticalresponse.go b/platformclientv2/statisticalresponse.go index ef6a1e336..da97bf4b8 100644 --- a/platformclientv2/statisticalresponse.go +++ b/platformclientv2/statisticalresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Statisticalresponse struct { } +func (u *Statisticalresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Statisticalresponse + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Metrics *[]Aggregatemetricdata `json:"metrics,omitempty"` + + Views *[]Aggregateviewdata `json:"views,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Metrics: u.Metrics, + + Views: u.Views, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Statisticalresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/statisticalsummary.go b/platformclientv2/statisticalsummary.go index 4ca0325a2..785f88ec5 100644 --- a/platformclientv2/statisticalsummary.go +++ b/platformclientv2/statisticalsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Statisticalsummary struct { } +func (u *Statisticalsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Statisticalsummary + + + + return json.Marshal(&struct { + Max *float32 `json:"max,omitempty"` + + Min *float32 `json:"min,omitempty"` + + Count *int `json:"count,omitempty"` + + CountNegative *int `json:"countNegative,omitempty"` + + CountPositive *int `json:"countPositive,omitempty"` + + Sum *float32 `json:"sum,omitempty"` + + Current *float32 `json:"current,omitempty"` + + Ratio *float32 `json:"ratio,omitempty"` + + Numerator *float32 `json:"numerator,omitempty"` + + Denominator *float32 `json:"denominator,omitempty"` + + Target *float32 `json:"target,omitempty"` + *Alias + }{ + Max: u.Max, + + Min: u.Min, + + Count: u.Count, + + CountNegative: u.CountNegative, + + CountPositive: u.CountPositive, + + Sum: u.Sum, + + Current: u.Current, + + Ratio: u.Ratio, + + Numerator: u.Numerator, + + Denominator: u.Denominator, + + Target: u.Target, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Statisticalsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/statuschange.go b/platformclientv2/statuschange.go index d3a05f55e..4d9427469 100644 --- a/platformclientv2/statuschange.go +++ b/platformclientv2/statuschange.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Statuschange struct { } +func (u *Statuschange) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Statuschange + + + DateStatusChanged := new(string) + if u.DateStatusChanged != nil { + + *DateStatusChanged = timeutil.Strftime(u.DateStatusChanged, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStatusChanged = nil + } + + + return json.Marshal(&struct { + DateStatusChanged *string `json:"dateStatusChanged,omitempty"` + + Status *string `json:"status,omitempty"` + + PreviousStatus *string `json:"previousStatus,omitempty"` + + Message *string `json:"message,omitempty"` + + ChangedBy *string `json:"changedBy,omitempty"` + + RejectReason *string `json:"rejectReason,omitempty"` + *Alias + }{ + DateStatusChanged: DateStatusChanged, + + Status: u.Status, + + PreviousStatus: u.PreviousStatus, + + Message: u.Message, + + ChangedBy: u.ChangedBy, + + RejectReason: u.RejectReason, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Statuschange) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/streetaddress.go b/platformclientv2/streetaddress.go index 96c140675..dfd70317a 100644 --- a/platformclientv2/streetaddress.go +++ b/platformclientv2/streetaddress.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Streetaddress struct { } +func (u *Streetaddress) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Streetaddress + + + + return json.Marshal(&struct { + Country *string `json:"country,omitempty"` + + A1 *string `json:"A1,omitempty"` + + A3 *string `json:"A3,omitempty"` + + RD *string `json:"RD,omitempty"` + + HNO *string `json:"HNO,omitempty"` + + LOC *string `json:"LOC,omitempty"` + + NAM *string `json:"NAM,omitempty"` + + PC *string `json:"PC,omitempty"` + *Alias + }{ + Country: u.Country, + + A1: u.A1, + + A3: u.A3, + + RD: u.RD, + + HNO: u.HNO, + + LOC: u.LOC, + + NAM: u.NAM, + + PC: u.PC, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Streetaddress) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/subjectdivisiongrants.go b/platformclientv2/subjectdivisiongrants.go index 21f8b49c7..5694a5639 100644 --- a/platformclientv2/subjectdivisiongrants.go +++ b/platformclientv2/subjectdivisiongrants.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Subjectdivisiongrants struct { } +func (u *Subjectdivisiongrants) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Subjectdivisiongrants + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Divisions *[]Division `json:"divisions,omitempty"` + + VarType *string `json:"type,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Divisions: u.Divisions, + + VarType: u.VarType, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Subjectdivisiongrants) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/subjectdivisiongrantsentitylisting.go b/platformclientv2/subjectdivisiongrantsentitylisting.go index ae7d01118..a8a155127 100644 --- a/platformclientv2/subjectdivisiongrantsentitylisting.go +++ b/platformclientv2/subjectdivisiongrantsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Subjectdivisiongrantsentitylisting struct { } +func (u *Subjectdivisiongrantsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Subjectdivisiongrantsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Subjectdivisiongrants `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Subjectdivisiongrantsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/subjectdivisions.go b/platformclientv2/subjectdivisions.go index d462a999b..df59c9a49 100644 --- a/platformclientv2/subjectdivisions.go +++ b/platformclientv2/subjectdivisions.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Subjectdivisions struct { } +func (u *Subjectdivisions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Subjectdivisions + + + + return json.Marshal(&struct { + SubjectIds *[]string `json:"subjectIds,omitempty"` + + DivisionIds *[]string `json:"divisionIds,omitempty"` + *Alias + }{ + SubjectIds: u.SubjectIds, + + DivisionIds: u.DivisionIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Subjectdivisions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/subscriberresponse.go b/platformclientv2/subscriberresponse.go index ea85def4a..0eb57caac 100644 --- a/platformclientv2/subscriberresponse.go +++ b/platformclientv2/subscriberresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Subscriberresponse struct { } +func (u *Subscriberresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Subscriberresponse + + + + return json.Marshal(&struct { + MessageReturned *[]string `json:"messageReturned,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + MessageReturned: u.MessageReturned, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Subscriberresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/subscriptionoverviewusage.go b/platformclientv2/subscriptionoverviewusage.go index 82d20e081..fd4acf8fa 100644 --- a/platformclientv2/subscriptionoverviewusage.go +++ b/platformclientv2/subscriptionoverviewusage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -56,6 +57,66 @@ type Subscriptionoverviewusage struct { } +func (u *Subscriptionoverviewusage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Subscriptionoverviewusage + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + PartNumber *string `json:"partNumber,omitempty"` + + Grouping *string `json:"grouping,omitempty"` + + UnitOfMeasureType *string `json:"unitOfMeasureType,omitempty"` + + UsageQuantity *string `json:"usageQuantity,omitempty"` + + OveragePrice *string `json:"overagePrice,omitempty"` + + PrepayQuantity *string `json:"prepayQuantity,omitempty"` + + PrepayPrice *string `json:"prepayPrice,omitempty"` + + UsageNotes *string `json:"usageNotes,omitempty"` + + IsCancellable *bool `json:"isCancellable,omitempty"` + + BundleQuantity *string `json:"bundleQuantity,omitempty"` + + IsThirdParty *bool `json:"isThirdParty,omitempty"` + *Alias + }{ + Name: u.Name, + + PartNumber: u.PartNumber, + + Grouping: u.Grouping, + + UnitOfMeasureType: u.UnitOfMeasureType, + + UsageQuantity: u.UsageQuantity, + + OveragePrice: u.OveragePrice, + + PrepayQuantity: u.PrepayQuantity, + + PrepayPrice: u.PrepayPrice, + + UsageNotes: u.UsageNotes, + + IsCancellable: u.IsCancellable, + + BundleQuantity: u.BundleQuantity, + + IsThirdParty: u.IsThirdParty, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Subscriptionoverviewusage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/suggestsearchcriteria.go b/platformclientv2/suggestsearchcriteria.go index 9da3c93c9..e14fdc93b 100644 --- a/platformclientv2/suggestsearchcriteria.go +++ b/platformclientv2/suggestsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Suggestsearchcriteria struct { } +func (u *Suggestsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Suggestsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Suggestsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Suggestsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/suggestsearchrequest.go b/platformclientv2/suggestsearchrequest.go index da71179a0..910b2c5d4 100644 --- a/platformclientv2/suggestsearchrequest.go +++ b/platformclientv2/suggestsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Suggestsearchrequest struct { } +func (u *Suggestsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Suggestsearchrequest + + + + return json.Marshal(&struct { + Expand *[]string `json:"expand,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Query *[]Suggestsearchcriteria `json:"query,omitempty"` + *Alias + }{ + Expand: u.Expand, + + Types: u.Types, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Suggestsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/supportedcontentreference.go b/platformclientv2/supportedcontentreference.go index 3085d8678..794cccd96 100644 --- a/platformclientv2/supportedcontentreference.go +++ b/platformclientv2/supportedcontentreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Supportedcontentreference struct { } +func (u *Supportedcontentreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Supportedcontentreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + MediaTypes *Mediatypes `json:"mediaTypes,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + + MediaTypes: u.MediaTypes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Supportedcontentreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/supportedlanguage.go b/platformclientv2/supportedlanguage.go index 6b1d35979..bc0b8cc33 100644 --- a/platformclientv2/supportedlanguage.go +++ b/platformclientv2/supportedlanguage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Supportedlanguage struct { } +func (u *Supportedlanguage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Supportedlanguage + + + + return json.Marshal(&struct { + Language *string `json:"language,omitempty"` + + IsDefault *bool `json:"isDefault,omitempty"` + *Alias + }{ + Language: u.Language, + + IsDefault: u.IsDefault, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Supportedlanguage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/survey.go b/platformclientv2/survey.go index 55ead1471..44db2aaa0 100644 --- a/platformclientv2/survey.go +++ b/platformclientv2/survey.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -53,6 +54,70 @@ type Survey struct { } +func (u *Survey) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Survey + + + CompletedDate := new(string) + if u.CompletedDate != nil { + + *CompletedDate = timeutil.Strftime(u.CompletedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CompletedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Conversation *Conversation `json:"conversation,omitempty"` + + SurveyForm *Surveyform `json:"surveyForm,omitempty"` + + Agent *Domainentityref `json:"agent,omitempty"` + + Status *string `json:"status,omitempty"` + + Queue *Queuereference `json:"queue,omitempty"` + + Answers *Surveyscoringset `json:"answers,omitempty"` + + CompletedDate *string `json:"completedDate,omitempty"` + + SurveyErrorDetails *Surveyerrordetails `json:"surveyErrorDetails,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Conversation: u.Conversation, + + SurveyForm: u.SurveyForm, + + Agent: u.Agent, + + Status: u.Status, + + Queue: u.Queue, + + Answers: u.Answers, + + CompletedDate: CompletedDate, + + SurveyErrorDetails: u.SurveyErrorDetails, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Survey) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyaggregatedatacontainer.go b/platformclientv2/surveyaggregatedatacontainer.go index ff6d448c0..faea8321b 100644 --- a/platformclientv2/surveyaggregatedatacontainer.go +++ b/platformclientv2/surveyaggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Surveyaggregatedatacontainer struct { } +func (u *Surveyaggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyaggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyaggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyaggregatequeryclause.go b/platformclientv2/surveyaggregatequeryclause.go index 630944f86..1b43c27be 100644 --- a/platformclientv2/surveyaggregatequeryclause.go +++ b/platformclientv2/surveyaggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Surveyaggregatequeryclause struct { } +func (u *Surveyaggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyaggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Surveyaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyaggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyaggregatequeryfilter.go b/platformclientv2/surveyaggregatequeryfilter.go index 2592e3d64..60959fcdf 100644 --- a/platformclientv2/surveyaggregatequeryfilter.go +++ b/platformclientv2/surveyaggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Surveyaggregatequeryfilter struct { } +func (u *Surveyaggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyaggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Surveyaggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Surveyaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyaggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyaggregatequerypredicate.go b/platformclientv2/surveyaggregatequerypredicate.go index 53269b0cb..588eca64b 100644 --- a/platformclientv2/surveyaggregatequerypredicate.go +++ b/platformclientv2/surveyaggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Surveyaggregatequerypredicate struct { } +func (u *Surveyaggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyaggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyaggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyaggregatequeryresponse.go b/platformclientv2/surveyaggregatequeryresponse.go index e75c09339..512634905 100644 --- a/platformclientv2/surveyaggregatequeryresponse.go +++ b/platformclientv2/surveyaggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Surveyaggregatequeryresponse struct { } +func (u *Surveyaggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyaggregatequeryresponse + + + + return json.Marshal(&struct { + Results *[]Surveyaggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyaggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyaggregationquery.go b/platformclientv2/surveyaggregationquery.go index 7ec003233..836819076 100644 --- a/platformclientv2/surveyaggregationquery.go +++ b/platformclientv2/surveyaggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Surveyaggregationquery struct { } +func (u *Surveyaggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyaggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Surveyaggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Surveyaggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyaggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyaggregationview.go b/platformclientv2/surveyaggregationview.go index 2f1e0785e..21327d7af 100644 --- a/platformclientv2/surveyaggregationview.go +++ b/platformclientv2/surveyaggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Surveyaggregationview struct { } +func (u *Surveyaggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyaggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyaggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyassignment.go b/platformclientv2/surveyassignment.go index 1b3a72197..0d0e248ed 100644 --- a/platformclientv2/surveyassignment.go +++ b/platformclientv2/surveyassignment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Surveyassignment struct { } +func (u *Surveyassignment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyassignment + + + + return json.Marshal(&struct { + SurveyForm *Publishedsurveyformreference `json:"surveyForm,omitempty"` + + Flow *Domainentityref `json:"flow,omitempty"` + + InviteTimeInterval *string `json:"inviteTimeInterval,omitempty"` + + SendingUser *string `json:"sendingUser,omitempty"` + + SendingDomain *string `json:"sendingDomain,omitempty"` + *Alias + }{ + SurveyForm: u.SurveyForm, + + Flow: u.Flow, + + InviteTimeInterval: u.InviteTimeInterval, + + SendingUser: u.SendingUser, + + SendingDomain: u.SendingDomain, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyassignment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveydetailqueryclause.go b/platformclientv2/surveydetailqueryclause.go index 026a4c510..220826d66 100644 --- a/platformclientv2/surveydetailqueryclause.go +++ b/platformclientv2/surveydetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Surveydetailqueryclause struct { } +func (u *Surveydetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveydetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Surveydetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveydetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveydetailqueryfilter.go b/platformclientv2/surveydetailqueryfilter.go index 94c311671..329232ab9 100644 --- a/platformclientv2/surveydetailqueryfilter.go +++ b/platformclientv2/surveydetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Surveydetailqueryfilter struct { } +func (u *Surveydetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveydetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Surveydetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Surveydetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveydetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveydetailquerypredicate.go b/platformclientv2/surveydetailquerypredicate.go index 862a2587a..228837cce 100644 --- a/platformclientv2/surveydetailquerypredicate.go +++ b/platformclientv2/surveydetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Surveydetailquerypredicate struct { } +func (u *Surveydetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveydetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Metric *string `json:"metric,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Metric: u.Metric, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveydetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyerrordetails.go b/platformclientv2/surveyerrordetails.go index 0d7cf8c62..56c95558b 100644 --- a/platformclientv2/surveyerrordetails.go +++ b/platformclientv2/surveyerrordetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Surveyerrordetails struct { } +func (u *Surveyerrordetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyerrordetails + + + + return json.Marshal(&struct { + FlowDiagnosticInfo *Flowdiagnosticinfo `json:"flowDiagnosticInfo,omitempty"` + + SurveyErrorReason *string `json:"surveyErrorReason,omitempty"` + *Alias + }{ + FlowDiagnosticInfo: u.FlowDiagnosticInfo, + + SurveyErrorReason: u.SurveyErrorReason, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyerrordetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyform.go b/platformclientv2/surveyform.go index 77ed1231b..faab6e5e2 100644 --- a/platformclientv2/surveyform.go +++ b/platformclientv2/surveyform.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,74 @@ type Surveyform struct { } +func (u *Surveyform) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyform + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + Published *bool `json:"published,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + ContextId *string `json:"contextId,omitempty"` + + Language *string `json:"language,omitempty"` + + Header *string `json:"header,omitempty"` + + Footer *string `json:"footer,omitempty"` + + QuestionGroups *[]Surveyquestiongroup `json:"questionGroups,omitempty"` + + PublishedVersions *Domainentitylistingsurveyform `json:"publishedVersions,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ModifiedDate: ModifiedDate, + + Published: u.Published, + + Disabled: u.Disabled, + + ContextId: u.ContextId, + + Language: u.Language, + + Header: u.Header, + + Footer: u.Footer, + + QuestionGroups: u.QuestionGroups, + + PublishedVersions: u.PublishedVersions, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyform) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyformandscoringset.go b/platformclientv2/surveyformandscoringset.go index 0598ce023..1426272c7 100644 --- a/platformclientv2/surveyformandscoringset.go +++ b/platformclientv2/surveyformandscoringset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Surveyformandscoringset struct { } +func (u *Surveyformandscoringset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyformandscoringset + + + + return json.Marshal(&struct { + SurveyForm *Surveyform `json:"surveyForm,omitempty"` + + Answers *Surveyscoringset `json:"answers,omitempty"` + *Alias + }{ + SurveyForm: u.SurveyForm, + + Answers: u.Answers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyformandscoringset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyformentitylisting.go b/platformclientv2/surveyformentitylisting.go index 81692ca40..0c2adcf80 100644 --- a/platformclientv2/surveyformentitylisting.go +++ b/platformclientv2/surveyformentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Surveyformentitylisting struct { } +func (u *Surveyformentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyformentitylisting + + + + return json.Marshal(&struct { + Entities *[]Surveyform `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyformentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyquestion.go b/platformclientv2/surveyquestion.go index 2b47e34a7..22ac16fdb 100644 --- a/platformclientv2/surveyquestion.go +++ b/platformclientv2/surveyquestion.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Surveyquestion struct { } +func (u *Surveyquestion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyquestion + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Text *string `json:"text,omitempty"` + + HelpText *string `json:"helpText,omitempty"` + + VarType *string `json:"type,omitempty"` + + NaEnabled *bool `json:"naEnabled,omitempty"` + + VisibilityCondition *Visibilitycondition `json:"visibilityCondition,omitempty"` + + AnswerOptions *[]Answeroption `json:"answerOptions,omitempty"` + + MaxResponseCharacters *int `json:"maxResponseCharacters,omitempty"` + + ExplanationPrompt *string `json:"explanationPrompt,omitempty"` + *Alias + }{ + Id: u.Id, + + Text: u.Text, + + HelpText: u.HelpText, + + VarType: u.VarType, + + NaEnabled: u.NaEnabled, + + VisibilityCondition: u.VisibilityCondition, + + AnswerOptions: u.AnswerOptions, + + MaxResponseCharacters: u.MaxResponseCharacters, + + ExplanationPrompt: u.ExplanationPrompt, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyquestion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyquestiongroup.go b/platformclientv2/surveyquestiongroup.go index efe8d0920..455dad974 100644 --- a/platformclientv2/surveyquestiongroup.go +++ b/platformclientv2/surveyquestiongroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Surveyquestiongroup struct { } +func (u *Surveyquestiongroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyquestiongroup + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + NaEnabled *bool `json:"naEnabled,omitempty"` + + Questions *[]Surveyquestion `json:"questions,omitempty"` + + VisibilityCondition *Visibilitycondition `json:"visibilityCondition,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + NaEnabled: u.NaEnabled, + + Questions: u.Questions, + + VisibilityCondition: u.VisibilityCondition, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyquestiongroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyquestiongroupscore.go b/platformclientv2/surveyquestiongroupscore.go index 6a88656de..6c07e1324 100644 --- a/platformclientv2/surveyquestiongroupscore.go +++ b/platformclientv2/surveyquestiongroupscore.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Surveyquestiongroupscore struct { } +func (u *Surveyquestiongroupscore) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyquestiongroupscore + + + + return json.Marshal(&struct { + QuestionGroupId *string `json:"questionGroupId,omitempty"` + + TotalScore *float32 `json:"totalScore,omitempty"` + + MaxTotalScore *float32 `json:"maxTotalScore,omitempty"` + + MarkedNA *bool `json:"markedNA,omitempty"` + + QuestionScores *[]Surveyquestionscore `json:"questionScores,omitempty"` + *Alias + }{ + QuestionGroupId: u.QuestionGroupId, + + TotalScore: u.TotalScore, + + MaxTotalScore: u.MaxTotalScore, + + MarkedNA: u.MarkedNA, + + QuestionScores: u.QuestionScores, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyquestiongroupscore) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyquestionscore.go b/platformclientv2/surveyquestionscore.go index bc82d9a9b..ef8f37310 100644 --- a/platformclientv2/surveyquestionscore.go +++ b/platformclientv2/surveyquestionscore.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Surveyquestionscore struct { } +func (u *Surveyquestionscore) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyquestionscore + + + + return json.Marshal(&struct { + QuestionId *string `json:"questionId,omitempty"` + + AnswerId *string `json:"answerId,omitempty"` + + Score *int `json:"score,omitempty"` + + MarkedNA *bool `json:"markedNA,omitempty"` + + NpsScore *int `json:"npsScore,omitempty"` + + NpsTextAnswer *string `json:"npsTextAnswer,omitempty"` + + FreeTextAnswer *string `json:"freeTextAnswer,omitempty"` + *Alias + }{ + QuestionId: u.QuestionId, + + AnswerId: u.AnswerId, + + Score: u.Score, + + MarkedNA: u.MarkedNA, + + NpsScore: u.NpsScore, + + NpsTextAnswer: u.NpsTextAnswer, + + FreeTextAnswer: u.FreeTextAnswer, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyquestionscore) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/surveyscoringset.go b/platformclientv2/surveyscoringset.go index 0c96ac7c2..ccd0c6199 100644 --- a/platformclientv2/surveyscoringset.go +++ b/platformclientv2/surveyscoringset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Surveyscoringset struct { } +func (u *Surveyscoringset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Surveyscoringset + + + + return json.Marshal(&struct { + TotalScore *float32 `json:"totalScore,omitempty"` + + NpsScore *int `json:"npsScore,omitempty"` + + QuestionGroupScores *[]Surveyquestiongroupscore `json:"questionGroupScores,omitempty"` + *Alias + }{ + TotalScore: u.TotalScore, + + NpsScore: u.NpsScore, + + QuestionGroupScores: u.QuestionGroupScores, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Surveyscoringset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/systemmessagesystemmessage.go b/platformclientv2/systemmessagesystemmessage.go index 2a62a0606..618a970b2 100644 --- a/platformclientv2/systemmessagesystemmessage.go +++ b/platformclientv2/systemmessagesystemmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Systemmessagesystemmessage struct { } +func (u *Systemmessagesystemmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Systemmessagesystemmessage + + + + return json.Marshal(&struct { + ChannelId *string `json:"channelId,omitempty"` + + SystemTopicType *string `json:"systemTopicType,omitempty"` + + CorrelationId *string `json:"correlationId,omitempty"` + + OrganizationId *string `json:"organizationId,omitempty"` + + UserId *string `json:"userId,omitempty"` + + OauthClientId *string `json:"oauthClientId,omitempty"` + + Reason *string `json:"reason,omitempty"` + + Message *string `json:"message,omitempty"` + + Data *interface{} `json:"data,omitempty"` + *Alias + }{ + ChannelId: u.ChannelId, + + SystemTopicType: u.SystemTopicType, + + CorrelationId: u.CorrelationId, + + OrganizationId: u.OrganizationId, + + UserId: u.UserId, + + OauthClientId: u.OauthClientId, + + Reason: u.Reason, + + Message: u.Message, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Systemmessagesystemmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/systempresence.go b/platformclientv2/systempresence.go index e530ce7d7..39cf8d3df 100644 --- a/platformclientv2/systempresence.go +++ b/platformclientv2/systempresence.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Systempresence struct { } +func (u *Systempresence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Systempresence + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Systempresence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/systemprompt.go b/platformclientv2/systemprompt.go index b19221790..5924280e8 100644 --- a/platformclientv2/systemprompt.go +++ b/platformclientv2/systemprompt.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Systemprompt struct { } +func (u *Systemprompt) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Systemprompt + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Resources *[]Systempromptasset `json:"resources,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Resources: u.Resources, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Systemprompt) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/systempromptasset.go b/platformclientv2/systempromptasset.go index 1a1eeb761..43da3bd08 100644 --- a/platformclientv2/systempromptasset.go +++ b/platformclientv2/systempromptasset.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -64,6 +65,74 @@ type Systempromptasset struct { } +func (u *Systempromptasset) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Systempromptasset + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PromptId *string `json:"promptId,omitempty"` + + Language *string `json:"language,omitempty"` + + DurationSeconds *float64 `json:"durationSeconds,omitempty"` + + MediaUri *string `json:"mediaUri,omitempty"` + + TtsString *string `json:"ttsString,omitempty"` + + Text *string `json:"text,omitempty"` + + UploadUri *string `json:"uploadUri,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + + HasDefault *bool `json:"hasDefault,omitempty"` + + LanguageDefault *bool `json:"languageDefault,omitempty"` + + Tags *map[string][]string `json:"tags,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PromptId: u.PromptId, + + Language: u.Language, + + DurationSeconds: u.DurationSeconds, + + MediaUri: u.MediaUri, + + TtsString: u.TtsString, + + Text: u.Text, + + UploadUri: u.UploadUri, + + UploadStatus: u.UploadStatus, + + HasDefault: u.HasDefault, + + LanguageDefault: u.LanguageDefault, + + Tags: u.Tags, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Systempromptasset) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/systempromptassetentitylisting.go b/platformclientv2/systempromptassetentitylisting.go index e458f3807..36e31e4b6 100644 --- a/platformclientv2/systempromptassetentitylisting.go +++ b/platformclientv2/systempromptassetentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Systempromptassetentitylisting struct { } +func (u *Systempromptassetentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Systempromptassetentitylisting + + + + return json.Marshal(&struct { + Entities *[]Systempromptasset `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Systempromptassetentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/systempromptentitylisting.go b/platformclientv2/systempromptentitylisting.go index 1d9a85b42..092eb6b25 100644 --- a/platformclientv2/systempromptentitylisting.go +++ b/platformclientv2/systempromptentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Systempromptentitylisting struct { } +func (u *Systempromptentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Systempromptentitylisting + + + + return json.Marshal(&struct { + Entities *[]Systemprompt `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Systempromptentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/tagqueryrequest.go b/platformclientv2/tagqueryrequest.go index 993353a09..89809b8cc 100644 --- a/platformclientv2/tagqueryrequest.go +++ b/platformclientv2/tagqueryrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Tagqueryrequest struct { } +func (u *Tagqueryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Tagqueryrequest + + + + return json.Marshal(&struct { + Query *string `json:"query,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + *Alias + }{ + Query: u.Query, + + PageNumber: u.PageNumber, + + PageSize: u.PageSize, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Tagqueryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/tagvalue.go b/platformclientv2/tagvalue.go index c115d09cf..d5a57f148 100644 --- a/platformclientv2/tagvalue.go +++ b/platformclientv2/tagvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Tagvalue struct { } +func (u *Tagvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Tagvalue + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + InUse *bool `json:"inUse,omitempty"` + + Acl *[]string `json:"acl,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + InUse: u.InUse, + + Acl: u.Acl, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Tagvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/tagvalueentitylisting.go b/platformclientv2/tagvalueentitylisting.go index 2de30f4af..f72eaf7d2 100644 --- a/platformclientv2/tagvalueentitylisting.go +++ b/platformclientv2/tagvalueentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Tagvalueentitylisting struct { } +func (u *Tagvalueentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Tagvalueentitylisting + + + + return json.Marshal(&struct { + Entities *[]Tagvalue `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Tagvalueentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/team.go b/platformclientv2/team.go index 53be7d4a6..b468f73b3 100644 --- a/platformclientv2/team.go +++ b/platformclientv2/team.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Team struct { } +func (u *Team) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Team + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + DateModified: DateModified, + + MemberCount: u.MemberCount, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Team) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/templateparameter.go b/platformclientv2/templateparameter.go index d0d15d053..a41f2c25e 100644 --- a/platformclientv2/templateparameter.go +++ b/platformclientv2/templateparameter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Templateparameter struct { } +func (u *Templateparameter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Templateparameter + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Id: u.Id, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Templateparameter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/termattribute.go b/platformclientv2/termattribute.go index efbefa0de..16049a5f1 100644 --- a/platformclientv2/termattribute.go +++ b/platformclientv2/termattribute.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Termattribute struct { } +func (u *Termattribute) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Termattribute + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Termattribute) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/testexecutionoperationresult.go b/platformclientv2/testexecutionoperationresult.go index a9d794ccc..049095daa 100644 --- a/platformclientv2/testexecutionoperationresult.go +++ b/platformclientv2/testexecutionoperationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Testexecutionoperationresult struct { } +func (u *Testexecutionoperationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Testexecutionoperationresult + + + + return json.Marshal(&struct { + Step *int `json:"step,omitempty"` + + Name *string `json:"name,omitempty"` + + Success *bool `json:"success,omitempty"` + + Result *interface{} `json:"result,omitempty"` + + VarError *Errorbody `json:"error,omitempty"` + *Alias + }{ + Step: u.Step, + + Name: u.Name, + + Success: u.Success, + + Result: u.Result, + + VarError: u.VarError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Testexecutionoperationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/testexecutionresult.go b/platformclientv2/testexecutionresult.go index 49d85c2e0..e813abeb8 100644 --- a/platformclientv2/testexecutionresult.go +++ b/platformclientv2/testexecutionresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Testexecutionresult struct { } +func (u *Testexecutionresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Testexecutionresult + + + + return json.Marshal(&struct { + Operations *[]Testexecutionoperationresult `json:"operations,omitempty"` + + VarError *Errorbody `json:"error,omitempty"` + + FinalResult *interface{} `json:"finalResult,omitempty"` + + Success *bool `json:"success,omitempty"` + *Alias + }{ + Operations: u.Operations, + + VarError: u.VarError, + + FinalResult: u.FinalResult, + + Success: u.Success, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Testexecutionresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/testmessage.go b/platformclientv2/testmessage.go index 8509f040f..ddf98e94e 100644 --- a/platformclientv2/testmessage.go +++ b/platformclientv2/testmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Testmessage struct { } +func (u *Testmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Testmessage + + + Time := new(string) + if u.Time != nil { + + *Time = timeutil.Strftime(u.Time, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Time = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + To *[]Emailaddress `json:"to,omitempty"` + + From *Emailaddress `json:"from,omitempty"` + + Subject *string `json:"subject,omitempty"` + + TextBody *string `json:"textBody,omitempty"` + + HtmlBody *string `json:"htmlBody,omitempty"` + + Time *string `json:"time,omitempty"` + *Alias + }{ + Id: u.Id, + + To: u.To, + + From: u.From, + + Subject: u.Subject, + + TextBody: u.TextBody, + + HtmlBody: u.HtmlBody, + + Time: Time, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Testmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotchannel.go b/platformclientv2/textbotchannel.go index 2984283c9..cf73c62b1 100644 --- a/platformclientv2/textbotchannel.go +++ b/platformclientv2/textbotchannel.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Textbotchannel struct { } +func (u *Textbotchannel) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotchannel + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + InputModes *[]string `json:"inputModes,omitempty"` + + OutputModes *[]string `json:"outputModes,omitempty"` + + UserAgent *Textbotuseragent `json:"userAgent,omitempty"` + *Alias + }{ + Name: u.Name, + + InputModes: u.InputModes, + + OutputModes: u.OutputModes, + + UserAgent: u.UserAgent, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotchannel) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotdisconnectaction.go b/platformclientv2/textbotdisconnectaction.go index 969c7bdaf..7aaaf2e3c 100644 --- a/platformclientv2/textbotdisconnectaction.go +++ b/platformclientv2/textbotdisconnectaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Textbotdisconnectaction struct { } +func (u *Textbotdisconnectaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotdisconnectaction + + + + return json.Marshal(&struct { + Reason *string `json:"reason,omitempty"` + + ReasonExtendedInfo *string `json:"reasonExtendedInfo,omitempty"` + + FlowLocation *Textbotflowlocation `json:"flowLocation,omitempty"` + *Alias + }{ + Reason: u.Reason, + + ReasonExtendedInfo: u.ReasonExtendedInfo, + + FlowLocation: u.FlowLocation, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotdisconnectaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textboterrorinputevent.go b/platformclientv2/textboterrorinputevent.go index f25352844..060f7ff52 100644 --- a/platformclientv2/textboterrorinputevent.go +++ b/platformclientv2/textboterrorinputevent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Textboterrorinputevent struct { } +func (u *Textboterrorinputevent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textboterrorinputevent + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textboterrorinputevent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotexitaction.go b/platformclientv2/textbotexitaction.go index 4ec194d49..5ea90c2f3 100644 --- a/platformclientv2/textbotexitaction.go +++ b/platformclientv2/textbotexitaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Textbotexitaction struct { } +func (u *Textbotexitaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotexitaction + + + + return json.Marshal(&struct { + Reason *string `json:"reason,omitempty"` + + ReasonExtendedInfo *string `json:"reasonExtendedInfo,omitempty"` + + ActiveIntent *string `json:"activeIntent,omitempty"` + + FlowLocation *Textbotflowlocation `json:"flowLocation,omitempty"` + + OutputData *Textbotinputoutputdata `json:"outputData,omitempty"` + *Alias + }{ + Reason: u.Reason, + + ReasonExtendedInfo: u.ReasonExtendedInfo, + + ActiveIntent: u.ActiveIntent, + + FlowLocation: u.FlowLocation, + + OutputData: u.OutputData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotexitaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotflow.go b/platformclientv2/textbotflow.go index 676ca3bd2..178c014ac 100644 --- a/platformclientv2/textbotflow.go +++ b/platformclientv2/textbotflow.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotflow struct { } +func (u *Textbotflow) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotflow + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotflow) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotflowlaunchrequest.go b/platformclientv2/textbotflowlaunchrequest.go index 2c2e256da..b7ad95592 100644 --- a/platformclientv2/textbotflowlaunchrequest.go +++ b/platformclientv2/textbotflowlaunchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Textbotflowlaunchrequest struct { } +func (u *Textbotflowlaunchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotflowlaunchrequest + + + + return json.Marshal(&struct { + Flow *Textbotflow `json:"flow,omitempty"` + + ExternalSessionId *string `json:"externalSessionId,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + InputData *Textbotinputoutputdata `json:"inputData,omitempty"` + + Channel *Textbotchannel `json:"channel,omitempty"` + *Alias + }{ + Flow: u.Flow, + + ExternalSessionId: u.ExternalSessionId, + + ConversationId: u.ConversationId, + + InputData: u.InputData, + + Channel: u.Channel, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotflowlaunchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotflowlaunchresponse.go b/platformclientv2/textbotflowlaunchresponse.go index d100aa2d3..3d283755d 100644 --- a/platformclientv2/textbotflowlaunchresponse.go +++ b/platformclientv2/textbotflowlaunchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotflowlaunchresponse struct { } +func (u *Textbotflowlaunchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotflowlaunchresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotflowlaunchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotflowlocation.go b/platformclientv2/textbotflowlocation.go index 3ae49d8f7..a83d5e6b3 100644 --- a/platformclientv2/textbotflowlocation.go +++ b/platformclientv2/textbotflowlocation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Textbotflowlocation struct { } +func (u *Textbotflowlocation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotflowlocation + + + + return json.Marshal(&struct { + ActionName *string `json:"actionName,omitempty"` + + ActionNumber *int `json:"actionNumber,omitempty"` + + SequenceName *string `json:"sequenceName,omitempty"` + *Alias + }{ + ActionName: u.ActionName, + + ActionNumber: u.ActionNumber, + + SequenceName: u.SequenceName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotflowlocation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotflowturnrequest.go b/platformclientv2/textbotflowturnrequest.go index d88c30e6a..e565a6eee 100644 --- a/platformclientv2/textbotflowturnrequest.go +++ b/platformclientv2/textbotflowturnrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Textbotflowturnrequest struct { } +func (u *Textbotflowturnrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotflowturnrequest + + + + return json.Marshal(&struct { + PreviousTurn *Textbotturnreference `json:"previousTurn,omitempty"` + + InputEventType *string `json:"inputEventType,omitempty"` + + InputEventUserInput *Textbotuserinputevent `json:"inputEventUserInput,omitempty"` + + InputEventError *Textboterrorinputevent `json:"inputEventError,omitempty"` + *Alias + }{ + PreviousTurn: u.PreviousTurn, + + InputEventType: u.InputEventType, + + InputEventUserInput: u.InputEventUserInput, + + InputEventError: u.InputEventError, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotflowturnrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotflowturnresponse.go b/platformclientv2/textbotflowturnresponse.go index e26383e1e..fbd2ae055 100644 --- a/platformclientv2/textbotflowturnresponse.go +++ b/platformclientv2/textbotflowturnresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Textbotflowturnresponse struct { } +func (u *Textbotflowturnresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotflowturnresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + PreviousTurn *Textbotturnreference `json:"previousTurn,omitempty"` + + Prompts *Textbotoutputprompts `json:"prompts,omitempty"` + + NextActionType *string `json:"nextActionType,omitempty"` + + NextActionDisconnect *Textbotdisconnectaction `json:"nextActionDisconnect,omitempty"` + + NextActionWaitForInput *Textbotwaitforinputaction `json:"nextActionWaitForInput,omitempty"` + + NextActionExit *Textbotexitaction `json:"nextActionExit,omitempty"` + *Alias + }{ + Id: u.Id, + + PreviousTurn: u.PreviousTurn, + + Prompts: u.Prompts, + + NextActionType: u.NextActionType, + + NextActionDisconnect: u.NextActionDisconnect, + + NextActionWaitForInput: u.NextActionWaitForInput, + + NextActionExit: u.NextActionExit, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotflowturnresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotinputoutputdata.go b/platformclientv2/textbotinputoutputdata.go index e38548366..97794253b 100644 --- a/platformclientv2/textbotinputoutputdata.go +++ b/platformclientv2/textbotinputoutputdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotinputoutputdata struct { } +func (u *Textbotinputoutputdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotinputoutputdata + + + + return json.Marshal(&struct { + Variables *map[string]interface{} `json:"variables,omitempty"` + *Alias + }{ + Variables: u.Variables, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotinputoutputdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotmodeconstraints.go b/platformclientv2/textbotmodeconstraints.go index 1a4b0fd4d..d283612f4 100644 --- a/platformclientv2/textbotmodeconstraints.go +++ b/platformclientv2/textbotmodeconstraints.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotmodeconstraints struct { } +func (u *Textbotmodeconstraints) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotmodeconstraints + + + + return json.Marshal(&struct { + Text *Textbottextmodeconstraints `json:"text,omitempty"` + *Alias + }{ + Text: u.Text, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotmodeconstraints) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotmodeoutputprompts.go b/platformclientv2/textbotmodeoutputprompts.go index 23c0e64d4..d96ac2880 100644 --- a/platformclientv2/textbotmodeoutputprompts.go +++ b/platformclientv2/textbotmodeoutputprompts.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotmodeoutputprompts struct { } +func (u *Textbotmodeoutputprompts) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotmodeoutputprompts + + + + return json.Marshal(&struct { + Segments *[]Textbotpromptsegment `json:"segments,omitempty"` + *Alias + }{ + Segments: u.Segments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotmodeoutputprompts) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotoutputprompts.go b/platformclientv2/textbotoutputprompts.go index 4fa2c5bcf..c1a634ed1 100644 --- a/platformclientv2/textbotoutputprompts.go +++ b/platformclientv2/textbotoutputprompts.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Textbotoutputprompts struct { } +func (u *Textbotoutputprompts) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotoutputprompts + + + + return json.Marshal(&struct { + OutputLanguage *string `json:"outputLanguage,omitempty"` + + TextPrompts *Textbotmodeoutputprompts `json:"textPrompts,omitempty"` + *Alias + }{ + OutputLanguage: u.OutputLanguage, + + TextPrompts: u.TextPrompts, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotoutputprompts) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotpromptsegment.go b/platformclientv2/textbotpromptsegment.go index bec869ad8..8082e41af 100644 --- a/platformclientv2/textbotpromptsegment.go +++ b/platformclientv2/textbotpromptsegment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Textbotpromptsegment struct { } +func (u *Textbotpromptsegment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotpromptsegment + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + VarType *string `json:"type,omitempty"` + + Format *Format `json:"format,omitempty"` + *Alias + }{ + Text: u.Text, + + VarType: u.VarType, + + Format: u.Format, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotpromptsegment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbottextmodeconstraints.go b/platformclientv2/textbottextmodeconstraints.go index af78cacad..652dca0a5 100644 --- a/platformclientv2/textbottextmodeconstraints.go +++ b/platformclientv2/textbottextmodeconstraints.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbottextmodeconstraints struct { } +func (u *Textbottextmodeconstraints) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbottextmodeconstraints + + + + return json.Marshal(&struct { + LanguagePreferences *[]string `json:"languagePreferences,omitempty"` + *Alias + }{ + LanguagePreferences: u.LanguagePreferences, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbottextmodeconstraints) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbottranscript.go b/platformclientv2/textbottranscript.go index f7b636959..db54dadf4 100644 --- a/platformclientv2/textbottranscript.go +++ b/platformclientv2/textbottranscript.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Textbottranscript struct { } +func (u *Textbottranscript) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbottranscript + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Confidence *float32 `json:"confidence,omitempty"` + *Alias + }{ + Text: u.Text, + + Confidence: u.Confidence, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbottranscript) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotturnreference.go b/platformclientv2/textbotturnreference.go index 3ba0fa820..5a64a625d 100644 --- a/platformclientv2/textbotturnreference.go +++ b/platformclientv2/textbotturnreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotturnreference struct { } +func (u *Textbotturnreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotturnreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotturnreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotuseragent.go b/platformclientv2/textbotuseragent.go index 321747e7c..1af80e6a8 100644 --- a/platformclientv2/textbotuseragent.go +++ b/platformclientv2/textbotuseragent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotuseragent struct { } +func (u *Textbotuseragent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotuseragent + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + *Alias + }{ + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotuseragent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotuserinputalternative.go b/platformclientv2/textbotuserinputalternative.go index 533a19f79..1df213a5f 100644 --- a/platformclientv2/textbotuserinputalternative.go +++ b/platformclientv2/textbotuserinputalternative.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotuserinputalternative struct { } +func (u *Textbotuserinputalternative) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotuserinputalternative + + + + return json.Marshal(&struct { + Transcript *Textbottranscript `json:"transcript,omitempty"` + *Alias + }{ + Transcript: u.Transcript, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotuserinputalternative) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotuserinputevent.go b/platformclientv2/textbotuserinputevent.go index 2039d7d31..f817c9cb4 100644 --- a/platformclientv2/textbotuserinputevent.go +++ b/platformclientv2/textbotuserinputevent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Textbotuserinputevent struct { } +func (u *Textbotuserinputevent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotuserinputevent + + + + return json.Marshal(&struct { + Mode *string `json:"mode,omitempty"` + + Alternatives *[]Textbotuserinputalternative `json:"alternatives,omitempty"` + *Alias + }{ + Mode: u.Mode, + + Alternatives: u.Alternatives, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotuserinputevent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textbotwaitforinputaction.go b/platformclientv2/textbotwaitforinputaction.go index 68d4fe30c..75c8a3057 100644 --- a/platformclientv2/textbotwaitforinputaction.go +++ b/platformclientv2/textbotwaitforinputaction.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Textbotwaitforinputaction struct { } +func (u *Textbotwaitforinputaction) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textbotwaitforinputaction + + + + return json.Marshal(&struct { + ModeConstraints *Textbotmodeconstraints `json:"modeConstraints,omitempty"` + *Alias + }{ + ModeConstraints: u.ModeConstraints, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textbotwaitforinputaction) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textmessagelisting.go b/platformclientv2/textmessagelisting.go index dbfb87487..7e112143d 100644 --- a/platformclientv2/textmessagelisting.go +++ b/platformclientv2/textmessagelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Textmessagelisting struct { } +func (u *Textmessagelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textmessagelisting + + + + return json.Marshal(&struct { + Entities *[]Messagedata `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textmessagelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/textstyleproperties.go b/platformclientv2/textstyleproperties.go index 3e6cf38e7..ea3f01e74 100644 --- a/platformclientv2/textstyleproperties.go +++ b/platformclientv2/textstyleproperties.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Textstyleproperties struct { } +func (u *Textstyleproperties) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Textstyleproperties + + + + return json.Marshal(&struct { + Color *string `json:"color,omitempty"` + + Font *string `json:"font,omitempty"` + + FontSize *string `json:"fontSize,omitempty"` + + TextAlign *string `json:"textAlign,omitempty"` + *Alias + }{ + Color: u.Color, + + Font: u.Font, + + FontSize: u.FontSize, + + TextAlign: u.TextAlign, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Textstyleproperties) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ticker.go b/platformclientv2/ticker.go index b35d8037b..ce92d15fd 100644 --- a/platformclientv2/ticker.go +++ b/platformclientv2/ticker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Ticker struct { } +func (u *Ticker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ticker + + + + return json.Marshal(&struct { + Symbol *string `json:"symbol,omitempty"` + + Exchange *string `json:"exchange,omitempty"` + *Alias + }{ + Symbol: u.Symbol, + + Exchange: u.Exchange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ticker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeallowed.go b/platformclientv2/timeallowed.go index 37a90375b..0e0bfbba7 100644 --- a/platformclientv2/timeallowed.go +++ b/platformclientv2/timeallowed.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Timeallowed struct { } +func (u *Timeallowed) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeallowed + + + + return json.Marshal(&struct { + TimeSlots *[]Timeslot `json:"timeSlots,omitempty"` + + TimeZoneId *string `json:"timeZoneId,omitempty"` + + Empty *bool `json:"empty,omitempty"` + *Alias + }{ + TimeSlots: u.TimeSlots, + + TimeZoneId: u.TimeZoneId, + + Empty: u.Empty, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeallowed) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeinterval.go b/platformclientv2/timeinterval.go index 6b8066ac0..017f8cb9e 100644 --- a/platformclientv2/timeinterval.go +++ b/platformclientv2/timeinterval.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Timeinterval struct { } +func (u *Timeinterval) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeinterval + + + + return json.Marshal(&struct { + Months *int `json:"months,omitempty"` + + Weeks *int `json:"weeks,omitempty"` + + Days *int `json:"days,omitempty"` + + Hours *int `json:"hours,omitempty"` + *Alias + }{ + Months: u.Months, + + Weeks: u.Weeks, + + Days: u.Days, + + Hours: u.Hours, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeinterval) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeoffrequest.go b/platformclientv2/timeoffrequest.go index f381d78e5..5ebb96c5a 100644 --- a/platformclientv2/timeoffrequest.go +++ b/platformclientv2/timeoffrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Timeoffrequest struct { } +func (u *Timeoffrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeoffrequest + + + SubmittedDate := new(string) + if u.SubmittedDate != nil { + + *SubmittedDate = timeutil.Strftime(u.SubmittedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SubmittedDate = nil + } + + ReviewedDate := new(string) + if u.ReviewedDate != nil { + + *ReviewedDate = timeutil.Strftime(u.ReviewedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReviewedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *Userreference `json:"user,omitempty"` + + IsFullDayRequest *bool `json:"isFullDayRequest,omitempty"` + + MarkedAsRead *bool `json:"markedAsRead,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Status *string `json:"status,omitempty"` + + PartialDayStartDateTimes *[]time.Time `json:"partialDayStartDateTimes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + + DailyDurationMinutes *int `json:"dailyDurationMinutes,omitempty"` + + Notes *string `json:"notes,omitempty"` + + SubmittedBy *Userreference `json:"submittedBy,omitempty"` + + SubmittedDate *string `json:"submittedDate,omitempty"` + + ReviewedBy *Userreference `json:"reviewedBy,omitempty"` + + ReviewedDate *string `json:"reviewedDate,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + IsFullDayRequest: u.IsFullDayRequest, + + MarkedAsRead: u.MarkedAsRead, + + ActivityCodeId: u.ActivityCodeId, + + Status: u.Status, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + + DailyDurationMinutes: u.DailyDurationMinutes, + + Notes: u.Notes, + + SubmittedBy: u.SubmittedBy, + + SubmittedDate: SubmittedDate, + + ReviewedBy: u.ReviewedBy, + + ReviewedDate: ReviewedDate, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeoffrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeoffrequestlist.go b/platformclientv2/timeoffrequestlist.go index 35575a504..f6fb96041 100644 --- a/platformclientv2/timeoffrequestlist.go +++ b/platformclientv2/timeoffrequestlist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Timeoffrequestlist struct { } +func (u *Timeoffrequestlist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeoffrequestlist + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + TimeOffRequests *[]Timeoffrequestresponse `json:"timeOffRequests,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + TimeOffRequests: u.TimeOffRequests, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeoffrequestlist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeoffrequestlisting.go b/platformclientv2/timeoffrequestlisting.go index 9160c2b75..cd981a27f 100644 --- a/platformclientv2/timeoffrequestlisting.go +++ b/platformclientv2/timeoffrequestlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Timeoffrequestlisting struct { } +func (u *Timeoffrequestlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeoffrequestlisting + + + + return json.Marshal(&struct { + Entities *[]Timeoffrequest `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeoffrequestlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeoffrequestnotification.go b/platformclientv2/timeoffrequestnotification.go index 62dd071a1..0625e9384 100644 --- a/platformclientv2/timeoffrequestnotification.go +++ b/platformclientv2/timeoffrequestnotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,42 @@ type Timeoffrequestnotification struct { } +func (u *Timeoffrequestnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeoffrequestnotification + + + + return json.Marshal(&struct { + TimeOffRequestId *string `json:"timeOffRequestId,omitempty"` + + User *Userreference `json:"user,omitempty"` + + IsFullDayRequest *bool `json:"isFullDayRequest,omitempty"` + + Status *string `json:"status,omitempty"` + + PartialDayStartDateTimes *[]time.Time `json:"partialDayStartDateTimes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + *Alias + }{ + TimeOffRequestId: u.TimeOffRequestId, + + User: u.User, + + IsFullDayRequest: u.IsFullDayRequest, + + Status: u.Status, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeoffrequestnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeoffrequestquerybody.go b/platformclientv2/timeoffrequestquerybody.go index b422892e2..2f4f6326b 100644 --- a/platformclientv2/timeoffrequestquerybody.go +++ b/platformclientv2/timeoffrequestquerybody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Timeoffrequestquerybody struct { } +func (u *Timeoffrequestquerybody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeoffrequestquerybody + + + + return json.Marshal(&struct { + UserIds *[]string `json:"userIds,omitempty"` + + Statuses *[]string `json:"statuses,omitempty"` + + DateRange *Daterange `json:"dateRange,omitempty"` + *Alias + }{ + UserIds: u.UserIds, + + Statuses: u.Statuses, + + DateRange: u.DateRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeoffrequestquerybody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeoffrequestresponse.go b/platformclientv2/timeoffrequestresponse.go index 06c9748b4..6dc890146 100644 --- a/platformclientv2/timeoffrequestresponse.go +++ b/platformclientv2/timeoffrequestresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,114 @@ type Timeoffrequestresponse struct { } +func (u *Timeoffrequestresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeoffrequestresponse + + + SubmittedDate := new(string) + if u.SubmittedDate != nil { + + *SubmittedDate = timeutil.Strftime(u.SubmittedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + SubmittedDate = nil + } + + ReviewedDate := new(string) + if u.ReviewedDate != nil { + + *ReviewedDate = timeutil.Strftime(u.ReviewedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReviewedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *Userreference `json:"user,omitempty"` + + IsFullDayRequest *bool `json:"isFullDayRequest,omitempty"` + + MarkedAsRead *bool `json:"markedAsRead,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Status *string `json:"status,omitempty"` + + PartialDayStartDateTimes *[]time.Time `json:"partialDayStartDateTimes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + + DailyDurationMinutes *int `json:"dailyDurationMinutes,omitempty"` + + Notes *string `json:"notes,omitempty"` + + SubmittedBy *Userreference `json:"submittedBy,omitempty"` + + SubmittedDate *string `json:"submittedDate,omitempty"` + + ReviewedBy *Userreference `json:"reviewedBy,omitempty"` + + ReviewedDate *string `json:"reviewedDate,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + IsFullDayRequest: u.IsFullDayRequest, + + MarkedAsRead: u.MarkedAsRead, + + ActivityCodeId: u.ActivityCodeId, + + Status: u.Status, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + + DailyDurationMinutes: u.DailyDurationMinutes, + + Notes: u.Notes, + + SubmittedBy: u.SubmittedBy, + + SubmittedDate: SubmittedDate, + + ReviewedBy: u.ReviewedBy, + + ReviewedDate: ReviewedDate, + + ModifiedBy: u.ModifiedBy, + + ModifiedDate: ModifiedDate, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeoffrequestresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeoffrequestsettings.go b/platformclientv2/timeoffrequestsettings.go index 3ed04f5c1..e63363797 100644 --- a/platformclientv2/timeoffrequestsettings.go +++ b/platformclientv2/timeoffrequestsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Timeoffrequestsettings struct { } +func (u *Timeoffrequestsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeoffrequestsettings + + + + return json.Marshal(&struct { + SubmissionRangeEnforced *bool `json:"submissionRangeEnforced,omitempty"` + + SubmissionEarliestDaysFromNow *int `json:"submissionEarliestDaysFromNow,omitempty"` + + SubmissionLatestDaysFromNow *int `json:"submissionLatestDaysFromNow,omitempty"` + *Alias + }{ + SubmissionRangeEnforced: u.SubmissionRangeEnforced, + + SubmissionEarliestDaysFromNow: u.SubmissionEarliestDaysFromNow, + + SubmissionLatestDaysFromNow: u.SubmissionLatestDaysFromNow, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeoffrequestsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timeslot.go b/platformclientv2/timeslot.go index bb911ef1c..5e2159a07 100644 --- a/platformclientv2/timeslot.go +++ b/platformclientv2/timeslot.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Timeslot struct { } +func (u *Timeslot) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timeslot + + + + return json.Marshal(&struct { + StartTime *string `json:"startTime,omitempty"` + + StopTime *string `json:"stopTime,omitempty"` + + Day *int `json:"day,omitempty"` + *Alias + }{ + StartTime: u.StartTime, + + StopTime: u.StopTime, + + Day: u.Day, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timeslot) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timezoneentitylisting.go b/platformclientv2/timezoneentitylisting.go index f13ccd4ba..0a96ba883 100644 --- a/platformclientv2/timezoneentitylisting.go +++ b/platformclientv2/timezoneentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Timezoneentitylisting struct { } +func (u *Timezoneentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timezoneentitylisting + + + + return json.Marshal(&struct { + Entities *[]Regiontimezone `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timezoneentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/timezonemappingpreview.go b/platformclientv2/timezonemappingpreview.go index dca82f9ca..fae9c5139 100644 --- a/platformclientv2/timezonemappingpreview.go +++ b/platformclientv2/timezonemappingpreview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Timezonemappingpreview struct { } +func (u *Timezonemappingpreview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Timezonemappingpreview + + + + return json.Marshal(&struct { + ContactList *Domainentityref `json:"contactList,omitempty"` + + ContactsPerTimeZone *map[string]int `json:"contactsPerTimeZone,omitempty"` + + ContactsMappedUsingZipCode *map[string]int `json:"contactsMappedUsingZipCode,omitempty"` + + ContactsMappedToASingleZone *int `json:"contactsMappedToASingleZone,omitempty"` + + ContactsMappedToASingleZoneUsingZipCode *int `json:"contactsMappedToASingleZoneUsingZipCode,omitempty"` + + ContactsMappedToMultipleZones *int `json:"contactsMappedToMultipleZones,omitempty"` + + ContactsMappedToMultipleZonesUsingZipCode *int `json:"contactsMappedToMultipleZonesUsingZipCode,omitempty"` + + ContactsInDefaultWindow *int `json:"contactsInDefaultWindow,omitempty"` + + ContactListSize *int `json:"contactListSize,omitempty"` + *Alias + }{ + ContactList: u.ContactList, + + ContactsPerTimeZone: u.ContactsPerTimeZone, + + ContactsMappedUsingZipCode: u.ContactsMappedUsingZipCode, + + ContactsMappedToASingleZone: u.ContactsMappedToASingleZone, + + ContactsMappedToASingleZoneUsingZipCode: u.ContactsMappedToASingleZoneUsingZipCode, + + ContactsMappedToMultipleZones: u.ContactsMappedToMultipleZones, + + ContactsMappedToMultipleZonesUsingZipCode: u.ContactsMappedToMultipleZonesUsingZipCode, + + ContactsInDefaultWindow: u.ContactsInDefaultWindow, + + ContactListSize: u.ContactListSize, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Timezonemappingpreview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/tokeninfo.go b/platformclientv2/tokeninfo.go index 63c0a1523..098ad8db3 100644 --- a/platformclientv2/tokeninfo.go +++ b/platformclientv2/tokeninfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Tokeninfo struct { } +func (u *Tokeninfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Tokeninfo + + + + return json.Marshal(&struct { + Organization *Namedentity `json:"organization,omitempty"` + + HomeOrganization *Namedentity `json:"homeOrganization,omitempty"` + + AuthorizedScope *[]string `json:"authorizedScope,omitempty"` + + ClonedUser *Tokeninfocloneduser `json:"clonedUser,omitempty"` + + OAuthClient *Orgoauthclient `json:"OAuthClient,omitempty"` + *Alias + }{ + Organization: u.Organization, + + HomeOrganization: u.HomeOrganization, + + AuthorizedScope: u.AuthorizedScope, + + ClonedUser: u.ClonedUser, + + OAuthClient: u.OAuthClient, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Tokeninfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/tokeninfocloneduser.go b/platformclientv2/tokeninfocloneduser.go index 89e810fce..ad3ef3a9a 100644 --- a/platformclientv2/tokeninfocloneduser.go +++ b/platformclientv2/tokeninfocloneduser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Tokeninfocloneduser struct { } +func (u *Tokeninfocloneduser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Tokeninfocloneduser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Organization *Entity `json:"organization,omitempty"` + *Alias + }{ + Id: u.Id, + + Organization: u.Organization, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Tokeninfocloneduser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/topic.go b/platformclientv2/topic.go index 91a687c85..8e1e7eb9f 100644 --- a/platformclientv2/topic.go +++ b/platformclientv2/topic.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Topic struct { } +func (u *Topic) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Topic + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DatePublished := new(string) + if u.DatePublished != nil { + + *DatePublished = timeutil.Strftime(u.DatePublished, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DatePublished = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + Strictness *string `json:"strictness,omitempty"` + + Programs *[]Baseprogramentity `json:"programs,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + Dialect *string `json:"dialect,omitempty"` + + Participants *string `json:"participants,omitempty"` + + Phrases *[]Phrase `json:"phrases,omitempty"` + + ModifiedBy *Addressableentityref `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + PublishedBy *Addressableentityref `json:"publishedBy,omitempty"` + + DatePublished *string `json:"datePublished,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Published: u.Published, + + Strictness: u.Strictness, + + Programs: u.Programs, + + Tags: u.Tags, + + Dialect: u.Dialect, + + Participants: u.Participants, + + Phrases: u.Phrases, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + PublishedBy: u.PublishedBy, + + DatePublished: DatePublished, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Topic) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/topicjob.go b/platformclientv2/topicjob.go index 843ad532d..6de9fc2ba 100644 --- a/platformclientv2/topicjob.go +++ b/platformclientv2/topicjob.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Topicjob struct { } +func (u *Topicjob) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Topicjob + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + Topics *[]Basetopicentitiy `json:"topics,omitempty"` + + CreatedBy *Addressableentityref `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + Topics: u.Topics, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + DateModified: DateModified, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Topicjob) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/topicjobrequest.go b/platformclientv2/topicjobrequest.go index 75db8b313..355fbc08e 100644 --- a/platformclientv2/topicjobrequest.go +++ b/platformclientv2/topicjobrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Topicjobrequest struct { } +func (u *Topicjobrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Topicjobrequest + + + + return json.Marshal(&struct { + TopicIds *[]string `json:"topicIds,omitempty"` + *Alias + }{ + TopicIds: u.TopicIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Topicjobrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/topicrequest.go b/platformclientv2/topicrequest.go index f402c772d..3c7c43571 100644 --- a/platformclientv2/topicrequest.go +++ b/platformclientv2/topicrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Topicrequest struct { } +func (u *Topicrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Topicrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Strictness *string `json:"strictness,omitempty"` + + ProgramIds *[]string `json:"programIds,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + Dialect *string `json:"dialect,omitempty"` + + Participants *string `json:"participants,omitempty"` + + Phrases *[]Phrase `json:"phrases,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + Strictness: u.Strictness, + + ProgramIds: u.ProgramIds, + + Tags: u.Tags, + + Dialect: u.Dialect, + + Participants: u.Participants, + + Phrases: u.Phrases, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Topicrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/topicsentitylisting.go b/platformclientv2/topicsentitylisting.go index 2b3eb27c2..cf0d33a33 100644 --- a/platformclientv2/topicsentitylisting.go +++ b/platformclientv2/topicsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Topicsentitylisting struct { } +func (u *Topicsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Topicsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Listedtopic `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Topicsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/traininglisting.go b/platformclientv2/traininglisting.go index 82d6e621a..d576d1849 100644 --- a/platformclientv2/traininglisting.go +++ b/platformclientv2/traininglisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Traininglisting struct { } +func (u *Traininglisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Traininglisting + + + + return json.Marshal(&struct { + Entities *[]Knowledgetraining `json:"entities,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NextUri: u.NextUri, + + SelfUri: u.SelfUri, + + PreviousUri: u.PreviousUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Traininglisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptaggregatedatacontainer.go b/platformclientv2/transcriptaggregatedatacontainer.go index d740f0ce3..a193bdb71 100644 --- a/platformclientv2/transcriptaggregatedatacontainer.go +++ b/platformclientv2/transcriptaggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Transcriptaggregatedatacontainer struct { } +func (u *Transcriptaggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptaggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptaggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptaggregatequeryclause.go b/platformclientv2/transcriptaggregatequeryclause.go index 89b029e27..386768f7e 100644 --- a/platformclientv2/transcriptaggregatequeryclause.go +++ b/platformclientv2/transcriptaggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Transcriptaggregatequeryclause struct { } +func (u *Transcriptaggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptaggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Transcriptaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptaggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptaggregatequeryfilter.go b/platformclientv2/transcriptaggregatequeryfilter.go index 71d33661e..4cda7d109 100644 --- a/platformclientv2/transcriptaggregatequeryfilter.go +++ b/platformclientv2/transcriptaggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Transcriptaggregatequeryfilter struct { } +func (u *Transcriptaggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptaggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Transcriptaggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Transcriptaggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptaggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptaggregatequerypredicate.go b/platformclientv2/transcriptaggregatequerypredicate.go index 4d6583e8a..c4de36fd2 100644 --- a/platformclientv2/transcriptaggregatequerypredicate.go +++ b/platformclientv2/transcriptaggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Transcriptaggregatequerypredicate struct { } +func (u *Transcriptaggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptaggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptaggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptaggregatequeryresponse.go b/platformclientv2/transcriptaggregatequeryresponse.go index a8cebfc33..41872e9c3 100644 --- a/platformclientv2/transcriptaggregatequeryresponse.go +++ b/platformclientv2/transcriptaggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Transcriptaggregatequeryresponse struct { } +func (u *Transcriptaggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptaggregatequeryresponse + + + + return json.Marshal(&struct { + Results *[]Transcriptaggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptaggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptaggregationquery.go b/platformclientv2/transcriptaggregationquery.go index 5590e2652..8c71121a8 100644 --- a/platformclientv2/transcriptaggregationquery.go +++ b/platformclientv2/transcriptaggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Transcriptaggregationquery struct { } +func (u *Transcriptaggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptaggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Transcriptaggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Transcriptaggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptaggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptaggregationview.go b/platformclientv2/transcriptaggregationview.go index a0d765547..73144eb96 100644 --- a/platformclientv2/transcriptaggregationview.go +++ b/platformclientv2/transcriptaggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Transcriptaggregationview struct { } +func (u *Transcriptaggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptaggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptaggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptconversationdetailsearchcriteria.go b/platformclientv2/transcriptconversationdetailsearchcriteria.go index 2f07d66e4..71ac70047 100644 --- a/platformclientv2/transcriptconversationdetailsearchcriteria.go +++ b/platformclientv2/transcriptconversationdetailsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Transcriptconversationdetailsearchcriteria struct { } +func (u *Transcriptconversationdetailsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptconversationdetailsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Transcriptconversationdetailsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptconversationdetailsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptconversationdetailsearchrequest.go b/platformclientv2/transcriptconversationdetailsearchrequest.go index 00b92aebd..77a622e23 100644 --- a/platformclientv2/transcriptconversationdetailsearchrequest.go +++ b/platformclientv2/transcriptconversationdetailsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Transcriptconversationdetailsearchrequest struct { } +func (u *Transcriptconversationdetailsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptconversationdetailsearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Query *[]Transcriptconversationdetailsearchcriteria `json:"query,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + Types: u.Types, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptconversationdetailsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptionsettings.go b/platformclientv2/transcriptionsettings.go index 90638ffb2..071be8bfe 100644 --- a/platformclientv2/transcriptionsettings.go +++ b/platformclientv2/transcriptionsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Transcriptionsettings struct { } +func (u *Transcriptionsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptionsettings + + + + return json.Marshal(&struct { + Transcription *string `json:"transcription,omitempty"` + + TranscriptionConfidenceThreshold *int `json:"transcriptionConfidenceThreshold,omitempty"` + + ContentSearchEnabled *bool `json:"contentSearchEnabled,omitempty"` + *Alias + }{ + Transcription: u.Transcription, + + TranscriptionConfidenceThreshold: u.TranscriptionConfidenceThreshold, + + ContentSearchEnabled: u.ContentSearchEnabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptionsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptiontopictranscriptalternative.go b/platformclientv2/transcriptiontopictranscriptalternative.go index 7438f27e8..3df8c27ac 100644 --- a/platformclientv2/transcriptiontopictranscriptalternative.go +++ b/platformclientv2/transcriptiontopictranscriptalternative.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Transcriptiontopictranscriptalternative struct { } +func (u *Transcriptiontopictranscriptalternative) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptiontopictranscriptalternative + + + + return json.Marshal(&struct { + Confidence *float32 `json:"confidence,omitempty"` + + OffsetMs *int `json:"offsetMs,omitempty"` + + DurationMs *int `json:"durationMs,omitempty"` + + Transcript *string `json:"transcript,omitempty"` + + Words *[]Transcriptiontopictranscriptword `json:"words,omitempty"` + *Alias + }{ + Confidence: u.Confidence, + + OffsetMs: u.OffsetMs, + + DurationMs: u.DurationMs, + + Transcript: u.Transcript, + + Words: u.Words, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptiontopictranscriptalternative) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptiontopictranscriptionmessage.go b/platformclientv2/transcriptiontopictranscriptionmessage.go index f13ea6bdb..39f3d4fed 100644 --- a/platformclientv2/transcriptiontopictranscriptionmessage.go +++ b/platformclientv2/transcriptiontopictranscriptionmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Transcriptiontopictranscriptionmessage struct { } +func (u *Transcriptiontopictranscriptionmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptiontopictranscriptionmessage + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + + return json.Marshal(&struct { + EventTime *string `json:"eventTime,omitempty"` + + OrganizationId *string `json:"organizationId,omitempty"` + + ConversationId *string `json:"conversationId,omitempty"` + + CommunicationId *string `json:"communicationId,omitempty"` + + SessionStartTimeMs *int `json:"sessionStartTimeMs,omitempty"` + + TranscriptionStartTimeMs *int `json:"transcriptionStartTimeMs,omitempty"` + + Transcripts *[]Transcriptiontopictranscriptresult `json:"transcripts,omitempty"` + + Status *Transcriptiontopictranscriptionrequeststatus `json:"status,omitempty"` + *Alias + }{ + EventTime: EventTime, + + OrganizationId: u.OrganizationId, + + ConversationId: u.ConversationId, + + CommunicationId: u.CommunicationId, + + SessionStartTimeMs: u.SessionStartTimeMs, + + TranscriptionStartTimeMs: u.TranscriptionStartTimeMs, + + Transcripts: u.Transcripts, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptiontopictranscriptionmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptiontopictranscriptionrequeststatus.go b/platformclientv2/transcriptiontopictranscriptionrequeststatus.go index ab68db951..ba8393040 100644 --- a/platformclientv2/transcriptiontopictranscriptionrequeststatus.go +++ b/platformclientv2/transcriptiontopictranscriptionrequeststatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Transcriptiontopictranscriptionrequeststatus struct { } +func (u *Transcriptiontopictranscriptionrequeststatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptiontopictranscriptionrequeststatus + + + + return json.Marshal(&struct { + OffsetMs *int `json:"offsetMs,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + OffsetMs: u.OffsetMs, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptiontopictranscriptionrequeststatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptiontopictranscriptresult.go b/platformclientv2/transcriptiontopictranscriptresult.go index 61532557f..3c65a5b62 100644 --- a/platformclientv2/transcriptiontopictranscriptresult.go +++ b/platformclientv2/transcriptiontopictranscriptresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Transcriptiontopictranscriptresult struct { } +func (u *Transcriptiontopictranscriptresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptiontopictranscriptresult + + + + return json.Marshal(&struct { + UtteranceId *string `json:"utteranceId,omitempty"` + + IsFinal *bool `json:"isFinal,omitempty"` + + Channel *string `json:"channel,omitempty"` + + Alternatives *[]Transcriptiontopictranscriptalternative `json:"alternatives,omitempty"` + + AgentAssistantId *string `json:"agentAssistantId,omitempty"` + + EngineId *string `json:"engineId,omitempty"` + + Dialect *string `json:"dialect,omitempty"` + + SpeechTextAnalyticsProgramId *string `json:"speechTextAnalyticsProgramId,omitempty"` + + AgentAssistEnabled *bool `json:"agentAssistEnabled,omitempty"` + + VoiceTranscriptionEnabled *bool `json:"voiceTranscriptionEnabled,omitempty"` + *Alias + }{ + UtteranceId: u.UtteranceId, + + IsFinal: u.IsFinal, + + Channel: u.Channel, + + Alternatives: u.Alternatives, + + AgentAssistantId: u.AgentAssistantId, + + EngineId: u.EngineId, + + Dialect: u.Dialect, + + SpeechTextAnalyticsProgramId: u.SpeechTextAnalyticsProgramId, + + AgentAssistEnabled: u.AgentAssistEnabled, + + VoiceTranscriptionEnabled: u.VoiceTranscriptionEnabled, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptiontopictranscriptresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptiontopictranscriptword.go b/platformclientv2/transcriptiontopictranscriptword.go index d0b0196b5..49ea61200 100644 --- a/platformclientv2/transcriptiontopictranscriptword.go +++ b/platformclientv2/transcriptiontopictranscriptword.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Transcriptiontopictranscriptword struct { } +func (u *Transcriptiontopictranscriptword) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptiontopictranscriptword + + + + return json.Marshal(&struct { + Confidence *float32 `json:"confidence,omitempty"` + + StartTimeMs *int `json:"startTimeMs,omitempty"` + + OffsetMs *int `json:"offsetMs,omitempty"` + + DurationMs *int `json:"durationMs,omitempty"` + + Word *string `json:"word,omitempty"` + *Alias + }{ + Confidence: u.Confidence, + + StartTimeMs: u.StartTimeMs, + + OffsetMs: u.OffsetMs, + + DurationMs: u.DurationMs, + + Word: u.Word, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptiontopictranscriptword) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcripts.go b/platformclientv2/transcripts.go index 98c5eed4e..c1b6ce4f0 100644 --- a/platformclientv2/transcripts.go +++ b/platformclientv2/transcripts.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Transcripts struct { } +func (u *Transcripts) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcripts + + + + return json.Marshal(&struct { + ExactMatch *[]string `json:"exactMatch,omitempty"` + + Contains *[]string `json:"contains,omitempty"` + + DoesNotContain *[]string `json:"doesNotContain,omitempty"` + *Alias + }{ + ExactMatch: u.ExactMatch, + + Contains: u.Contains, + + DoesNotContain: u.DoesNotContain, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcripts) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptsearchcriteria.go b/platformclientv2/transcriptsearchcriteria.go index 62d85d35f..761e3b697 100644 --- a/platformclientv2/transcriptsearchcriteria.go +++ b/platformclientv2/transcriptsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Transcriptsearchcriteria struct { } +func (u *Transcriptsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Transcriptsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcriptsearchrequest.go b/platformclientv2/transcriptsearchrequest.go index f462418e4..f317dc6d0 100644 --- a/platformclientv2/transcriptsearchrequest.go +++ b/platformclientv2/transcriptsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Transcriptsearchrequest struct { } +func (u *Transcriptsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcriptsearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + ReturnFields *[]string `json:"returnFields,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Query *[]Transcriptsearchcriteria `json:"query,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + ReturnFields: u.ReturnFields, + + Types: u.Types, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcriptsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transcripturl.go b/platformclientv2/transcripturl.go index 0f7dc35e3..3a6377b59 100644 --- a/platformclientv2/transcripturl.go +++ b/platformclientv2/transcripturl.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Transcripturl struct { } +func (u *Transcripturl) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transcripturl + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + *Alias + }{ + Url: u.Url, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transcripturl) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/transferrequest.go b/platformclientv2/transferrequest.go index 32e45c7db..324148fb4 100644 --- a/platformclientv2/transferrequest.go +++ b/platformclientv2/transferrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Transferrequest struct { } +func (u *Transferrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Transferrequest + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + Address *string `json:"address,omitempty"` + + UserName *string `json:"userName,omitempty"` + + QueueId *string `json:"queueId,omitempty"` + + Voicemail *bool `json:"voicemail,omitempty"` + *Alias + }{ + UserId: u.UserId, + + Address: u.Address, + + UserName: u.UserName, + + QueueId: u.QueueId, + + Voicemail: u.Voicemail, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Transferrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunk.go b/platformclientv2/trunk.go index fbde2f485..3e808cc82 100644 --- a/platformclientv2/trunk.go +++ b/platformclientv2/trunk.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -121,6 +122,146 @@ type Trunk struct { } +func (u *Trunk) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunk + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + TrunkType *string `json:"trunkType,omitempty"` + + Edge *Domainentityref `json:"edge,omitempty"` + + TrunkBase *Domainentityref `json:"trunkBase,omitempty"` + + TrunkMetabase *Domainentityref `json:"trunkMetabase,omitempty"` + + EdgeGroup *Domainentityref `json:"edgeGroup,omitempty"` + + InService *bool `json:"inService,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + LogicalInterface *Domainentityref `json:"logicalInterface,omitempty"` + + ConnectedStatus *Trunkconnectedstatus `json:"connectedStatus,omitempty"` + + OptionsStatus *[]Trunkmetricsoptions `json:"optionsStatus,omitempty"` + + RegistersStatus *[]Trunkmetricsregisters `json:"registersStatus,omitempty"` + + IpStatus *Trunkmetricsnetworktypeip `json:"ipStatus,omitempty"` + + OptionsEnabledStatus *string `json:"optionsEnabledStatus,omitempty"` + + RegistersEnabledStatus *string `json:"registersEnabledStatus,omitempty"` + + Family *int `json:"family,omitempty"` + + ProxyAddressList *[]string `json:"proxyAddressList,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + TrunkType: u.TrunkType, + + Edge: u.Edge, + + TrunkBase: u.TrunkBase, + + TrunkMetabase: u.TrunkMetabase, + + EdgeGroup: u.EdgeGroup, + + InService: u.InService, + + Enabled: u.Enabled, + + LogicalInterface: u.LogicalInterface, + + ConnectedStatus: u.ConnectedStatus, + + OptionsStatus: u.OptionsStatus, + + RegistersStatus: u.RegistersStatus, + + IpStatus: u.IpStatus, + + OptionsEnabledStatus: u.OptionsEnabledStatus, + + RegistersEnabledStatus: u.RegistersEnabledStatus, + + Family: u.Family, + + ProxyAddressList: u.ProxyAddressList, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunk) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkbase.go b/platformclientv2/trunkbase.go index 6e4294b21..265cd17bd 100644 --- a/platformclientv2/trunkbase.go +++ b/platformclientv2/trunkbase.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,98 @@ type Trunkbase struct { } +func (u *Trunkbase) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkbase + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Version *int `json:"version,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + State *string `json:"state,omitempty"` + + ModifiedByApp *string `json:"modifiedByApp,omitempty"` + + CreatedByApp *string `json:"createdByApp,omitempty"` + + TrunkMetabase *Domainentityref `json:"trunkMetabase,omitempty"` + + Properties *map[string]interface{} `json:"properties,omitempty"` + + TrunkType *string `json:"trunkType,omitempty"` + + Managed *bool `json:"managed,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Version: u.Version, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + State: u.State, + + ModifiedByApp: u.ModifiedByApp, + + CreatedByApp: u.CreatedByApp, + + TrunkMetabase: u.TrunkMetabase, + + Properties: u.Properties, + + TrunkType: u.TrunkType, + + Managed: u.Managed, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkbase) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkbaseassignment.go b/platformclientv2/trunkbaseassignment.go index 5a469b0ad..ceb0955b6 100644 --- a/platformclientv2/trunkbaseassignment.go +++ b/platformclientv2/trunkbaseassignment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trunkbaseassignment struct { } +func (u *Trunkbaseassignment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkbaseassignment + + + + return json.Marshal(&struct { + Family *int `json:"family,omitempty"` + + TrunkBase *Trunkbase `json:"trunkBase,omitempty"` + *Alias + }{ + Family: u.Family, + + TrunkBase: u.TrunkBase, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkbaseassignment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkbaseentitylisting.go b/platformclientv2/trunkbaseentitylisting.go index f0ce9b311..60470ea21 100644 --- a/platformclientv2/trunkbaseentitylisting.go +++ b/platformclientv2/trunkbaseentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Trunkbaseentitylisting struct { } +func (u *Trunkbaseentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkbaseentitylisting + + + + return json.Marshal(&struct { + Entities *[]Trunkbase `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkbaseentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkconnectedstatus.go b/platformclientv2/trunkconnectedstatus.go index 870093849..a3b7bb412 100644 --- a/platformclientv2/trunkconnectedstatus.go +++ b/platformclientv2/trunkconnectedstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Trunkconnectedstatus struct { } +func (u *Trunkconnectedstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkconnectedstatus + + + ConnectedStateTime := new(string) + if u.ConnectedStateTime != nil { + + *ConnectedStateTime = timeutil.Strftime(u.ConnectedStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedStateTime = nil + } + + + return json.Marshal(&struct { + Connected *bool `json:"connected,omitempty"` + + ConnectedStateTime *string `json:"connectedStateTime,omitempty"` + *Alias + }{ + Connected: u.Connected, + + ConnectedStateTime: ConnectedStateTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkconnectedstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkentitylisting.go b/platformclientv2/trunkentitylisting.go index 85f1ca6a6..ecc77a8aa 100644 --- a/platformclientv2/trunkentitylisting.go +++ b/platformclientv2/trunkentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Trunkentitylisting struct { } +func (u *Trunkentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkentitylisting + + + + return json.Marshal(&struct { + Entities *[]Trunk `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkerrorinfo.go b/platformclientv2/trunkerrorinfo.go index 184c30ab6..63563bd18 100644 --- a/platformclientv2/trunkerrorinfo.go +++ b/platformclientv2/trunkerrorinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Trunkerrorinfo struct { } +func (u *Trunkerrorinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkerrorinfo + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Code *string `json:"code,omitempty"` + + Details *Trunkerrorinfodetails `json:"details,omitempty"` + *Alias + }{ + Text: u.Text, + + Code: u.Code, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkerrorinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkerrorinfodetails.go b/platformclientv2/trunkerrorinfodetails.go index 055b2ad0c..af7b60174 100644 --- a/platformclientv2/trunkerrorinfodetails.go +++ b/platformclientv2/trunkerrorinfodetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Trunkerrorinfodetails struct { } +func (u *Trunkerrorinfodetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkerrorinfodetails + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + Hostname *string `json:"hostname,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + Hostname: u.Hostname, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkerrorinfodetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkinstancetopictrunk.go b/platformclientv2/trunkinstancetopictrunk.go index 3af81caee..6e3fc8bc5 100644 --- a/platformclientv2/trunkinstancetopictrunk.go +++ b/platformclientv2/trunkinstancetopictrunk.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Trunkinstancetopictrunk struct { } +func (u *Trunkinstancetopictrunk) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkinstancetopictrunk + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ConnectedStatus *Trunkinstancetopictrunkconnectedstatus `json:"connectedStatus,omitempty"` + + OptionsStatus *[]Trunkinstancetopictrunkmetricsoptions `json:"optionsStatus,omitempty"` + + RegistersStatus *[]Trunkinstancetopictrunkmetricsregisters `json:"registersStatus,omitempty"` + + IpStatus *Trunkinstancetopictrunkmetricsnetworktypeip `json:"ipStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + ConnectedStatus: u.ConnectedStatus, + + OptionsStatus: u.OptionsStatus, + + RegistersStatus: u.RegistersStatus, + + IpStatus: u.IpStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkinstancetopictrunk) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkinstancetopictrunkconnectedstatus.go b/platformclientv2/trunkinstancetopictrunkconnectedstatus.go index c73eb92b6..545488437 100644 --- a/platformclientv2/trunkinstancetopictrunkconnectedstatus.go +++ b/platformclientv2/trunkinstancetopictrunkconnectedstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Trunkinstancetopictrunkconnectedstatus struct { } +func (u *Trunkinstancetopictrunkconnectedstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkinstancetopictrunkconnectedstatus + + + ConnectedStateTime := new(string) + if u.ConnectedStateTime != nil { + + *ConnectedStateTime = timeutil.Strftime(u.ConnectedStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedStateTime = nil + } + + + return json.Marshal(&struct { + Connected *bool `json:"connected,omitempty"` + + ConnectedStateTime *string `json:"connectedStateTime,omitempty"` + *Alias + }{ + Connected: u.Connected, + + ConnectedStateTime: ConnectedStateTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkinstancetopictrunkconnectedstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkinstancetopictrunkerrorinfo.go b/platformclientv2/trunkinstancetopictrunkerrorinfo.go index 710cec4dd..45c794a6b 100644 --- a/platformclientv2/trunkinstancetopictrunkerrorinfo.go +++ b/platformclientv2/trunkinstancetopictrunkerrorinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Trunkinstancetopictrunkerrorinfo struct { } +func (u *Trunkinstancetopictrunkerrorinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkinstancetopictrunkerrorinfo + + + + return json.Marshal(&struct { + Text *string `json:"text,omitempty"` + + Code *string `json:"code,omitempty"` + + Details *Trunkinstancetopictrunkerrorinfodetails `json:"details,omitempty"` + *Alias + }{ + Text: u.Text, + + Code: u.Code, + + Details: u.Details, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkinstancetopictrunkerrorinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkinstancetopictrunkerrorinfodetails.go b/platformclientv2/trunkinstancetopictrunkerrorinfodetails.go index 6a4e2585a..a9084e34a 100644 --- a/platformclientv2/trunkinstancetopictrunkerrorinfodetails.go +++ b/platformclientv2/trunkinstancetopictrunkerrorinfodetails.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Trunkinstancetopictrunkerrorinfodetails struct { } +func (u *Trunkinstancetopictrunkerrorinfodetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkinstancetopictrunkerrorinfodetails + + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Message *string `json:"message,omitempty"` + + Hostname *string `json:"hostname,omitempty"` + *Alias + }{ + Code: u.Code, + + Message: u.Message, + + Hostname: u.Hostname, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkinstancetopictrunkerrorinfodetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkinstancetopictrunkmetricsnetworktypeip.go b/platformclientv2/trunkinstancetopictrunkmetricsnetworktypeip.go index a342437dc..b3867dbc4 100644 --- a/platformclientv2/trunkinstancetopictrunkmetricsnetworktypeip.go +++ b/platformclientv2/trunkinstancetopictrunkmetricsnetworktypeip.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trunkinstancetopictrunkmetricsnetworktypeip struct { } +func (u *Trunkinstancetopictrunkmetricsnetworktypeip) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkinstancetopictrunkmetricsnetworktypeip + + + + return json.Marshal(&struct { + Address *string `json:"address,omitempty"` + + ErrorInfo *Trunkinstancetopictrunkerrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + Address: u.Address, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkinstancetopictrunkmetricsnetworktypeip) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkinstancetopictrunkmetricsoptions.go b/platformclientv2/trunkinstancetopictrunkmetricsoptions.go index 076fd112a..b8277b394 100644 --- a/platformclientv2/trunkinstancetopictrunkmetricsoptions.go +++ b/platformclientv2/trunkinstancetopictrunkmetricsoptions.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Trunkinstancetopictrunkmetricsoptions struct { } +func (u *Trunkinstancetopictrunkmetricsoptions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkinstancetopictrunkmetricsoptions + + + OptionStateTime := new(string) + if u.OptionStateTime != nil { + + *OptionStateTime = timeutil.Strftime(u.OptionStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + OptionStateTime = nil + } + + + return json.Marshal(&struct { + ProxyAddress *string `json:"proxyAddress,omitempty"` + + OptionState *bool `json:"optionState,omitempty"` + + OptionStateTime *string `json:"optionStateTime,omitempty"` + + ErrorInfo *Trunkinstancetopictrunkerrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + ProxyAddress: u.ProxyAddress, + + OptionState: u.OptionState, + + OptionStateTime: OptionStateTime, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkinstancetopictrunkmetricsoptions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkinstancetopictrunkmetricsregisters.go b/platformclientv2/trunkinstancetopictrunkmetricsregisters.go index 778345ed1..3acce969c 100644 --- a/platformclientv2/trunkinstancetopictrunkmetricsregisters.go +++ b/platformclientv2/trunkinstancetopictrunkmetricsregisters.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Trunkinstancetopictrunkmetricsregisters struct { } +func (u *Trunkinstancetopictrunkmetricsregisters) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkinstancetopictrunkmetricsregisters + + + RegisterStateTime := new(string) + if u.RegisterStateTime != nil { + + *RegisterStateTime = timeutil.Strftime(u.RegisterStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RegisterStateTime = nil + } + + + return json.Marshal(&struct { + ProxyAddress *string `json:"proxyAddress,omitempty"` + + RegisterState *bool `json:"registerState,omitempty"` + + RegisterStateTime *string `json:"registerStateTime,omitempty"` + + ErrorInfo *Trunkinstancetopictrunkerrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + ProxyAddress: u.ProxyAddress, + + RegisterState: u.RegisterState, + + RegisterStateTime: RegisterStateTime, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkinstancetopictrunkmetricsregisters) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetabaseentitylisting.go b/platformclientv2/trunkmetabaseentitylisting.go index b3e717584..e082d4c0b 100644 --- a/platformclientv2/trunkmetabaseentitylisting.go +++ b/platformclientv2/trunkmetabaseentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Trunkmetabaseentitylisting struct { } +func (u *Trunkmetabaseentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetabaseentitylisting + + + + return json.Marshal(&struct { + Entities *[]Metabase `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetabaseentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetrics.go b/platformclientv2/trunkmetrics.go index e4fdae1f0..2f2b9b146 100644 --- a/platformclientv2/trunkmetrics.go +++ b/platformclientv2/trunkmetrics.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Trunkmetrics struct { } +func (u *Trunkmetrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetrics + + + EventTime := new(string) + if u.EventTime != nil { + + *EventTime = timeutil.Strftime(u.EventTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EventTime = nil + } + + + return json.Marshal(&struct { + EventTime *string `json:"eventTime,omitempty"` + + LogicalInterface *Domainentityref `json:"logicalInterface,omitempty"` + + Trunk *Domainentityref `json:"trunk,omitempty"` + + Calls *Trunkmetricscalls `json:"calls,omitempty"` + + Qos *Trunkmetricsqos `json:"qos,omitempty"` + *Alias + }{ + EventTime: EventTime, + + LogicalInterface: u.LogicalInterface, + + Trunk: u.Trunk, + + Calls: u.Calls, + + Qos: u.Qos, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricscalls.go b/platformclientv2/trunkmetricscalls.go index b41fdf106..06aa929d1 100644 --- a/platformclientv2/trunkmetricscalls.go +++ b/platformclientv2/trunkmetricscalls.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trunkmetricscalls struct { } +func (u *Trunkmetricscalls) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricscalls + + + + return json.Marshal(&struct { + InboundCallCount *int `json:"inboundCallCount,omitempty"` + + OutboundCallCount *int `json:"outboundCallCount,omitempty"` + *Alias + }{ + InboundCallCount: u.InboundCallCount, + + OutboundCallCount: u.OutboundCallCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricscalls) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricsnetworktypeip.go b/platformclientv2/trunkmetricsnetworktypeip.go index 83ade1928..2382b8edb 100644 --- a/platformclientv2/trunkmetricsnetworktypeip.go +++ b/platformclientv2/trunkmetricsnetworktypeip.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trunkmetricsnetworktypeip struct { } +func (u *Trunkmetricsnetworktypeip) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricsnetworktypeip + + + + return json.Marshal(&struct { + Address *string `json:"address,omitempty"` + + ErrorInfo *Trunkerrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + Address: u.Address, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricsnetworktypeip) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricsoptions.go b/platformclientv2/trunkmetricsoptions.go index af599da84..f432b0b0f 100644 --- a/platformclientv2/trunkmetricsoptions.go +++ b/platformclientv2/trunkmetricsoptions.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Trunkmetricsoptions struct { } +func (u *Trunkmetricsoptions) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricsoptions + + + OptionStateTime := new(string) + if u.OptionStateTime != nil { + + *OptionStateTime = timeutil.Strftime(u.OptionStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + OptionStateTime = nil + } + + + return json.Marshal(&struct { + ProxyAddress *string `json:"proxyAddress,omitempty"` + + OptionState *bool `json:"optionState,omitempty"` + + OptionStateTime *string `json:"optionStateTime,omitempty"` + + ErrorInfo *Trunkerrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + ProxyAddress: u.ProxyAddress, + + OptionState: u.OptionState, + + OptionStateTime: OptionStateTime, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricsoptions) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricsqos.go b/platformclientv2/trunkmetricsqos.go index 7e7877729..a8b186c79 100644 --- a/platformclientv2/trunkmetricsqos.go +++ b/platformclientv2/trunkmetricsqos.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Trunkmetricsqos struct { } +func (u *Trunkmetricsqos) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricsqos + + + + return json.Marshal(&struct { + MismatchCount *int `json:"mismatchCount,omitempty"` + *Alias + }{ + MismatchCount: u.MismatchCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricsqos) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricsregisters.go b/platformclientv2/trunkmetricsregisters.go index 4bd6f370e..e6f646ff4 100644 --- a/platformclientv2/trunkmetricsregisters.go +++ b/platformclientv2/trunkmetricsregisters.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Trunkmetricsregisters struct { } +func (u *Trunkmetricsregisters) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricsregisters + + + RegisterStateTime := new(string) + if u.RegisterStateTime != nil { + + *RegisterStateTime = timeutil.Strftime(u.RegisterStateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RegisterStateTime = nil + } + + + return json.Marshal(&struct { + ProxyAddress *string `json:"proxyAddress,omitempty"` + + RegisterState *bool `json:"registerState,omitempty"` + + RegisterStateTime *string `json:"registerStateTime,omitempty"` + + ErrorInfo *Trunkerrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + ProxyAddress: u.ProxyAddress, + + RegisterState: u.RegisterState, + + RegisterStateTime: RegisterStateTime, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricsregisters) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricstopictrunkmetrics.go b/platformclientv2/trunkmetricstopictrunkmetrics.go index b349daea0..dcce57a68 100644 --- a/platformclientv2/trunkmetricstopictrunkmetrics.go +++ b/platformclientv2/trunkmetricstopictrunkmetrics.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Trunkmetricstopictrunkmetrics struct { } +func (u *Trunkmetricstopictrunkmetrics) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricstopictrunkmetrics + + + + return json.Marshal(&struct { + Calls *Trunkmetricstopictrunkmetricscalls `json:"calls,omitempty"` + + Qos *Trunkmetricstopictrunkmetricsqos `json:"qos,omitempty"` + + Trunk *Trunkmetricstopicurireference `json:"trunk,omitempty"` + *Alias + }{ + Calls: u.Calls, + + Qos: u.Qos, + + Trunk: u.Trunk, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricstopictrunkmetrics) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricstopictrunkmetricscalls.go b/platformclientv2/trunkmetricstopictrunkmetricscalls.go index 43b0feecd..2cf23ddc4 100644 --- a/platformclientv2/trunkmetricstopictrunkmetricscalls.go +++ b/platformclientv2/trunkmetricstopictrunkmetricscalls.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trunkmetricstopictrunkmetricscalls struct { } +func (u *Trunkmetricstopictrunkmetricscalls) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricstopictrunkmetricscalls + + + + return json.Marshal(&struct { + InboundCallCount *int `json:"inboundCallCount,omitempty"` + + OutboundCallCount *int `json:"outboundCallCount,omitempty"` + *Alias + }{ + InboundCallCount: u.InboundCallCount, + + OutboundCallCount: u.OutboundCallCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricstopictrunkmetricscalls) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricstopictrunkmetricsqos.go b/platformclientv2/trunkmetricstopictrunkmetricsqos.go index e97b8589a..d29f1b7a7 100644 --- a/platformclientv2/trunkmetricstopictrunkmetricsqos.go +++ b/platformclientv2/trunkmetricstopictrunkmetricsqos.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Trunkmetricstopictrunkmetricsqos struct { } +func (u *Trunkmetricstopictrunkmetricsqos) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricstopictrunkmetricsqos + + + + return json.Marshal(&struct { + MismatchCount *int `json:"mismatchCount,omitempty"` + *Alias + }{ + MismatchCount: u.MismatchCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricstopictrunkmetricsqos) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkmetricstopicurireference.go b/platformclientv2/trunkmetricstopicurireference.go index 02c8dffb4..e4f5f04ca 100644 --- a/platformclientv2/trunkmetricstopicurireference.go +++ b/platformclientv2/trunkmetricstopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trunkmetricstopicurireference struct { } +func (u *Trunkmetricstopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkmetricstopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkmetricstopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trunkrecordingenabledcount.go b/platformclientv2/trunkrecordingenabledcount.go index 697bf6711..ca69ebb9e 100644 --- a/platformclientv2/trunkrecordingenabledcount.go +++ b/platformclientv2/trunkrecordingenabledcount.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trunkrecordingenabledcount struct { } +func (u *Trunkrecordingenabledcount) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trunkrecordingenabledcount + + + + return json.Marshal(&struct { + EnabledCount *int `json:"enabledCount,omitempty"` + + DisabledCount *int `json:"disabledCount,omitempty"` + *Alias + }{ + EnabledCount: u.EnabledCount, + + DisabledCount: u.DisabledCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trunkrecordingenabledcount) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustcreate.go b/platformclientv2/trustcreate.go index 64ae0208e..fdfc5dbea 100644 --- a/platformclientv2/trustcreate.go +++ b/platformclientv2/trustcreate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Trustcreate struct { } +func (u *Trustcreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustcreate + + + DateExpired := new(string) + if u.DateExpired != nil { + + *DateExpired = timeutil.Strftime(u.DateExpired, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpired = nil + } + + + return json.Marshal(&struct { + PairingId *string `json:"pairingId,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Users *[]Trustmembercreate `json:"users,omitempty"` + + Groups *[]Trustmembercreate `json:"groups,omitempty"` + + DateExpired *string `json:"dateExpired,omitempty"` + *Alias + }{ + PairingId: u.PairingId, + + Enabled: u.Enabled, + + Users: u.Users, + + Groups: u.Groups, + + DateExpired: DateExpired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustcreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustee.go b/platformclientv2/trustee.go index 64012083b..1fd55a6f1 100644 --- a/platformclientv2/trustee.go +++ b/platformclientv2/trustee.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Trustee struct { } +func (u *Trustee) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustee + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateExpired := new(string) + if u.DateExpired != nil { + + *DateExpired = timeutil.Strftime(u.DateExpired, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpired = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + UsesDefaultRole *bool `json:"usesDefaultRole,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateExpired *string `json:"dateExpired,omitempty"` + + CreatedBy *Orguser `json:"createdBy,omitempty"` + + Organization *Organization `json:"organization,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Enabled: u.Enabled, + + UsesDefaultRole: u.UsesDefaultRole, + + DateCreated: DateCreated, + + DateExpired: DateExpired, + + CreatedBy: u.CreatedBy, + + Organization: u.Organization, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustee) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trusteeauditqueryrequest.go b/platformclientv2/trusteeauditqueryrequest.go index 735dee275..954a0f3cb 100644 --- a/platformclientv2/trusteeauditqueryrequest.go +++ b/platformclientv2/trusteeauditqueryrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Trusteeauditqueryrequest struct { } +func (u *Trusteeauditqueryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trusteeauditqueryrequest + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + TrusteeOrganizationIds *[]string `json:"trusteeOrganizationIds,omitempty"` + + TrusteeUserIds *[]string `json:"trusteeUserIds,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + QueryPhrase *string `json:"queryPhrase,omitempty"` + + Facets *[]Facet `json:"facets,omitempty"` + + Filters *[]Filter `json:"filters,omitempty"` + *Alias + }{ + TrusteeOrganizationIds: u.TrusteeOrganizationIds, + + TrusteeUserIds: u.TrusteeUserIds, + + StartDate: StartDate, + + EndDate: EndDate, + + QueryPhrase: u.QueryPhrase, + + Facets: u.Facets, + + Filters: u.Filters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trusteeauditqueryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trusteeauthorization.go b/platformclientv2/trusteeauthorization.go index 78e389e4a..9764ac506 100644 --- a/platformclientv2/trusteeauthorization.go +++ b/platformclientv2/trusteeauthorization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Trusteeauthorization struct { } +func (u *Trusteeauthorization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trusteeauthorization + + + + return json.Marshal(&struct { + Permissions *[]string `json:"permissions,omitempty"` + *Alias + }{ + Permissions: u.Permissions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trusteeauthorization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trusteebillingoverview.go b/platformclientv2/trusteebillingoverview.go index 50080b5d4..9bbf012eb 100644 --- a/platformclientv2/trusteebillingoverview.go +++ b/platformclientv2/trusteebillingoverview.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,142 @@ type Trusteebillingoverview struct { } +func (u *Trusteebillingoverview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trusteebillingoverview + + + RampPeriodStartDate := new(string) + if u.RampPeriodStartDate != nil { + + *RampPeriodStartDate = timeutil.Strftime(u.RampPeriodStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RampPeriodStartDate = nil + } + + RampPeriodEndDate := new(string) + if u.RampPeriodEndDate != nil { + + *RampPeriodEndDate = timeutil.Strftime(u.RampPeriodEndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + RampPeriodEndDate = nil + } + + BillingPeriodStartDate := new(string) + if u.BillingPeriodStartDate != nil { + + *BillingPeriodStartDate = timeutil.Strftime(u.BillingPeriodStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + BillingPeriodStartDate = nil + } + + BillingPeriodEndDate := new(string) + if u.BillingPeriodEndDate != nil { + + *BillingPeriodEndDate = timeutil.Strftime(u.BillingPeriodEndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + BillingPeriodEndDate = nil + } + + ContractAmendmentDate := new(string) + if u.ContractAmendmentDate != nil { + + *ContractAmendmentDate = timeutil.Strftime(u.ContractAmendmentDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ContractAmendmentDate = nil + } + + ContractEffectiveDate := new(string) + if u.ContractEffectiveDate != nil { + + *ContractEffectiveDate = timeutil.Strftime(u.ContractEffectiveDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ContractEffectiveDate = nil + } + + ContractEndDate := new(string) + if u.ContractEndDate != nil { + + *ContractEndDate = timeutil.Strftime(u.ContractEndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ContractEndDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Organization *Namedentity `json:"organization,omitempty"` + + Currency *string `json:"currency,omitempty"` + + EnabledProducts *[]string `json:"enabledProducts,omitempty"` + + SubscriptionType *string `json:"subscriptionType,omitempty"` + + RampPeriodStartDate *string `json:"rampPeriodStartDate,omitempty"` + + RampPeriodEndDate *string `json:"rampPeriodEndDate,omitempty"` + + BillingPeriodStartDate *string `json:"billingPeriodStartDate,omitempty"` + + BillingPeriodEndDate *string `json:"billingPeriodEndDate,omitempty"` + + Usages *[]Subscriptionoverviewusage `json:"usages,omitempty"` + + ContractAmendmentDate *string `json:"contractAmendmentDate,omitempty"` + + ContractEffectiveDate *string `json:"contractEffectiveDate,omitempty"` + + ContractEndDate *string `json:"contractEndDate,omitempty"` + + MinimumMonthlyAmount *string `json:"minimumMonthlyAmount,omitempty"` + + InRampPeriod *bool `json:"inRampPeriod,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Organization: u.Organization, + + Currency: u.Currency, + + EnabledProducts: u.EnabledProducts, + + SubscriptionType: u.SubscriptionType, + + RampPeriodStartDate: RampPeriodStartDate, + + RampPeriodEndDate: RampPeriodEndDate, + + BillingPeriodStartDate: BillingPeriodStartDate, + + BillingPeriodEndDate: BillingPeriodEndDate, + + Usages: u.Usages, + + ContractAmendmentDate: ContractAmendmentDate, + + ContractEffectiveDate: ContractEffectiveDate, + + ContractEndDate: ContractEndDate, + + MinimumMonthlyAmount: u.MinimumMonthlyAmount, + + InRampPeriod: u.InRampPeriod, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trusteebillingoverview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustentitylisting.go b/platformclientv2/trustentitylisting.go index cb0b2d4e9..debbc8385 100644 --- a/platformclientv2/trustentitylisting.go +++ b/platformclientv2/trustentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Trustentitylisting struct { } +func (u *Trustentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustentitylisting + + + + return json.Marshal(&struct { + Entities *[]Trustee `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustgroup.go b/platformclientv2/trustgroup.go index 36de75d41..3ed618e77 100644 --- a/platformclientv2/trustgroup.go +++ b/platformclientv2/trustgroup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Trustgroup struct { } +func (u *Trustgroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustgroup + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + State *string `json:"state,omitempty"` + + Version *int `json:"version,omitempty"` + + VarType *string `json:"type,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Addresses *[]Groupcontact `json:"addresses,omitempty"` + + RulesVisible *bool `json:"rulesVisible,omitempty"` + + Visibility *string `json:"visibility,omitempty"` + + Owners *[]User `json:"owners,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + CreatedBy *Orguser `json:"createdBy,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + DateModified: DateModified, + + MemberCount: u.MemberCount, + + State: u.State, + + Version: u.Version, + + VarType: u.VarType, + + Images: u.Images, + + Addresses: u.Addresses, + + RulesVisible: u.RulesVisible, + + Visibility: u.Visibility, + + Owners: u.Owners, + + DateCreated: DateCreated, + + CreatedBy: u.CreatedBy, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustgroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustmembercreate.go b/platformclientv2/trustmembercreate.go index 3aeed582b..10d4491b8 100644 --- a/platformclientv2/trustmembercreate.go +++ b/platformclientv2/trustmembercreate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Trustmembercreate struct { } +func (u *Trustmembercreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustmembercreate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + RoleIds *[]string `json:"roleIds,omitempty"` + + RoleDivisions *Roledivisiongrants `json:"roleDivisions,omitempty"` + *Alias + }{ + Id: u.Id, + + RoleIds: u.RoleIds, + + RoleDivisions: u.RoleDivisions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustmembercreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustor.go b/platformclientv2/trustor.go index a3e814bae..7468323d9 100644 --- a/platformclientv2/trustor.go +++ b/platformclientv2/trustor.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Trustor struct { } +func (u *Trustor) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustor + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + CreatedBy *Orguser `json:"createdBy,omitempty"` + + Organization *Organization `json:"organization,omitempty"` + + Authorization *Trusteeauthorization `json:"authorization,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Enabled: u.Enabled, + + DateCreated: DateCreated, + + CreatedBy: u.CreatedBy, + + Organization: u.Organization, + + Authorization: u.Authorization, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustor) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustorauditqueryrequest.go b/platformclientv2/trustorauditqueryrequest.go index c92743dac..ee5aea21a 100644 --- a/platformclientv2/trustorauditqueryrequest.go +++ b/platformclientv2/trustorauditqueryrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Trustorauditqueryrequest struct { } +func (u *Trustorauditqueryrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustorauditqueryrequest + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + TrustorOrganizationId *string `json:"trustorOrganizationId,omitempty"` + + TrusteeUserIds *[]string `json:"trusteeUserIds,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + QueryPhrase *string `json:"queryPhrase,omitempty"` + + Facets *[]Facet `json:"facets,omitempty"` + + Filters *[]Filter `json:"filters,omitempty"` + *Alias + }{ + TrustorOrganizationId: u.TrustorOrganizationId, + + TrusteeUserIds: u.TrusteeUserIds, + + StartDate: StartDate, + + EndDate: EndDate, + + QueryPhrase: u.QueryPhrase, + + Facets: u.Facets, + + Filters: u.Filters, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustorauditqueryrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustorentitylisting.go b/platformclientv2/trustorentitylisting.go index 0b394459e..a242413bc 100644 --- a/platformclientv2/trustorentitylisting.go +++ b/platformclientv2/trustorentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Trustorentitylisting struct { } +func (u *Trustorentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustorentitylisting + + + + return json.Marshal(&struct { + Entities *[]Trustor `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustorentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustrequest.go b/platformclientv2/trustrequest.go index 863d8f143..693096ee2 100644 --- a/platformclientv2/trustrequest.go +++ b/platformclientv2/trustrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Trustrequest struct { } +func (u *Trustrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustrequest + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + CreatedBy *Orguser `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + Trustee *Organization `json:"trustee,omitempty"` + + Users *[]Orguser `json:"users,omitempty"` + + Groups *[]Trustgroup `json:"groups,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + Trustee: u.Trustee, + + Users: u.Users, + + Groups: u.Groups, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustrequestcreate.go b/platformclientv2/trustrequestcreate.go index ed146e12c..0d74ee9b7 100644 --- a/platformclientv2/trustrequestcreate.go +++ b/platformclientv2/trustrequestcreate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Trustrequestcreate struct { } +func (u *Trustrequestcreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustrequestcreate + + + + return json.Marshal(&struct { + UserIds *[]string `json:"userIds,omitempty"` + + GroupIds *[]string `json:"groupIds,omitempty"` + *Alias + }{ + UserIds: u.UserIds, + + GroupIds: u.GroupIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustrequestcreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustupdate.go b/platformclientv2/trustupdate.go index 126d9cf1f..fc0ecdbe3 100644 --- a/platformclientv2/trustupdate.go +++ b/platformclientv2/trustupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Trustupdate struct { } +func (u *Trustupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustupdate + + + DateExpired := new(string) + if u.DateExpired != nil { + + *DateExpired = timeutil.Strftime(u.DateExpired, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateExpired = nil + } + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + DateExpired *string `json:"dateExpired,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + DateExpired: DateExpired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustuser.go b/platformclientv2/trustuser.go index fd4d13dd7..b0f890577 100644 --- a/platformclientv2/trustuser.go +++ b/platformclientv2/trustuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -144,6 +145,154 @@ type Trustuser struct { } +func (u *Trustuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Chat *Chat `json:"chat,omitempty"` + + Department *string `json:"department,omitempty"` + + Email *string `json:"email,omitempty"` + + PrimaryContactInfo *[]Contact `json:"primaryContactInfo,omitempty"` + + Addresses *[]Contact `json:"addresses,omitempty"` + + State *string `json:"state,omitempty"` + + Title *string `json:"title,omitempty"` + + Username *string `json:"username,omitempty"` + + Manager *User `json:"manager,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Version *int `json:"version,omitempty"` + + Certifications *[]string `json:"certifications,omitempty"` + + Biography *Biography `json:"biography,omitempty"` + + EmployerInfo *Employerinfo `json:"employerInfo,omitempty"` + + RoutingStatus *Routingstatus `json:"routingStatus,omitempty"` + + Presence *Userpresence `json:"presence,omitempty"` + + ConversationSummary *Userconversationsummary `json:"conversationSummary,omitempty"` + + OutOfOffice *Outofoffice `json:"outOfOffice,omitempty"` + + Geolocation *Geolocation `json:"geolocation,omitempty"` + + Station *Userstations `json:"station,omitempty"` + + Authorization *Userauthorization `json:"authorization,omitempty"` + + ProfileSkills *[]string `json:"profileSkills,omitempty"` + + Locations *[]Location `json:"locations,omitempty"` + + Groups *[]Group `json:"groups,omitempty"` + + Team *Team `json:"team,omitempty"` + + Skills *[]Userroutingskill `json:"skills,omitempty"` + + Languages *[]Userroutinglanguage `json:"languages,omitempty"` + + AcdAutoAnswer *bool `json:"acdAutoAnswer,omitempty"` + + LanguagePreference *string `json:"languagePreference,omitempty"` + + LastTokenIssued *Oauthlasttokenissued `json:"lastTokenIssued,omitempty"` + + TrustUserDetails *Trustuserdetails `json:"trustUserDetails,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Chat: u.Chat, + + Department: u.Department, + + Email: u.Email, + + PrimaryContactInfo: u.PrimaryContactInfo, + + Addresses: u.Addresses, + + State: u.State, + + Title: u.Title, + + Username: u.Username, + + Manager: u.Manager, + + Images: u.Images, + + Version: u.Version, + + Certifications: u.Certifications, + + Biography: u.Biography, + + EmployerInfo: u.EmployerInfo, + + RoutingStatus: u.RoutingStatus, + + Presence: u.Presence, + + ConversationSummary: u.ConversationSummary, + + OutOfOffice: u.OutOfOffice, + + Geolocation: u.Geolocation, + + Station: u.Station, + + Authorization: u.Authorization, + + ProfileSkills: u.ProfileSkills, + + Locations: u.Locations, + + Groups: u.Groups, + + Team: u.Team, + + Skills: u.Skills, + + Languages: u.Languages, + + AcdAutoAnswer: u.AcdAutoAnswer, + + LanguagePreference: u.LanguagePreference, + + LastTokenIssued: u.LastTokenIssued, + + TrustUserDetails: u.TrustUserDetails, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustuserdetails.go b/platformclientv2/trustuserdetails.go index eff1e889a..7ab53ce4e 100644 --- a/platformclientv2/trustuserdetails.go +++ b/platformclientv2/trustuserdetails.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Trustuserdetails struct { } +func (u *Trustuserdetails) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustuserdetails + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + + return json.Marshal(&struct { + DateCreated *string `json:"dateCreated,omitempty"` + + CreatedBy *Orguser `json:"createdBy,omitempty"` + *Alias + }{ + DateCreated: DateCreated, + + CreatedBy: u.CreatedBy, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustuserdetails) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/trustuserentitylisting.go b/platformclientv2/trustuserentitylisting.go index 28a8d4897..37b40a9fe 100644 --- a/platformclientv2/trustuserentitylisting.go +++ b/platformclientv2/trustuserentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Trustuserentitylisting struct { } +func (u *Trustuserentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Trustuserentitylisting + + + + return json.Marshal(&struct { + Entities *[]Trustuser `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Trustuserentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ttsengineentity.go b/platformclientv2/ttsengineentity.go index ac9dc3acf..9fcfcadb3 100644 --- a/platformclientv2/ttsengineentity.go +++ b/platformclientv2/ttsengineentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Ttsengineentity struct { } +func (u *Ttsengineentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ttsengineentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Languages *[]string `json:"languages,omitempty"` + + OutputFormats *[]string `json:"outputFormats,omitempty"` + + Voices *[]Ttsvoiceentity `json:"voices,omitempty"` + + IsDefault *bool `json:"isDefault,omitempty"` + + IsSecure *bool `json:"isSecure,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Languages: u.Languages, + + OutputFormats: u.OutputFormats, + + Voices: u.Voices, + + IsDefault: u.IsDefault, + + IsSecure: u.IsSecure, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ttsengineentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ttsengineentitylisting.go b/platformclientv2/ttsengineentitylisting.go index 7a345388d..ee7f21465 100644 --- a/platformclientv2/ttsengineentitylisting.go +++ b/platformclientv2/ttsengineentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Ttsengineentitylisting struct { } +func (u *Ttsengineentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ttsengineentitylisting + + + + return json.Marshal(&struct { + Entities *[]Ttsengineentity `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ttsengineentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ttssettings.go b/platformclientv2/ttssettings.go index 93b21a229..7c04866cd 100644 --- a/platformclientv2/ttssettings.go +++ b/platformclientv2/ttssettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Ttssettings struct { } +func (u *Ttssettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ttssettings + + + + return json.Marshal(&struct { + DefaultEngine *string `json:"defaultEngine,omitempty"` + + LanguageOverrides *[]Languageoverride `json:"languageOverrides,omitempty"` + *Alias + }{ + DefaultEngine: u.DefaultEngine, + + LanguageOverrides: u.LanguageOverrides, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ttssettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ttsvoiceentity.go b/platformclientv2/ttsvoiceentity.go index b0f800276..316c4f2c8 100644 --- a/platformclientv2/ttsvoiceentity.go +++ b/platformclientv2/ttsvoiceentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Ttsvoiceentity struct { } +func (u *Ttsvoiceentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ttsvoiceentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Gender *string `json:"gender,omitempty"` + + Language *string `json:"language,omitempty"` + + Engine *Ttsengineentity `json:"engine,omitempty"` + + IsDefault *bool `json:"isDefault,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Gender: u.Gender, + + Language: u.Language, + + Engine: u.Engine, + + IsDefault: u.IsDefault, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ttsvoiceentity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/ttsvoiceentitylisting.go b/platformclientv2/ttsvoiceentitylisting.go index 14b5b6a5a..022942166 100644 --- a/platformclientv2/ttsvoiceentitylisting.go +++ b/platformclientv2/ttsvoiceentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Ttsvoiceentitylisting struct { } +func (u *Ttsvoiceentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Ttsvoiceentitylisting + + + + return json.Marshal(&struct { + Entities *[]Ttsvoiceentity `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Ttsvoiceentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/twitterid.go b/platformclientv2/twitterid.go index 80285cfbe..e68307cf5 100644 --- a/platformclientv2/twitterid.go +++ b/platformclientv2/twitterid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Twitterid struct { } +func (u *Twitterid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Twitterid + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + ScreenName *string `json:"screenName,omitempty"` + + Verified *bool `json:"verified,omitempty"` + + ProfileUrl *string `json:"profileUrl,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + ScreenName: u.ScreenName, + + Verified: u.Verified, + + ProfileUrl: u.ProfileUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Twitterid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/twitterintegration.go b/platformclientv2/twitterintegration.go index 932ad6a35..d67adca22 100644 --- a/platformclientv2/twitterintegration.go +++ b/platformclientv2/twitterintegration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,106 @@ type Twitterintegration struct { } +func (u *Twitterintegration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Twitterintegration + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + AccessTokenKey *string `json:"accessTokenKey,omitempty"` + + ConsumerKey *string `json:"consumerKey,omitempty"` + + Username *string `json:"username,omitempty"` + + UserId *string `json:"userId,omitempty"` + + Status *string `json:"status,omitempty"` + + Tier *string `json:"tier,omitempty"` + + EnvName *string `json:"envName,omitempty"` + + Recipient *Domainentityref `json:"recipient,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + Version *int `json:"version,omitempty"` + + CreateStatus *string `json:"createStatus,omitempty"` + + CreateError *Errorbody `json:"createError,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + AccessTokenKey: u.AccessTokenKey, + + ConsumerKey: u.ConsumerKey, + + Username: u.Username, + + UserId: u.UserId, + + Status: u.Status, + + Tier: u.Tier, + + EnvName: u.EnvName, + + Recipient: u.Recipient, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Version: u.Version, + + CreateStatus: u.CreateStatus, + + CreateError: u.CreateError, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Twitterintegration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/twitterintegrationentitylisting.go b/platformclientv2/twitterintegrationentitylisting.go index 7fafc999f..b38efd683 100644 --- a/platformclientv2/twitterintegrationentitylisting.go +++ b/platformclientv2/twitterintegrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Twitterintegrationentitylisting struct { } +func (u *Twitterintegrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Twitterintegrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Twitterintegration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Twitterintegrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/twitterintegrationrequest.go b/platformclientv2/twitterintegrationrequest.go index 16880bc62..26db58ad0 100644 --- a/platformclientv2/twitterintegrationrequest.go +++ b/platformclientv2/twitterintegrationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Twitterintegrationrequest struct { } +func (u *Twitterintegrationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Twitterintegrationrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + AccessTokenKey *string `json:"accessTokenKey,omitempty"` + + AccessTokenSecret *string `json:"accessTokenSecret,omitempty"` + + ConsumerKey *string `json:"consumerKey,omitempty"` + + ConsumerSecret *string `json:"consumerSecret,omitempty"` + + Tier *string `json:"tier,omitempty"` + + EnvName *string `json:"envName,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + AccessTokenKey: u.AccessTokenKey, + + AccessTokenSecret: u.AccessTokenSecret, + + ConsumerKey: u.ConsumerKey, + + ConsumerSecret: u.ConsumerSecret, + + Tier: u.Tier, + + EnvName: u.EnvName, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Twitterintegrationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/unpublishedprogramsentitylisting.go b/platformclientv2/unpublishedprogramsentitylisting.go index 8bd672e42..39dc152a1 100644 --- a/platformclientv2/unpublishedprogramsentitylisting.go +++ b/platformclientv2/unpublishedprogramsentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Unpublishedprogramsentitylisting struct { } +func (u *Unpublishedprogramsentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Unpublishedprogramsentitylisting + + + + return json.Marshal(&struct { + Entities *[]Program `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Unpublishedprogramsentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/unreadmetric.go b/platformclientv2/unreadmetric.go index 116da4c14..3a3dd9c28 100644 --- a/platformclientv2/unreadmetric.go +++ b/platformclientv2/unreadmetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Unreadmetric struct { } +func (u *Unreadmetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Unreadmetric + + + + return json.Marshal(&struct { + Count *int `json:"count,omitempty"` + *Alias + }{ + Count: u.Count, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Unreadmetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/unreadstatus.go b/platformclientv2/unreadstatus.go index f89c296e2..32f2af37a 100644 --- a/platformclientv2/unreadstatus.go +++ b/platformclientv2/unreadstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Unreadstatus struct { } +func (u *Unreadstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Unreadstatus + + + + return json.Marshal(&struct { + Unread *bool `json:"unread,omitempty"` + *Alias + }{ + Unread: u.Unread, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Unreadstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updateactioninput.go b/platformclientv2/updateactioninput.go index c809a5931..8a2fcd00b 100644 --- a/platformclientv2/updateactioninput.go +++ b/platformclientv2/updateactioninput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Updateactioninput struct { } +func (u *Updateactioninput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updateactioninput + + + + return json.Marshal(&struct { + Category *string `json:"category,omitempty"` + + Name *string `json:"name,omitempty"` + + Config *Actionconfig `json:"config,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Category: u.Category, + + Name: u.Name, + + Config: u.Config, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updateactioninput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updateactivitycoderequest.go b/platformclientv2/updateactivitycoderequest.go index 7c313fc5d..f532feab1 100644 --- a/platformclientv2/updateactivitycoderequest.go +++ b/platformclientv2/updateactivitycoderequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Updateactivitycoderequest struct { } +func (u *Updateactivitycoderequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updateactivitycoderequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Category *string `json:"category,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + CountsAsWorkTime *bool `json:"countsAsWorkTime,omitempty"` + + AgentTimeOffSelectable *bool `json:"agentTimeOffSelectable,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Name: u.Name, + + Category: u.Category, + + LengthInMinutes: u.LengthInMinutes, + + CountsAsPaidTime: u.CountsAsPaidTime, + + CountsAsWorkTime: u.CountsAsWorkTime, + + AgentTimeOffSelectable: u.AgentTimeOffSelectable, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updateactivitycoderequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatebusinessunitrequest.go b/platformclientv2/updatebusinessunitrequest.go index 08c569298..d8ecb544c 100644 --- a/platformclientv2/updatebusinessunitrequest.go +++ b/platformclientv2/updatebusinessunitrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Updatebusinessunitrequest struct { } +func (u *Updatebusinessunitrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatebusinessunitrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + DivisionId *string `json:"divisionId,omitempty"` + + Settings *Updatebusinessunitsettings `json:"settings,omitempty"` + *Alias + }{ + Name: u.Name, + + DivisionId: u.DivisionId, + + Settings: u.Settings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatebusinessunitrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatebusinessunitsettings.go b/platformclientv2/updatebusinessunitsettings.go index 948f958de..d104270a2 100644 --- a/platformclientv2/updatebusinessunitsettings.go +++ b/platformclientv2/updatebusinessunitsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Updatebusinessunitsettings struct { } +func (u *Updatebusinessunitsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatebusinessunitsettings + + + + return json.Marshal(&struct { + StartDayOfWeek *string `json:"startDayOfWeek,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + ShortTermForecasting *Bushorttermforecastingsettings `json:"shortTermForecasting,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + StartDayOfWeek: u.StartDayOfWeek, + + TimeZone: u.TimeZone, + + ShortTermForecasting: u.ShortTermForecasting, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatebusinessunitsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatecoachingappointmentrequest.go b/platformclientv2/updatecoachingappointmentrequest.go index c5d519318..74beb5d58 100644 --- a/platformclientv2/updatecoachingappointmentrequest.go +++ b/platformclientv2/updatecoachingappointmentrequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Updatecoachingappointmentrequest struct { } +func (u *Updatecoachingappointmentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatecoachingappointmentrequest + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + ConversationIds *[]string `json:"conversationIds,omitempty"` + + DocumentIds *[]string `json:"documentIds,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + Name: u.Name, + + Description: u.Description, + + DateStart: DateStart, + + LengthInMinutes: u.LengthInMinutes, + + ConversationIds: u.ConversationIds, + + DocumentIds: u.DocumentIds, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatecoachingappointmentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatedraftinput.go b/platformclientv2/updatedraftinput.go index a9c0091d0..14323b077 100644 --- a/platformclientv2/updatedraftinput.go +++ b/platformclientv2/updatedraftinput.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Updatedraftinput struct { } +func (u *Updatedraftinput) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatedraftinput + + + + return json.Marshal(&struct { + Category *string `json:"category,omitempty"` + + Name *string `json:"name,omitempty"` + + Config *Actionconfig `json:"config,omitempty"` + + Contract *Actioncontractinput `json:"contract,omitempty"` + + Secure *bool `json:"secure,omitempty"` + + Version *int `json:"version,omitempty"` + *Alias + }{ + Category: u.Category, + + Name: u.Name, + + Config: u.Config, + + Contract: u.Contract, + + Secure: u.Secure, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatedraftinput) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatemanagementunitrequest.go b/platformclientv2/updatemanagementunitrequest.go index 8fff9d1f3..d9e5d566c 100644 --- a/platformclientv2/updatemanagementunitrequest.go +++ b/platformclientv2/updatemanagementunitrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Updatemanagementunitrequest struct { } +func (u *Updatemanagementunitrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatemanagementunitrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + DivisionId *string `json:"divisionId,omitempty"` + + Settings *Managementunitsettingsrequest `json:"settings,omitempty"` + *Alias + }{ + Name: u.Name, + + DivisionId: u.DivisionId, + + Settings: u.Settings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatemanagementunitrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatenotificationresponse.go b/platformclientv2/updatenotificationresponse.go index 38e884feb..1322bf175 100644 --- a/platformclientv2/updatenotificationresponse.go +++ b/platformclientv2/updatenotificationresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Updatenotificationresponse struct { } +func (u *Updatenotificationresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatenotificationresponse + + + + return json.Marshal(&struct { + MutableGroupId *string `json:"mutableGroupId,omitempty"` + + Id *string `json:"id,omitempty"` + *Alias + }{ + MutableGroupId: u.MutableGroupId, + + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatenotificationresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatenotificationsrequest.go b/platformclientv2/updatenotificationsrequest.go index 5df6630b6..13b1a4452 100644 --- a/platformclientv2/updatenotificationsrequest.go +++ b/platformclientv2/updatenotificationsrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Updatenotificationsrequest struct { } +func (u *Updatenotificationsrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatenotificationsrequest + + + + return json.Marshal(&struct { + Entities *[]Wfmusernotification `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatenotificationsrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updatenotificationsresponse.go b/platformclientv2/updatenotificationsresponse.go index 268a060e7..35451ca59 100644 --- a/platformclientv2/updatenotificationsresponse.go +++ b/platformclientv2/updatenotificationsresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Updatenotificationsresponse struct { } +func (u *Updatenotificationsresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updatenotificationsresponse + + + + return json.Marshal(&struct { + Entities *[]Updatenotificationresponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updatenotificationsresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updateplanninggrouprequest.go b/platformclientv2/updateplanninggrouprequest.go index d2de4406a..e8653ac76 100644 --- a/platformclientv2/updateplanninggrouprequest.go +++ b/platformclientv2/updateplanninggrouprequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Updateplanninggrouprequest struct { } +func (u *Updateplanninggrouprequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updateplanninggrouprequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + RoutePaths *Setwrapperroutepathrequest `json:"routePaths,omitempty"` + + ServiceGoalTemplateId *string `json:"serviceGoalTemplateId,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Name: u.Name, + + RoutePaths: u.RoutePaths, + + ServiceGoalTemplateId: u.ServiceGoalTemplateId, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updateplanninggrouprequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updateservicegoaltemplate.go b/platformclientv2/updateservicegoaltemplate.go index 566e43d3b..8322edd5d 100644 --- a/platformclientv2/updateservicegoaltemplate.go +++ b/platformclientv2/updateservicegoaltemplate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Updateservicegoaltemplate struct { } +func (u *Updateservicegoaltemplate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updateservicegoaltemplate + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + ServiceLevel *Buservicelevel `json:"serviceLevel,omitempty"` + + AverageSpeedOfAnswer *Buaveragespeedofanswer `json:"averageSpeedOfAnswer,omitempty"` + + AbandonRate *Buabandonrate `json:"abandonRate,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Name: u.Name, + + ServiceLevel: u.ServiceLevel, + + AverageSpeedOfAnswer: u.AverageSpeedOfAnswer, + + AbandonRate: u.AbandonRate, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updateservicegoaltemplate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updateuser.go b/platformclientv2/updateuser.go index 18a2e39e6..b7e29de5e 100644 --- a/platformclientv2/updateuser.go +++ b/platformclientv2/updateuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -92,6 +93,102 @@ type Updateuser struct { } +func (u *Updateuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updateuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Chat *Chat `json:"chat,omitempty"` + + Department *string `json:"department,omitempty"` + + Email *string `json:"email,omitempty"` + + PrimaryContactInfo *[]Contact `json:"primaryContactInfo,omitempty"` + + Addresses *[]Contact `json:"addresses,omitempty"` + + Title *string `json:"title,omitempty"` + + Username *string `json:"username,omitempty"` + + Manager *string `json:"manager,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Version *int `json:"version,omitempty"` + + ProfileSkills *[]string `json:"profileSkills,omitempty"` + + Locations *[]Location `json:"locations,omitempty"` + + Groups *[]Group `json:"groups,omitempty"` + + State *string `json:"state,omitempty"` + + AcdAutoAnswer *bool `json:"acdAutoAnswer,omitempty"` + + Certifications *[]string `json:"certifications,omitempty"` + + Biography *Biography `json:"biography,omitempty"` + + EmployerInfo *Employerinfo `json:"employerInfo,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Chat: u.Chat, + + Department: u.Department, + + Email: u.Email, + + PrimaryContactInfo: u.PrimaryContactInfo, + + Addresses: u.Addresses, + + Title: u.Title, + + Username: u.Username, + + Manager: u.Manager, + + Images: u.Images, + + Version: u.Version, + + ProfileSkills: u.ProfileSkills, + + Locations: u.Locations, + + Groups: u.Groups, + + State: u.State, + + AcdAutoAnswer: u.AcdAutoAnswer, + + Certifications: u.Certifications, + + Biography: u.Biography, + + EmployerInfo: u.EmployerInfo, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updateuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updateworkplanrotationagentrequest.go b/platformclientv2/updateworkplanrotationagentrequest.go index 3172438ad..d092e1aef 100644 --- a/platformclientv2/updateworkplanrotationagentrequest.go +++ b/platformclientv2/updateworkplanrotationagentrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Updateworkplanrotationagentrequest struct { } +func (u *Updateworkplanrotationagentrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updateworkplanrotationagentrequest + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + DateRange *Daterangewithoptionalend `json:"dateRange,omitempty"` + + Position *int `json:"position,omitempty"` + + Delete *bool `json:"delete,omitempty"` + *Alias + }{ + UserId: u.UserId, + + DateRange: u.DateRange, + + Position: u.Position, + + Delete: u.Delete, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updateworkplanrotationagentrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/updateworkplanrotationrequest.go b/platformclientv2/updateworkplanrotationrequest.go index 5b7366d6c..2a64a951a 100644 --- a/platformclientv2/updateworkplanrotationrequest.go +++ b/platformclientv2/updateworkplanrotationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Updateworkplanrotationrequest struct { } +func (u *Updateworkplanrotationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Updateworkplanrotationrequest + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + DateRange *Daterangewithoptionalend `json:"dateRange,omitempty"` + + Agents *[]Updateworkplanrotationagentrequest `json:"agents,omitempty"` + + Pattern *Workplanpatternrequest `json:"pattern,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Name: u.Name, + + Enabled: u.Enabled, + + DateRange: u.DateRange, + + Agents: u.Agents, + + Pattern: u.Pattern, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Updateworkplanrotationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/uploadurlrequest.go b/platformclientv2/uploadurlrequest.go index 3dd92e0b1..81d92e849 100644 --- a/platformclientv2/uploadurlrequest.go +++ b/platformclientv2/uploadurlrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Uploadurlrequest struct { } +func (u *Uploadurlrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Uploadurlrequest + + + + return json.Marshal(&struct { + FileName *string `json:"fileName,omitempty"` + + ContentMd5 *string `json:"contentMd5,omitempty"` + + SignedUrlTimeoutSeconds *int `json:"signedUrlTimeoutSeconds,omitempty"` + + ServerSideEncryption *string `json:"serverSideEncryption,omitempty"` + *Alias + }{ + FileName: u.FileName, + + ContentMd5: u.ContentMd5, + + SignedUrlTimeoutSeconds: u.SignedUrlTimeoutSeconds, + + ServerSideEncryption: u.ServerSideEncryption, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Uploadurlrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/uploadurlresponse.go b/platformclientv2/uploadurlresponse.go index 9d099c602..c07aa663f 100644 --- a/platformclientv2/uploadurlresponse.go +++ b/platformclientv2/uploadurlresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Uploadurlresponse struct { } +func (u *Uploadurlresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Uploadurlresponse + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + + UploadKey *string `json:"uploadKey,omitempty"` + + Headers *map[string]string `json:"headers,omitempty"` + *Alias + }{ + Url: u.Url, + + UploadKey: u.UploadKey, + + Headers: u.Headers, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Uploadurlresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/urlcondition.go b/platformclientv2/urlcondition.go index e0e22571f..0fc3cce10 100644 --- a/platformclientv2/urlcondition.go +++ b/platformclientv2/urlcondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Urlcondition struct { } +func (u *Urlcondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Urlcondition + + + + return json.Marshal(&struct { + Values *[]string `json:"values,omitempty"` + + Operator *string `json:"operator,omitempty"` + *Alias + }{ + Values: u.Values, + + Operator: u.Operator, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Urlcondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/urlresponse.go b/platformclientv2/urlresponse.go index b61514920..4d8b6d4fb 100644 --- a/platformclientv2/urlresponse.go +++ b/platformclientv2/urlresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Urlresponse struct { } +func (u *Urlresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Urlresponse + + + + return json.Marshal(&struct { + Url *string `json:"url,omitempty"` + *Alias + }{ + Url: u.Url, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Urlresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usage.go b/platformclientv2/usage.go index 7cec1dce7..aad364347 100644 --- a/platformclientv2/usage.go +++ b/platformclientv2/usage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Usage struct { } +func (u *Usage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usage + + + + return json.Marshal(&struct { + Types *[]Usageitem `json:"types,omitempty"` + *Alias + }{ + Types: u.Types, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usageexecutionresult.go b/platformclientv2/usageexecutionresult.go index a374dea7d..3013a5964 100644 --- a/platformclientv2/usageexecutionresult.go +++ b/platformclientv2/usageexecutionresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Usageexecutionresult struct { } +func (u *Usageexecutionresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usageexecutionresult + + + + return json.Marshal(&struct { + ExecutionId *string `json:"executionId,omitempty"` + + ResultsUri *string `json:"resultsUri,omitempty"` + *Alias + }{ + ExecutionId: u.ExecutionId, + + ResultsUri: u.ResultsUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usageexecutionresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usageitem.go b/platformclientv2/usageitem.go index 2f7860248..26677bdc1 100644 --- a/platformclientv2/usageitem.go +++ b/platformclientv2/usageitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Usageitem struct { } +func (u *Usageitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usageitem + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + TotalDocumentByteCount *int `json:"totalDocumentByteCount,omitempty"` + + TotalDocumentCount *int `json:"totalDocumentCount,omitempty"` + *Alias + }{ + VarType: u.VarType, + + TotalDocumentByteCount: u.TotalDocumentByteCount, + + TotalDocumentCount: u.TotalDocumentCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usageitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/user.go b/platformclientv2/user.go index dd330f194..57b0c2e8e 100644 --- a/platformclientv2/user.go +++ b/platformclientv2/user.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -144,6 +145,154 @@ type User struct { } +func (u *User) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias User + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Chat *Chat `json:"chat,omitempty"` + + Department *string `json:"department,omitempty"` + + Email *string `json:"email,omitempty"` + + PrimaryContactInfo *[]Contact `json:"primaryContactInfo,omitempty"` + + Addresses *[]Contact `json:"addresses,omitempty"` + + State *string `json:"state,omitempty"` + + Title *string `json:"title,omitempty"` + + Username *string `json:"username,omitempty"` + + Manager **User `json:"manager,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Version *int `json:"version,omitempty"` + + Certifications *[]string `json:"certifications,omitempty"` + + Biography *Biography `json:"biography,omitempty"` + + EmployerInfo *Employerinfo `json:"employerInfo,omitempty"` + + RoutingStatus *Routingstatus `json:"routingStatus,omitempty"` + + Presence *Userpresence `json:"presence,omitempty"` + + ConversationSummary *Userconversationsummary `json:"conversationSummary,omitempty"` + + OutOfOffice **Outofoffice `json:"outOfOffice,omitempty"` + + Geolocation *Geolocation `json:"geolocation,omitempty"` + + Station **Userstations `json:"station,omitempty"` + + Authorization *Userauthorization `json:"authorization,omitempty"` + + ProfileSkills *[]string `json:"profileSkills,omitempty"` + + Locations *[]Location `json:"locations,omitempty"` + + Groups *[]Group `json:"groups,omitempty"` + + Team *Team `json:"team,omitempty"` + + Skills *[]Userroutingskill `json:"skills,omitempty"` + + Languages *[]Userroutinglanguage `json:"languages,omitempty"` + + AcdAutoAnswer *bool `json:"acdAutoAnswer,omitempty"` + + LanguagePreference *string `json:"languagePreference,omitempty"` + + LastTokenIssued *Oauthlasttokenissued `json:"lastTokenIssued,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Chat: u.Chat, + + Department: u.Department, + + Email: u.Email, + + PrimaryContactInfo: u.PrimaryContactInfo, + + Addresses: u.Addresses, + + State: u.State, + + Title: u.Title, + + Username: u.Username, + + Manager: u.Manager, + + Images: u.Images, + + Version: u.Version, + + Certifications: u.Certifications, + + Biography: u.Biography, + + EmployerInfo: u.EmployerInfo, + + RoutingStatus: u.RoutingStatus, + + Presence: u.Presence, + + ConversationSummary: u.ConversationSummary, + + OutOfOffice: u.OutOfOffice, + + Geolocation: u.Geolocation, + + Station: u.Station, + + Authorization: u.Authorization, + + ProfileSkills: u.ProfileSkills, + + Locations: u.Locations, + + Groups: u.Groups, + + Team: u.Team, + + Skills: u.Skills, + + Languages: u.Languages, + + AcdAutoAnswer: u.AcdAutoAnswer, + + LanguagePreference: u.LanguagePreference, + + LastTokenIssued: u.LastTokenIssued, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *User) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useractioncategory.go b/platformclientv2/useractioncategory.go index 8f669b03b..cc6a4c171 100644 --- a/platformclientv2/useractioncategory.go +++ b/platformclientv2/useractioncategory.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Useractioncategory struct { } +func (u *Useractioncategory) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useractioncategory + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useractioncategory) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useractioncategoryentitylisting.go b/platformclientv2/useractioncategoryentitylisting.go index 8b87a7c95..327f30869 100644 --- a/platformclientv2/useractioncategoryentitylisting.go +++ b/platformclientv2/useractioncategoryentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Useractioncategoryentitylisting struct { } +func (u *Useractioncategoryentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useractioncategoryentitylisting + + + + return json.Marshal(&struct { + Entities *[]Useractioncategory `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useractioncategoryentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useragentinfo.go b/platformclientv2/useragentinfo.go index 1eafd9806..d5bc885b6 100644 --- a/platformclientv2/useragentinfo.go +++ b/platformclientv2/useragentinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Useragentinfo struct { } +func (u *Useragentinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useragentinfo + + + + return json.Marshal(&struct { + FirmwareVersion *string `json:"firmwareVersion,omitempty"` + + Manufacturer *string `json:"manufacturer,omitempty"` + + Model *string `json:"model,omitempty"` + *Alias + }{ + FirmwareVersion: u.FirmwareVersion, + + Manufacturer: u.Manufacturer, + + Model: u.Model, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useragentinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useraggregatedatacontainer.go b/platformclientv2/useraggregatedatacontainer.go index cd15d52dd..b96ab6efb 100644 --- a/platformclientv2/useraggregatedatacontainer.go +++ b/platformclientv2/useraggregatedatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Useraggregatedatacontainer struct { } +func (u *Useraggregatedatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useraggregatedatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Statisticalresponse `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useraggregatedatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useraggregatequeryclause.go b/platformclientv2/useraggregatequeryclause.go index fc9c2600c..2eeb2e6fe 100644 --- a/platformclientv2/useraggregatequeryclause.go +++ b/platformclientv2/useraggregatequeryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Useraggregatequeryclause struct { } +func (u *Useraggregatequeryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useraggregatequeryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Useraggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useraggregatequeryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useraggregatequeryfilter.go b/platformclientv2/useraggregatequeryfilter.go index 519405816..f4b196def 100644 --- a/platformclientv2/useraggregatequeryfilter.go +++ b/platformclientv2/useraggregatequeryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Useraggregatequeryfilter struct { } +func (u *Useraggregatequeryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useraggregatequeryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Useraggregatequeryclause `json:"clauses,omitempty"` + + Predicates *[]Useraggregatequerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useraggregatequeryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useraggregatequerypredicate.go b/platformclientv2/useraggregatequerypredicate.go index 4b0ebaee2..b0f636742 100644 --- a/platformclientv2/useraggregatequerypredicate.go +++ b/platformclientv2/useraggregatequerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Useraggregatequerypredicate struct { } +func (u *Useraggregatequerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useraggregatequerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useraggregatequerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useraggregatequeryresponse.go b/platformclientv2/useraggregatequeryresponse.go index 9931d8415..fe99b80cc 100644 --- a/platformclientv2/useraggregatequeryresponse.go +++ b/platformclientv2/useraggregatequeryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Useraggregatequeryresponse struct { } +func (u *Useraggregatequeryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useraggregatequeryresponse + + + + return json.Marshal(&struct { + SystemToOrganizationMappings *map[string][]string `json:"systemToOrganizationMappings,omitempty"` + + Results *[]Useraggregatedatacontainer `json:"results,omitempty"` + *Alias + }{ + SystemToOrganizationMappings: u.SystemToOrganizationMappings, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useraggregatequeryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useraggregationquery.go b/platformclientv2/useraggregationquery.go index 5c103d4ae..d20ef440c 100644 --- a/platformclientv2/useraggregationquery.go +++ b/platformclientv2/useraggregationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Useraggregationquery struct { } +func (u *Useraggregationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useraggregationquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + GroupBy *[]string `json:"groupBy,omitempty"` + + Filter *Useraggregatequeryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + FlattenMultivaluedDimensions *bool `json:"flattenMultivaluedDimensions,omitempty"` + + Views *[]Useraggregationview `json:"views,omitempty"` + + AlternateTimeDimension *string `json:"alternateTimeDimension,omitempty"` + *Alias + }{ + Interval: u.Interval, + + Granularity: u.Granularity, + + TimeZone: u.TimeZone, + + GroupBy: u.GroupBy, + + Filter: u.Filter, + + Metrics: u.Metrics, + + FlattenMultivaluedDimensions: u.FlattenMultivaluedDimensions, + + Views: u.Views, + + AlternateTimeDimension: u.AlternateTimeDimension, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useraggregationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useraggregationview.go b/platformclientv2/useraggregationview.go index df430ede5..69dab9e60 100644 --- a/platformclientv2/useraggregationview.go +++ b/platformclientv2/useraggregationview.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Useraggregationview struct { } +func (u *Useraggregationview) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useraggregationview + + + + return json.Marshal(&struct { + Target *string `json:"target,omitempty"` + + Name *string `json:"name,omitempty"` + + Function *string `json:"function,omitempty"` + + VarRange *Aggregationrange `json:"range,omitempty"` + *Alias + }{ + Target: u.Target, + + Name: u.Name, + + Function: u.Function, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useraggregationview) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userapp.go b/platformclientv2/userapp.go index 107b7d04c..13ef6488a 100644 --- a/platformclientv2/userapp.go +++ b/platformclientv2/userapp.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Userapp struct { } +func (u *Userapp) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userapp + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + IntegrationType *Integrationtype `json:"integrationType,omitempty"` + + Config *Userappconfigurationinfo `json:"config,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + IntegrationType: u.IntegrationType, + + Config: u.Config, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userapp) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userappconfigurationinfo.go b/platformclientv2/userappconfigurationinfo.go index e12ed83d1..64f84fa4b 100644 --- a/platformclientv2/userappconfigurationinfo.go +++ b/platformclientv2/userappconfigurationinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userappconfigurationinfo struct { } +func (u *Userappconfigurationinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userappconfigurationinfo + + + + return json.Marshal(&struct { + Current *Integrationconfiguration `json:"current,omitempty"` + + Effective *Effectiveconfiguration `json:"effective,omitempty"` + *Alias + }{ + Current: u.Current, + + Effective: u.Effective, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userappconfigurationinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userappentitylisting.go b/platformclientv2/userappentitylisting.go index 6d2cd7ab9..443a7e8e2 100644 --- a/platformclientv2/userappentitylisting.go +++ b/platformclientv2/userappentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userappentitylisting struct { } +func (u *Userappentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userappentitylisting + + + + return json.Marshal(&struct { + Entities *[]Userapp `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userappentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userauthorization.go b/platformclientv2/userauthorization.go index 634827978..c653b8569 100644 --- a/platformclientv2/userauthorization.go +++ b/platformclientv2/userauthorization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Userauthorization struct { } +func (u *Userauthorization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userauthorization + + + + return json.Marshal(&struct { + Roles *[]Domainrole `json:"roles,omitempty"` + + UnusedRoles *[]Domainrole `json:"unusedRoles,omitempty"` + + Permissions *[]string `json:"permissions,omitempty"` + + PermissionPolicies *[]Resourcepermissionpolicy `json:"permissionPolicies,omitempty"` + *Alias + }{ + Roles: u.Roles, + + UnusedRoles: u.UnusedRoles, + + Permissions: u.Permissions, + + PermissionPolicies: u.PermissionPolicies, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userauthorization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/useravailabletimes.go b/platformclientv2/useravailabletimes.go index 6470e68d4..55159d193 100644 --- a/platformclientv2/useravailabletimes.go +++ b/platformclientv2/useravailabletimes.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Useravailabletimes struct { } +func (u *Useravailabletimes) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Useravailabletimes + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + AvailableTimes *[]Availabletime `json:"availableTimes,omitempty"` + *Alias + }{ + User: u.User, + + AvailableTimes: u.AvailableTimes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Useravailabletimes) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userbestpoints.go b/platformclientv2/userbestpoints.go index d41437ab9..38f0aa6b2 100644 --- a/platformclientv2/userbestpoints.go +++ b/platformclientv2/userbestpoints.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userbestpoints struct { } +func (u *Userbestpoints) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userbestpoints + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + BestPoints *[]Userbestpointsitem `json:"bestPoints,omitempty"` + *Alias + }{ + User: u.User, + + BestPoints: u.BestPoints, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userbestpoints) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userbestpointsitem.go b/platformclientv2/userbestpointsitem.go index 6a2709051..946ddb7e8 100644 --- a/platformclientv2/userbestpointsitem.go +++ b/platformclientv2/userbestpointsitem.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,52 @@ type Userbestpointsitem struct { } +func (u *Userbestpointsitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userbestpointsitem + + + DateStartWorkday := new(string) + if u.DateStartWorkday != nil { + *DateStartWorkday = timeutil.Strftime(u.DateStartWorkday, "%Y-%m-%d") + } else { + DateStartWorkday = nil + } + + DateEndWorkday := new(string) + if u.DateEndWorkday != nil { + *DateEndWorkday = timeutil.Strftime(u.DateEndWorkday, "%Y-%m-%d") + } else { + DateEndWorkday = nil + } + + + return json.Marshal(&struct { + GranularityType *string `json:"granularityType,omitempty"` + + Points *int `json:"points,omitempty"` + + DateStartWorkday *string `json:"dateStartWorkday,omitempty"` + + DateEndWorkday *string `json:"dateEndWorkday,omitempty"` + + Rank *int `json:"rank,omitempty"` + *Alias + }{ + GranularityType: u.GranularityType, + + Points: u.Points, + + DateStartWorkday: DateStartWorkday, + + DateEndWorkday: DateEndWorkday, + + Rank: u.Rank, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userbestpointsitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userconversationseventmediasummary.go b/platformclientv2/userconversationseventmediasummary.go index f9deafd0e..2d30b870c 100644 --- a/platformclientv2/userconversationseventmediasummary.go +++ b/platformclientv2/userconversationseventmediasummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userconversationseventmediasummary struct { } +func (u *Userconversationseventmediasummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userconversationseventmediasummary + + + + return json.Marshal(&struct { + ContactCenter *Userconversationseventmediasummarydetail `json:"contactCenter,omitempty"` + + Enterprise *Userconversationseventmediasummarydetail `json:"enterprise,omitempty"` + *Alias + }{ + ContactCenter: u.ContactCenter, + + Enterprise: u.Enterprise, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userconversationseventmediasummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userconversationseventmediasummarydetail.go b/platformclientv2/userconversationseventmediasummarydetail.go index 575660f1c..ee5aa8e6c 100644 --- a/platformclientv2/userconversationseventmediasummarydetail.go +++ b/platformclientv2/userconversationseventmediasummarydetail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userconversationseventmediasummarydetail struct { } +func (u *Userconversationseventmediasummarydetail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userconversationseventmediasummarydetail + + + + return json.Marshal(&struct { + Active *int `json:"active,omitempty"` + + Acw *int `json:"acw,omitempty"` + *Alias + }{ + Active: u.Active, + + Acw: u.Acw, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userconversationseventmediasummarydetail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userconversationseventuserconversationsummary.go b/platformclientv2/userconversationseventuserconversationsummary.go index c667f400f..0a562c974 100644 --- a/platformclientv2/userconversationseventuserconversationsummary.go +++ b/platformclientv2/userconversationseventuserconversationsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Userconversationseventuserconversationsummary struct { } +func (u *Userconversationseventuserconversationsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userconversationseventuserconversationsummary + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + Call *Userconversationseventmediasummary `json:"call,omitempty"` + + Callback *Userconversationseventmediasummary `json:"callback,omitempty"` + + Email *Userconversationseventmediasummary `json:"email,omitempty"` + + Message *Userconversationseventmediasummary `json:"message,omitempty"` + + Chat *Userconversationseventmediasummary `json:"chat,omitempty"` + + SocialExpression *Userconversationseventmediasummary `json:"socialExpression,omitempty"` + + Video *Userconversationseventmediasummary `json:"video,omitempty"` + *Alias + }{ + UserId: u.UserId, + + Call: u.Call, + + Callback: u.Callback, + + Email: u.Email, + + Message: u.Message, + + Chat: u.Chat, + + SocialExpression: u.SocialExpression, + + Video: u.Video, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userconversationseventuserconversationsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userconversationsummary.go b/platformclientv2/userconversationsummary.go index a5a7eeae8..3df89bd81 100644 --- a/platformclientv2/userconversationsummary.go +++ b/platformclientv2/userconversationsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Userconversationsummary struct { } +func (u *Userconversationsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userconversationsummary + + + + return json.Marshal(&struct { + UserId *string `json:"userId,omitempty"` + + Call *Mediasummary `json:"call,omitempty"` + + Callback *Mediasummary `json:"callback,omitempty"` + + Email *Mediasummary `json:"email,omitempty"` + + Message *Mediasummary `json:"message,omitempty"` + + Chat *Mediasummary `json:"chat,omitempty"` + + SocialExpression *Mediasummary `json:"socialExpression,omitempty"` + + Video *Mediasummary `json:"video,omitempty"` + *Alias + }{ + UserId: u.UserId, + + Call: u.Call, + + Callback: u.Callback, + + Email: u.Email, + + Message: u.Message, + + Chat: u.Chat, + + SocialExpression: u.SocialExpression, + + Video: u.Video, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userconversationsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userdetailqueryclause.go b/platformclientv2/userdetailqueryclause.go index f93b30404..c231f7971 100644 --- a/platformclientv2/userdetailqueryclause.go +++ b/platformclientv2/userdetailqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userdetailqueryclause struct { } +func (u *Userdetailqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userdetailqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Userdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userdetailqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userdetailqueryfilter.go b/platformclientv2/userdetailqueryfilter.go index 77028cdf2..8c45ccd5e 100644 --- a/platformclientv2/userdetailqueryfilter.go +++ b/platformclientv2/userdetailqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Userdetailqueryfilter struct { } +func (u *Userdetailqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userdetailqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Userdetailqueryclause `json:"clauses,omitempty"` + + Predicates *[]Userdetailquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userdetailqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userdetailquerypredicate.go b/platformclientv2/userdetailquerypredicate.go index f182aaf0f..267996aa8 100644 --- a/platformclientv2/userdetailquerypredicate.go +++ b/platformclientv2/userdetailquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Userdetailquerypredicate struct { } +func (u *Userdetailquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userdetailquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userdetailquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go b/platformclientv2/userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go index fbe687896..acba99a34 100644 --- a/platformclientv2/userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go +++ b/platformclientv2/userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification type Userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification struct { } +func (u *Userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userdetailsdatalakeavailabilitytopicdataavailabilitychangenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userdetailsquery.go b/platformclientv2/userdetailsquery.go index 0ee0704e2..ec1fa62da 100644 --- a/platformclientv2/userdetailsquery.go +++ b/platformclientv2/userdetailsquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Userdetailsquery struct { } +func (u *Userdetailsquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userdetailsquery + + + + return json.Marshal(&struct { + Interval *string `json:"interval,omitempty"` + + UserFilters *[]Userdetailqueryfilter `json:"userFilters,omitempty"` + + PresenceFilters *[]Presencedetailqueryfilter `json:"presenceFilters,omitempty"` + + RoutingStatusFilters *[]Routingstatusdetailqueryfilter `json:"routingStatusFilters,omitempty"` + + Order *string `json:"order,omitempty"` + + PresenceAggregations *[]Analyticsqueryaggregation `json:"presenceAggregations,omitempty"` + + RoutingStatusAggregations *[]Analyticsqueryaggregation `json:"routingStatusAggregations,omitempty"` + + Paging *Pagingspec `json:"paging,omitempty"` + *Alias + }{ + Interval: u.Interval, + + UserFilters: u.UserFilters, + + PresenceFilters: u.PresenceFilters, + + RoutingStatusFilters: u.RoutingStatusFilters, + + Order: u.Order, + + PresenceAggregations: u.PresenceAggregations, + + RoutingStatusAggregations: u.RoutingStatusAggregations, + + Paging: u.Paging, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userdetailsquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userdevice.go b/platformclientv2/userdevice.go index 9c0b01b4e..bea63bf62 100644 --- a/platformclientv2/userdevice.go +++ b/platformclientv2/userdevice.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userdevice struct { } +func (u *Userdevice) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userdevice + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DeviceToken *string `json:"deviceToken,omitempty"` + + NotificationId *string `json:"notificationId,omitempty"` + + Make *string `json:"make,omitempty"` + + Model *string `json:"model,omitempty"` + + AcceptNotifications *bool `json:"acceptNotifications,omitempty"` + + VarType *string `json:"type,omitempty"` + + SessionHash *string `json:"sessionHash,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DeviceToken: u.DeviceToken, + + NotificationId: u.NotificationId, + + Make: u.Make, + + Model: u.Model, + + AcceptNotifications: u.AcceptNotifications, + + VarType: u.VarType, + + SessionHash: u.SessionHash, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userdevice) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userentitylisting.go b/platformclientv2/userentitylisting.go index dcc245dbe..1c2e91211 100644 --- a/platformclientv2/userentitylisting.go +++ b/platformclientv2/userentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userentitylisting struct { } +func (u *Userentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userentitylisting + + + + return json.Marshal(&struct { + Entities *[]User `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userexpands.go b/platformclientv2/userexpands.go index c46ae4b9e..c3cfe11fb 100644 --- a/platformclientv2/userexpands.go +++ b/platformclientv2/userexpands.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Userexpands struct { } +func (u *Userexpands) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userexpands + + + + return json.Marshal(&struct { + RoutingStatus *Routingstatus `json:"routingStatus,omitempty"` + + Presence *Userpresence `json:"presence,omitempty"` + + ConversationSummary *Userconversationsummary `json:"conversationSummary,omitempty"` + + OutOfOffice *Outofoffice `json:"outOfOffice,omitempty"` + + Geolocation *Geolocation `json:"geolocation,omitempty"` + + Station *Userstations `json:"station,omitempty"` + + Authorization *Userauthorization `json:"authorization,omitempty"` + *Alias + }{ + RoutingStatus: u.RoutingStatus, + + Presence: u.Presence, + + ConversationSummary: u.ConversationSummary, + + OutOfOffice: u.OutOfOffice, + + Geolocation: u.Geolocation, + + Station: u.Station, + + Authorization: u.Authorization, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userexpands) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usergreetingeventgreeting.go b/platformclientv2/usergreetingeventgreeting.go index 4d71dd285..78888a733 100644 --- a/platformclientv2/usergreetingeventgreeting.go +++ b/platformclientv2/usergreetingeventgreeting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Usergreetingeventgreeting struct { } +func (u *Usergreetingeventgreeting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usergreetingeventgreeting + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + OwnerType *string `json:"ownerType,omitempty"` + + Owner *Usergreetingeventgreetingowner `json:"owner,omitempty"` + + GreetingAudioFile *Usergreetingeventgreetingaudiofile `json:"greetingAudioFile,omitempty"` + + AudioTTS *string `json:"audioTTS,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + OwnerType: u.OwnerType, + + Owner: u.Owner, + + GreetingAudioFile: u.GreetingAudioFile, + + AudioTTS: u.AudioTTS, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usergreetingeventgreeting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usergreetingeventgreetingaudiofile.go b/platformclientv2/usergreetingeventgreetingaudiofile.go index aaee7081d..5b1850f69 100644 --- a/platformclientv2/usergreetingeventgreetingaudiofile.go +++ b/platformclientv2/usergreetingeventgreetingaudiofile.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Usergreetingeventgreetingaudiofile struct { } +func (u *Usergreetingeventgreetingaudiofile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usergreetingeventgreetingaudiofile + + + + return json.Marshal(&struct { + DurationMilliseconds *int `json:"durationMilliseconds,omitempty"` + + SizeBytes *int `json:"sizeBytes,omitempty"` + *Alias + }{ + DurationMilliseconds: u.DurationMilliseconds, + + SizeBytes: u.SizeBytes, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usergreetingeventgreetingaudiofile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usergreetingeventgreetingowner.go b/platformclientv2/usergreetingeventgreetingowner.go index 082f19783..1f23dcc43 100644 --- a/platformclientv2/usergreetingeventgreetingowner.go +++ b/platformclientv2/usergreetingeventgreetingowner.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Usergreetingeventgreetingowner struct { } +func (u *Usergreetingeventgreetingowner) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usergreetingeventgreetingowner + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usergreetingeventgreetingowner) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userimage.go b/platformclientv2/userimage.go index 4585ed4eb..1219f6042 100644 --- a/platformclientv2/userimage.go +++ b/platformclientv2/userimage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userimage struct { } +func (u *Userimage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userimage + + + + return json.Marshal(&struct { + Resolution *string `json:"resolution,omitempty"` + + ImageUri *string `json:"imageUri,omitempty"` + *Alias + }{ + Resolution: u.Resolution, + + ImageUri: u.ImageUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userimage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userlanguageentitylisting.go b/platformclientv2/userlanguageentitylisting.go index 4904a6325..98472b91c 100644 --- a/platformclientv2/userlanguageentitylisting.go +++ b/platformclientv2/userlanguageentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userlanguageentitylisting struct { } +func (u *Userlanguageentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userlanguageentitylisting + + + + return json.Marshal(&struct { + Entities *[]Userroutinglanguage `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userlanguageentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userlicenses.go b/platformclientv2/userlicenses.go index 214741124..4d79b8d04 100644 --- a/platformclientv2/userlicenses.go +++ b/platformclientv2/userlicenses.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Userlicenses struct { } +func (u *Userlicenses) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userlicenses + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Licenses *[]string `json:"licenses,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Licenses: u.Licenses, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userlicenses) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userlicensesentitylisting.go b/platformclientv2/userlicensesentitylisting.go index 5a66eb55e..31d889f7c 100644 --- a/platformclientv2/userlicensesentitylisting.go +++ b/platformclientv2/userlicensesentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Userlicensesentitylisting struct { } +func (u *Userlicensesentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userlicensesentitylisting + + + + return json.Marshal(&struct { + Entities *[]Userlicenses `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userlicensesentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userlistschedulerequestbody.go b/platformclientv2/userlistschedulerequestbody.go index 14a6674ac..9c624d0f0 100644 --- a/platformclientv2/userlistschedulerequestbody.go +++ b/platformclientv2/userlistschedulerequestbody.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,50 @@ type Userlistschedulerequestbody struct { } +func (u *Userlistschedulerequestbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userlistschedulerequestbody + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + UserIds *[]string `json:"userIds,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + LoadFullWeeks *bool `json:"loadFullWeeks,omitempty"` + *Alias + }{ + UserIds: u.UserIds, + + StartDate: StartDate, + + EndDate: EndDate, + + LoadFullWeeks: u.LoadFullWeeks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userlistschedulerequestbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userme.go b/platformclientv2/userme.go index 3d2564c46..7ec022cec 100644 --- a/platformclientv2/userme.go +++ b/platformclientv2/userme.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -204,6 +205,214 @@ type Userme struct { } +func (u *Userme) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userme + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Chat *Chat `json:"chat,omitempty"` + + Department *string `json:"department,omitempty"` + + Email *string `json:"email,omitempty"` + + PrimaryContactInfo *[]Contact `json:"primaryContactInfo,omitempty"` + + Addresses *[]Contact `json:"addresses,omitempty"` + + State *string `json:"state,omitempty"` + + Title *string `json:"title,omitempty"` + + Username *string `json:"username,omitempty"` + + Manager *User `json:"manager,omitempty"` + + Images *[]Userimage `json:"images,omitempty"` + + Version *int `json:"version,omitempty"` + + Certifications *[]string `json:"certifications,omitempty"` + + Biography *Biography `json:"biography,omitempty"` + + EmployerInfo *Employerinfo `json:"employerInfo,omitempty"` + + RoutingStatus *Routingstatus `json:"routingStatus,omitempty"` + + Presence *Userpresence `json:"presence,omitempty"` + + ConversationSummary *Userconversationsummary `json:"conversationSummary,omitempty"` + + OutOfOffice *Outofoffice `json:"outOfOffice,omitempty"` + + Geolocation *Geolocation `json:"geolocation,omitempty"` + + Station *Userstations `json:"station,omitempty"` + + Authorization *Userauthorization `json:"authorization,omitempty"` + + ProfileSkills *[]string `json:"profileSkills,omitempty"` + + Locations *[]Location `json:"locations,omitempty"` + + Groups *[]Group `json:"groups,omitempty"` + + Team *Team `json:"team,omitempty"` + + Skills *[]Userroutingskill `json:"skills,omitempty"` + + Languages *[]Userroutinglanguage `json:"languages,omitempty"` + + AcdAutoAnswer *bool `json:"acdAutoAnswer,omitempty"` + + LanguagePreference *string `json:"languagePreference,omitempty"` + + LastTokenIssued *Oauthlasttokenissued `json:"lastTokenIssued,omitempty"` + + Date *Serverdate `json:"date,omitempty"` + + GeolocationSettings *Geolocationsettings `json:"geolocationSettings,omitempty"` + + Organization *Organization `json:"organization,omitempty"` + + PresenceDefinitions *[]Organizationpresence `json:"presenceDefinitions,omitempty"` + + LocationDefinitions *[]Locationdefinition `json:"locationDefinitions,omitempty"` + + OrgAuthorization *[]Domainorganizationrole `json:"orgAuthorization,omitempty"` + + Favorites *[]User `json:"favorites,omitempty"` + + Superiors *[]User `json:"superiors,omitempty"` + + DirectReports *[]User `json:"directReports,omitempty"` + + Adjacents *Adjacents `json:"adjacents,omitempty"` + + RoutingSkills *[]Routingskill `json:"routingSkills,omitempty"` + + FieldConfigs *Fieldconfigs `json:"fieldConfigs,omitempty"` + + Token *Tokeninfo `json:"token,omitempty"` + + Trustors *[]Trustor `json:"trustors,omitempty"` + + OrgProducts *[]Domainorganizationproduct `json:"orgProducts,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Chat: u.Chat, + + Department: u.Department, + + Email: u.Email, + + PrimaryContactInfo: u.PrimaryContactInfo, + + Addresses: u.Addresses, + + State: u.State, + + Title: u.Title, + + Username: u.Username, + + Manager: u.Manager, + + Images: u.Images, + + Version: u.Version, + + Certifications: u.Certifications, + + Biography: u.Biography, + + EmployerInfo: u.EmployerInfo, + + RoutingStatus: u.RoutingStatus, + + Presence: u.Presence, + + ConversationSummary: u.ConversationSummary, + + OutOfOffice: u.OutOfOffice, + + Geolocation: u.Geolocation, + + Station: u.Station, + + Authorization: u.Authorization, + + ProfileSkills: u.ProfileSkills, + + Locations: u.Locations, + + Groups: u.Groups, + + Team: u.Team, + + Skills: u.Skills, + + Languages: u.Languages, + + AcdAutoAnswer: u.AcdAutoAnswer, + + LanguagePreference: u.LanguagePreference, + + LastTokenIssued: u.LastTokenIssued, + + Date: u.Date, + + GeolocationSettings: u.GeolocationSettings, + + Organization: u.Organization, + + PresenceDefinitions: u.PresenceDefinitions, + + LocationDefinitions: u.LocationDefinitions, + + OrgAuthorization: u.OrgAuthorization, + + Favorites: u.Favorites, + + Superiors: u.Superiors, + + DirectReports: u.DirectReports, + + Adjacents: u.Adjacents, + + RoutingSkills: u.RoutingSkills, + + FieldConfigs: u.FieldConfigs, + + Token: u.Token, + + Trustors: u.Trustors, + + OrgProducts: u.OrgProducts, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userme) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userobservationdatacontainer.go b/platformclientv2/userobservationdatacontainer.go index 1e37da182..b844a1730 100644 --- a/platformclientv2/userobservationdatacontainer.go +++ b/platformclientv2/userobservationdatacontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userobservationdatacontainer struct { } +func (u *Userobservationdatacontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userobservationdatacontainer + + + + return json.Marshal(&struct { + Group *map[string]string `json:"group,omitempty"` + + Data *[]Observationmetricdata `json:"data,omitempty"` + *Alias + }{ + Group: u.Group, + + Data: u.Data, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userobservationdatacontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userobservationquery.go b/platformclientv2/userobservationquery.go index 243bdc13a..a9ef46965 100644 --- a/platformclientv2/userobservationquery.go +++ b/platformclientv2/userobservationquery.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Userobservationquery struct { } +func (u *Userobservationquery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userobservationquery + + + + return json.Marshal(&struct { + Filter *Userobservationqueryfilter `json:"filter,omitempty"` + + Metrics *[]string `json:"metrics,omitempty"` + + DetailMetrics *[]string `json:"detailMetrics,omitempty"` + *Alias + }{ + Filter: u.Filter, + + Metrics: u.Metrics, + + DetailMetrics: u.DetailMetrics, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userobservationquery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userobservationqueryclause.go b/platformclientv2/userobservationqueryclause.go index d98c742ef..49b80b0f0 100644 --- a/platformclientv2/userobservationqueryclause.go +++ b/platformclientv2/userobservationqueryclause.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userobservationqueryclause struct { } +func (u *Userobservationqueryclause) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userobservationqueryclause + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Predicates *[]Userobservationquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userobservationqueryclause) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userobservationqueryfilter.go b/platformclientv2/userobservationqueryfilter.go index 118a3125e..bdd217bba 100644 --- a/platformclientv2/userobservationqueryfilter.go +++ b/platformclientv2/userobservationqueryfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Userobservationqueryfilter struct { } +func (u *Userobservationqueryfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userobservationqueryfilter + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Clauses *[]Userobservationqueryclause `json:"clauses,omitempty"` + + Predicates *[]Userobservationquerypredicate `json:"predicates,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Clauses: u.Clauses, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userobservationqueryfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userobservationquerypredicate.go b/platformclientv2/userobservationquerypredicate.go index 726da8112..0b51563fc 100644 --- a/platformclientv2/userobservationquerypredicate.go +++ b/platformclientv2/userobservationquerypredicate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Userobservationquerypredicate struct { } +func (u *Userobservationquerypredicate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userobservationquerypredicate + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Dimension *string `json:"dimension,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Value *string `json:"value,omitempty"` + + VarRange *Numericrange `json:"range,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Dimension: u.Dimension, + + Operator: u.Operator, + + Value: u.Value, + + VarRange: u.VarRange, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userobservationquerypredicate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userobservationqueryresponse.go b/platformclientv2/userobservationqueryresponse.go index 6c0977ca1..935e1798a 100644 --- a/platformclientv2/userobservationqueryresponse.go +++ b/platformclientv2/userobservationqueryresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Userobservationqueryresponse struct { } +func (u *Userobservationqueryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userobservationqueryresponse + + + + return json.Marshal(&struct { + Results *[]Userobservationdatacontainer `json:"results,omitempty"` + *Alias + }{ + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userobservationqueryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userparam.go b/platformclientv2/userparam.go index 2d9cd7f55..97b80aa9d 100644 --- a/platformclientv2/userparam.go +++ b/platformclientv2/userparam.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userparam struct { } +func (u *Userparam) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userparam + + + + return json.Marshal(&struct { + Key *string `json:"key,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + Key: u.Key, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userparam) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userpresence.go b/platformclientv2/userpresence.go index 2da8a33eb..ffdf416bd 100644 --- a/platformclientv2/userpresence.go +++ b/platformclientv2/userpresence.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Userpresence struct { } +func (u *Userpresence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userpresence + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Source *string `json:"source,omitempty"` + + Primary *bool `json:"primary,omitempty"` + + PresenceDefinition *Presencedefinition `json:"presenceDefinition,omitempty"` + + Message *string `json:"message,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Source: u.Source, + + Primary: u.Primary, + + PresenceDefinition: u.PresenceDefinition, + + Message: u.Message, + + ModifiedDate: ModifiedDate, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userpresence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userprofile.go b/platformclientv2/userprofile.go index a07856ecb..4325e5925 100644 --- a/platformclientv2/userprofile.go +++ b/platformclientv2/userprofile.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Userprofile struct { } +func (u *Userprofile) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userprofile + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + State *string `json:"state,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + Expands *Userexpands `json:"expands,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + State: u.State, + + DateModified: DateModified, + + Version: u.Version, + + Expands: u.Expands, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userprofile) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userprofileentitylisting.go b/platformclientv2/userprofileentitylisting.go index 8aa222ae1..21e427225 100644 --- a/platformclientv2/userprofileentitylisting.go +++ b/platformclientv2/userprofileentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userprofileentitylisting struct { } +func (u *Userprofileentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userprofileentitylisting + + + + return json.Marshal(&struct { + Entities *[]Userprofile `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userprofileentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userqueue.go b/platformclientv2/userqueue.go index 8c2bd36d7..e77f9b364 100644 --- a/platformclientv2/userqueue.go +++ b/platformclientv2/userqueue.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -113,6 +114,138 @@ type Userqueue struct { } +func (u *Userqueue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userqueue + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Division *Division `json:"division,omitempty"` + + Description *string `json:"description,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + MemberCount *int `json:"memberCount,omitempty"` + + JoinedMemberCount *int `json:"joinedMemberCount,omitempty"` + + MediaSettings *map[string]Mediasetting `json:"mediaSettings,omitempty"` + + RoutingRules *[]Routingrule `json:"routingRules,omitempty"` + + Bullseye *Bullseye `json:"bullseye,omitempty"` + + AcwSettings *Acwsettings `json:"acwSettings,omitempty"` + + SkillEvaluationMethod *string `json:"skillEvaluationMethod,omitempty"` + + QueueFlow *Domainentityref `json:"queueFlow,omitempty"` + + WhisperPrompt *Domainentityref `json:"whisperPrompt,omitempty"` + + EnableTranscription *bool `json:"enableTranscription,omitempty"` + + EnableManualAssignment *bool `json:"enableManualAssignment,omitempty"` + + CallingPartyName *string `json:"callingPartyName,omitempty"` + + CallingPartyNumber *string `json:"callingPartyNumber,omitempty"` + + DefaultScripts *map[string]Script `json:"defaultScripts,omitempty"` + + OutboundMessagingAddresses *Queuemessagingaddresses `json:"outboundMessagingAddresses,omitempty"` + + OutboundEmailAddress *Queueemailaddress `json:"outboundEmailAddress,omitempty"` + + Joined *bool `json:"joined,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Division: u.Division, + + Description: u.Description, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + MemberCount: u.MemberCount, + + JoinedMemberCount: u.JoinedMemberCount, + + MediaSettings: u.MediaSettings, + + RoutingRules: u.RoutingRules, + + Bullseye: u.Bullseye, + + AcwSettings: u.AcwSettings, + + SkillEvaluationMethod: u.SkillEvaluationMethod, + + QueueFlow: u.QueueFlow, + + WhisperPrompt: u.WhisperPrompt, + + EnableTranscription: u.EnableTranscription, + + EnableManualAssignment: u.EnableManualAssignment, + + CallingPartyName: u.CallingPartyName, + + CallingPartyNumber: u.CallingPartyNumber, + + DefaultScripts: u.DefaultScripts, + + OutboundMessagingAddresses: u.OutboundMessagingAddresses, + + OutboundEmailAddress: u.OutboundEmailAddress, + + Joined: u.Joined, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userqueue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userqueueentitylisting.go b/platformclientv2/userqueueentitylisting.go index 48ac58c02..62045ae6c 100644 --- a/platformclientv2/userqueueentitylisting.go +++ b/platformclientv2/userqueueentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userqueueentitylisting struct { } +func (u *Userqueueentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userqueueentitylisting + + + + return json.Marshal(&struct { + Entities *[]Userqueue `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userqueueentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userrecording.go b/platformclientv2/userrecording.go index e8f6fac56..da4a4998b 100644 --- a/platformclientv2/userrecording.go +++ b/platformclientv2/userrecording.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Userrecording struct { } +func (u *Userrecording) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userrecording + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ContentUri *string `json:"contentUri,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + Conversation *Conversation `json:"conversation,omitempty"` + + ContentLength *int `json:"contentLength,omitempty"` + + DurationMilliseconds *int `json:"durationMilliseconds,omitempty"` + + Thumbnails *[]Documentthumbnail `json:"thumbnails,omitempty"` + + Read *bool `json:"read,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ContentUri: u.ContentUri, + + Workspace: u.Workspace, + + CreatedBy: u.CreatedBy, + + Conversation: u.Conversation, + + ContentLength: u.ContentLength, + + DurationMilliseconds: u.DurationMilliseconds, + + Thumbnails: u.Thumbnails, + + Read: u.Read, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userrecording) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userrecordingentitylisting.go b/platformclientv2/userrecordingentitylisting.go index 37986f31a..ddb3a5348 100644 --- a/platformclientv2/userrecordingentitylisting.go +++ b/platformclientv2/userrecordingentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userrecordingentitylisting struct { } +func (u *Userrecordingentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userrecordingentitylisting + + + + return json.Marshal(&struct { + Entities *[]Userrecording `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userrecordingentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userreference.go b/platformclientv2/userreference.go index 06916ab39..a3f84ea92 100644 --- a/platformclientv2/userreference.go +++ b/platformclientv2/userreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userreference struct { } +func (u *Userreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutinglanguage.go b/platformclientv2/userroutinglanguage.go index 669f8a51b..195ee40f6 100644 --- a/platformclientv2/userroutinglanguage.go +++ b/platformclientv2/userroutinglanguage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Userroutinglanguage struct { } +func (u *Userroutinglanguage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutinglanguage + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Proficiency *float64 `json:"proficiency,omitempty"` + + State *string `json:"state,omitempty"` + + LanguageUri *string `json:"languageUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Proficiency: u.Proficiency, + + State: u.State, + + LanguageUri: u.LanguageUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutinglanguage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutinglanguagepost.go b/platformclientv2/userroutinglanguagepost.go index 64e419231..65264fe5b 100644 --- a/platformclientv2/userroutinglanguagepost.go +++ b/platformclientv2/userroutinglanguagepost.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Userroutinglanguagepost struct { } +func (u *Userroutinglanguagepost) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutinglanguagepost + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Proficiency *float64 `json:"proficiency,omitempty"` + + LanguageUri *string `json:"languageUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Proficiency: u.Proficiency, + + LanguageUri: u.LanguageUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutinglanguagepost) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutingskill.go b/platformclientv2/userroutingskill.go index 15c4d31d6..11dee93b0 100644 --- a/platformclientv2/userroutingskill.go +++ b/platformclientv2/userroutingskill.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Userroutingskill struct { } +func (u *Userroutingskill) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutingskill + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Proficiency *float64 `json:"proficiency,omitempty"` + + State *string `json:"state,omitempty"` + + SkillUri *string `json:"skillUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Proficiency: u.Proficiency, + + State: u.State, + + SkillUri: u.SkillUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutingskill) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutingskillpost.go b/platformclientv2/userroutingskillpost.go index 1981e357d..c15e5df72 100644 --- a/platformclientv2/userroutingskillpost.go +++ b/platformclientv2/userroutingskillpost.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Userroutingskillpost struct { } +func (u *Userroutingskillpost) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutingskillpost + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Proficiency *float64 `json:"proficiency,omitempty"` + + SkillUri *string `json:"skillUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Proficiency: u.Proficiency, + + SkillUri: u.SkillUri, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutingskillpost) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutingstatuserrorinfo.go b/platformclientv2/userroutingstatuserrorinfo.go index 5e3f9497e..3d9e2b1cf 100644 --- a/platformclientv2/userroutingstatuserrorinfo.go +++ b/platformclientv2/userroutingstatuserrorinfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Userroutingstatuserrorinfo struct { } +func (u *Userroutingstatuserrorinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutingstatuserrorinfo + + + + return json.Marshal(&struct { + ErrorCode *string `json:"errorCode,omitempty"` + + Status *int `json:"status,omitempty"` + + CorrelationId *string `json:"correlationId,omitempty"` + + UserMessage *string `json:"userMessage,omitempty"` + + UserParamsMessage *string `json:"userParamsMessage,omitempty"` + + UserParams *[]Userroutingstatususerparam `json:"userParams,omitempty"` + *Alias + }{ + ErrorCode: u.ErrorCode, + + Status: u.Status, + + CorrelationId: u.CorrelationId, + + UserMessage: u.UserMessage, + + UserParamsMessage: u.UserParamsMessage, + + UserParams: u.UserParams, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutingstatuserrorinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutingstatusroutingstatus.go b/platformclientv2/userroutingstatusroutingstatus.go index 85053cb0a..31acbdcbf 100644 --- a/platformclientv2/userroutingstatusroutingstatus.go +++ b/platformclientv2/userroutingstatusroutingstatus.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Userroutingstatusroutingstatus struct { } +func (u *Userroutingstatusroutingstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutingstatusroutingstatus + + + StartTime := new(string) + if u.StartTime != nil { + + *StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartTime = nil + } + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + StartTime *string `json:"startTime,omitempty"` + *Alias + }{ + Status: u.Status, + + StartTime: StartTime, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutingstatusroutingstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutingstatususerparam.go b/platformclientv2/userroutingstatususerparam.go index 003756437..9e2a9900a 100644 --- a/platformclientv2/userroutingstatususerparam.go +++ b/platformclientv2/userroutingstatususerparam.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Userroutingstatususerparam struct { } +func (u *Userroutingstatususerparam) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutingstatususerparam + + + + return json.Marshal(&struct { + Key *string `json:"key,omitempty"` + + Value *string `json:"value,omitempty"` + + AdditionalProperties *interface{} `json:"additionalProperties,omitempty"` + *Alias + }{ + Key: u.Key, + + Value: u.Value, + + AdditionalProperties: u.AdditionalProperties, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutingstatususerparam) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userroutingstatususerroutingstatus.go b/platformclientv2/userroutingstatususerroutingstatus.go index 47e24ee86..9f882c5c5 100644 --- a/platformclientv2/userroutingstatususerroutingstatus.go +++ b/platformclientv2/userroutingstatususerroutingstatus.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userroutingstatususerroutingstatus struct { } +func (u *Userroutingstatususerroutingstatus) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userroutingstatususerroutingstatus + + + + return json.Marshal(&struct { + RoutingStatus *Userroutingstatusroutingstatus `json:"routingStatus,omitempty"` + + ErrorInfo *Userroutingstatuserrorinfo `json:"errorInfo,omitempty"` + *Alias + }{ + RoutingStatus: u.RoutingStatus, + + ErrorInfo: u.ErrorInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userroutingstatususerroutingstatus) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userschedule.go b/platformclientv2/userschedule.go index 3f1dd321c..fc3889abd 100644 --- a/platformclientv2/userschedule.go +++ b/platformclientv2/userschedule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Userschedule struct { } +func (u *Userschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userschedule + + + + return json.Marshal(&struct { + Shifts *[]Userscheduleshift `json:"shifts,omitempty"` + + FullDayTimeOffMarkers *[]Userschedulefulldaytimeoffmarker `json:"fullDayTimeOffMarkers,omitempty"` + + Delete *bool `json:"delete,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + WorkPlanId *string `json:"workPlanId,omitempty"` + *Alias + }{ + Shifts: u.Shifts, + + FullDayTimeOffMarkers: u.FullDayTimeOffMarkers, + + Delete: u.Delete, + + Metadata: u.Metadata, + + WorkPlanId: u.WorkPlanId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userscheduleactivity.go b/platformclientv2/userscheduleactivity.go index 7ee74b797..f705fbd5c 100644 --- a/platformclientv2/userscheduleactivity.go +++ b/platformclientv2/userscheduleactivity.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Userscheduleactivity struct { } +func (u *Userscheduleactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userscheduleactivity + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Description *string `json:"description,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + IsDstFallback *bool `json:"isDstFallback,omitempty"` + + TimeOffRequestId *string `json:"timeOffRequestId,omitempty"` + *Alias + }{ + ActivityCodeId: u.ActivityCodeId, + + StartDate: StartDate, + + LengthInMinutes: u.LengthInMinutes, + + Description: u.Description, + + CountsAsPaidTime: u.CountsAsPaidTime, + + IsDstFallback: u.IsDstFallback, + + TimeOffRequestId: u.TimeOffRequestId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userscheduleactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userscheduleadherence.go b/platformclientv2/userscheduleadherence.go index d2c8073e2..579945303 100644 --- a/platformclientv2/userscheduleadherence.go +++ b/platformclientv2/userscheduleadherence.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -85,6 +86,118 @@ type Userscheduleadherence struct { } +func (u *Userscheduleadherence) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userscheduleadherence + + + TimeOfAdherenceChange := new(string) + if u.TimeOfAdherenceChange != nil { + + *TimeOfAdherenceChange = timeutil.Strftime(u.TimeOfAdherenceChange, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + TimeOfAdherenceChange = nil + } + + PresenceUpdateTime := new(string) + if u.PresenceUpdateTime != nil { + + *PresenceUpdateTime = timeutil.Strftime(u.PresenceUpdateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PresenceUpdateTime = nil + } + + ActiveQueuesModifiedTime := new(string) + if u.ActiveQueuesModifiedTime != nil { + + *ActiveQueuesModifiedTime = timeutil.Strftime(u.ActiveQueuesModifiedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ActiveQueuesModifiedTime = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + User *Userreference `json:"user,omitempty"` + + ManagementUnit *Managementunit `json:"managementUnit,omitempty"` + + Team *Team `json:"team,omitempty"` + + ScheduledActivityCategory *string `json:"scheduledActivityCategory,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + OrganizationSecondaryPresenceId *string `json:"organizationSecondaryPresenceId,omitempty"` + + RoutingStatus *string `json:"routingStatus,omitempty"` + + ActualActivityCategory *string `json:"actualActivityCategory,omitempty"` + + IsOutOfOffice *bool `json:"isOutOfOffice,omitempty"` + + AdherenceState *string `json:"adherenceState,omitempty"` + + Impact *string `json:"impact,omitempty"` + + TimeOfAdherenceChange *string `json:"timeOfAdherenceChange,omitempty"` + + PresenceUpdateTime *string `json:"presenceUpdateTime,omitempty"` + + ActiveQueues *[]Queuereference `json:"activeQueues,omitempty"` + + ActiveQueuesModifiedTime *string `json:"activeQueuesModifiedTime,omitempty"` + + RemovedFromManagementUnit *bool `json:"removedFromManagementUnit,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + User: u.User, + + ManagementUnit: u.ManagementUnit, + + Team: u.Team, + + ScheduledActivityCategory: u.ScheduledActivityCategory, + + SystemPresence: u.SystemPresence, + + OrganizationSecondaryPresenceId: u.OrganizationSecondaryPresenceId, + + RoutingStatus: u.RoutingStatus, + + ActualActivityCategory: u.ActualActivityCategory, + + IsOutOfOffice: u.IsOutOfOffice, + + AdherenceState: u.AdherenceState, + + Impact: u.Impact, + + TimeOfAdherenceChange: TimeOfAdherenceChange, + + PresenceUpdateTime: PresenceUpdateTime, + + ActiveQueues: u.ActiveQueues, + + ActiveQueuesModifiedTime: ActiveQueuesModifiedTime, + + RemovedFromManagementUnit: u.RemovedFromManagementUnit, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userscheduleadherence) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userscheduleadherencelisting.go b/platformclientv2/userscheduleadherencelisting.go index 5b108aea1..597fb5b95 100644 --- a/platformclientv2/userscheduleadherencelisting.go +++ b/platformclientv2/userscheduleadherencelisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Userscheduleadherencelisting struct { } +func (u *Userscheduleadherencelisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userscheduleadherencelisting + + + + return json.Marshal(&struct { + Entities *[]Userscheduleadherence `json:"entities,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + Entities: u.Entities, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userscheduleadherencelisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userschedulecontainer.go b/platformclientv2/userschedulecontainer.go index 1d97f64db..1ac0e6e0a 100644 --- a/platformclientv2/userschedulecontainer.go +++ b/platformclientv2/userschedulecontainer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Userschedulecontainer struct { } +func (u *Userschedulecontainer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userschedulecontainer + + + + return json.Marshal(&struct { + ManagementUnitTimeZone *string `json:"managementUnitTimeZone,omitempty"` + + PublishedSchedules *[]Weekschedulereference `json:"publishedSchedules,omitempty"` + + UserSchedules *map[string]Userschedule `json:"userSchedules,omitempty"` + *Alias + }{ + ManagementUnitTimeZone: u.ManagementUnitTimeZone, + + PublishedSchedules: u.PublishedSchedules, + + UserSchedules: u.UserSchedules, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userschedulecontainer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userschedulefulldaytimeoffmarker.go b/platformclientv2/userschedulefulldaytimeoffmarker.go index cb180ad05..0fd89a067 100644 --- a/platformclientv2/userschedulefulldaytimeoffmarker.go +++ b/platformclientv2/userschedulefulldaytimeoffmarker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Userschedulefulldaytimeoffmarker struct { } +func (u *Userschedulefulldaytimeoffmarker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userschedulefulldaytimeoffmarker + + + + return json.Marshal(&struct { + ManagementUnitDate *string `json:"managementUnitDate,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + IsPaid *bool `json:"isPaid,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Description *string `json:"description,omitempty"` + + Delete *bool `json:"delete,omitempty"` + *Alias + }{ + ManagementUnitDate: u.ManagementUnitDate, + + ActivityCodeId: u.ActivityCodeId, + + IsPaid: u.IsPaid, + + LengthInMinutes: u.LengthInMinutes, + + Description: u.Description, + + Delete: u.Delete, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userschedulefulldaytimeoffmarker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userscheduleshift.go b/platformclientv2/userscheduleshift.go index 52ee66fb3..6c3e8e5ef 100644 --- a/platformclientv2/userscheduleshift.go +++ b/platformclientv2/userscheduleshift.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Userscheduleshift struct { } +func (u *Userscheduleshift) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userscheduleshift + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + WeekSchedule *Weekschedulereference `json:"weekSchedule,omitempty"` + + Id *string `json:"id,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Activities *[]Userscheduleactivity `json:"activities,omitempty"` + + Delete *bool `json:"delete,omitempty"` + + ManuallyEdited *bool `json:"manuallyEdited,omitempty"` + *Alias + }{ + WeekSchedule: u.WeekSchedule, + + Id: u.Id, + + StartDate: StartDate, + + LengthInMinutes: u.LengthInMinutes, + + Activities: u.Activities, + + Delete: u.Delete, + + ManuallyEdited: u.ManuallyEdited, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userscheduleshift) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usersearchcriteria.go b/platformclientv2/usersearchcriteria.go index f0f5c5e3a..63d06e8ac 100644 --- a/platformclientv2/usersearchcriteria.go +++ b/platformclientv2/usersearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Usersearchcriteria struct { } +func (u *Usersearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usersearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Usersearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usersearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usersearchrequest.go b/platformclientv2/usersearchrequest.go index ebb98189a..0a2dbca3f 100644 --- a/platformclientv2/usersearchrequest.go +++ b/platformclientv2/usersearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Usersearchrequest struct { } +func (u *Usersearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usersearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + Expand *[]string `json:"expand,omitempty"` + + Query *[]Usersearchcriteria `json:"query,omitempty"` + + IntegrationPresenceSource *string `json:"integrationPresenceSource,omitempty"` + + EnforcePermissions *bool `json:"enforcePermissions,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + Expand: u.Expand, + + Query: u.Query, + + IntegrationPresenceSource: u.IntegrationPresenceSource, + + EnforcePermissions: u.EnforcePermissions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usersearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userskillentitylisting.go b/platformclientv2/userskillentitylisting.go index cb7b8c16c..a7b2f66f6 100644 --- a/platformclientv2/userskillentitylisting.go +++ b/platformclientv2/userskillentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Userskillentitylisting struct { } +func (u *Userskillentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userskillentitylisting + + + + return json.Marshal(&struct { + Entities *[]Userroutingskill `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userskillentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userssearchresponse.go b/platformclientv2/userssearchresponse.go index e4e624a5b..16916c358 100644 --- a/platformclientv2/userssearchresponse.go +++ b/platformclientv2/userssearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Userssearchresponse struct { } +func (u *Userssearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userssearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + CurrentPage *string `json:"currentPage,omitempty"` + + NextPage *string `json:"nextPage,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *[]User `json:"results,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PreviousPage: u.PreviousPage, + + CurrentPage: u.CurrentPage, + + NextPage: u.NextPage, + + Types: u.Types, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userssearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userstation.go b/platformclientv2/userstation.go index 5e1c0268b..c3c225cd8 100644 --- a/platformclientv2/userstation.go +++ b/platformclientv2/userstation.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Userstation struct { } +func (u *Userstation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userstation + + + AssociatedDate := new(string) + if u.AssociatedDate != nil { + + *AssociatedDate = timeutil.Strftime(u.AssociatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + AssociatedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + AssociatedUser *User `json:"associatedUser,omitempty"` + + AssociatedDate *string `json:"associatedDate,omitempty"` + + DefaultUser *User `json:"defaultUser,omitempty"` + + ProviderInfo *map[string]string `json:"providerInfo,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + AssociatedUser: u.AssociatedUser, + + AssociatedDate: AssociatedDate, + + DefaultUser: u.DefaultUser, + + ProviderInfo: u.ProviderInfo, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userstation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userstationchangetopicuser.go b/platformclientv2/userstationchangetopicuser.go index 136bcf44c..b24494db1 100644 --- a/platformclientv2/userstationchangetopicuser.go +++ b/platformclientv2/userstationchangetopicuser.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Userstationchangetopicuser struct { } +func (u *Userstationchangetopicuser) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userstationchangetopicuser + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userstationchangetopicuser) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userstationchangetopicuserstation.go b/platformclientv2/userstationchangetopicuserstation.go index 89a104be6..90dce4d48 100644 --- a/platformclientv2/userstationchangetopicuserstation.go +++ b/platformclientv2/userstationchangetopicuserstation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Userstationchangetopicuserstation struct { } +func (u *Userstationchangetopicuserstation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userstationchangetopicuserstation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + AssociatedUser *Userstationchangetopicuser `json:"associatedUser,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + AssociatedUser: u.AssociatedUser, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userstationchangetopicuserstation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userstationchangetopicuserstations.go b/platformclientv2/userstationchangetopicuserstations.go index b596bcbd6..d82cc5c59 100644 --- a/platformclientv2/userstationchangetopicuserstations.go +++ b/platformclientv2/userstationchangetopicuserstations.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Userstationchangetopicuserstations struct { } +func (u *Userstationchangetopicuserstations) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userstationchangetopicuserstations + + + + return json.Marshal(&struct { + AssociatedStation *Userstationchangetopicuserstation `json:"associatedStation,omitempty"` + *Alias + }{ + AssociatedStation: u.AssociatedStation, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userstationchangetopicuserstations) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/userstations.go b/platformclientv2/userstations.go index ff603e735..1276de755 100644 --- a/platformclientv2/userstations.go +++ b/platformclientv2/userstations.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Userstations struct { } +func (u *Userstations) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Userstations + + + + return json.Marshal(&struct { + AssociatedStation *Userstation `json:"associatedStation,omitempty"` + + EffectiveStation *Userstation `json:"effectiveStation,omitempty"` + + DefaultStation *Userstation `json:"defaultStation,omitempty"` + + LastAssociatedStation *Userstation `json:"lastAssociatedStation,omitempty"` + *Alias + }{ + AssociatedStation: u.AssociatedStation, + + EffectiveStation: u.EffectiveStation, + + DefaultStation: u.DefaultStation, + + LastAssociatedStation: u.LastAssociatedStation, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Userstations) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usertokenstopictokennotification.go b/platformclientv2/usertokenstopictokennotification.go index ac557caee..a69fe6f41 100644 --- a/platformclientv2/usertokenstopictokennotification.go +++ b/platformclientv2/usertokenstopictokennotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Usertokenstopictokennotification struct { } +func (u *Usertokenstopictokennotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usertokenstopictokennotification + + + + return json.Marshal(&struct { + User *Usertokenstopicurireference `json:"user,omitempty"` + + IpAddress *string `json:"ipAddress,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + TokenExpirationDate *string `json:"tokenExpirationDate,omitempty"` + + SessionId *string `json:"sessionId,omitempty"` + + ClientId *string `json:"clientId,omitempty"` + + TokenHash *string `json:"tokenHash,omitempty"` + *Alias + }{ + User: u.User, + + IpAddress: u.IpAddress, + + DateCreated: u.DateCreated, + + TokenExpirationDate: u.TokenExpirationDate, + + SessionId: u.SessionId, + + ClientId: u.ClientId, + + TokenHash: u.TokenHash, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usertokenstopictokennotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/usertokenstopicurireference.go b/platformclientv2/usertokenstopicurireference.go index e7cf137c4..c3211f005 100644 --- a/platformclientv2/usertokenstopicurireference.go +++ b/platformclientv2/usertokenstopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Usertokenstopicurireference struct { } +func (u *Usertokenstopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Usertokenstopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Usertokenstopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/utilization.go b/platformclientv2/utilization.go index de08ff7dd..821d36927 100644 --- a/platformclientv2/utilization.go +++ b/platformclientv2/utilization.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Utilization struct { } +func (u *Utilization) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Utilization + + + + return json.Marshal(&struct { + Utilization *map[string]Mediautilization `json:"utilization,omitempty"` + *Alias + }{ + Utilization: u.Utilization, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Utilization) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/utterance.go b/platformclientv2/utterance.go index b426250f6..dbfb22b69 100644 --- a/platformclientv2/utterance.go +++ b/platformclientv2/utterance.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Utterance struct { } +func (u *Utterance) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Utterance + + + + return json.Marshal(&struct { + UtteranceText *string `json:"utteranceText,omitempty"` + *Alias + }{ + UtteranceText: u.UtteranceText, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Utterance) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/validateaddressrequest.go b/platformclientv2/validateaddressrequest.go index 167e6b87b..4472061ad 100644 --- a/platformclientv2/validateaddressrequest.go +++ b/platformclientv2/validateaddressrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Validateaddressrequest struct { } +func (u *Validateaddressrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Validateaddressrequest + + + + return json.Marshal(&struct { + Address *Streetaddress `json:"address,omitempty"` + *Alias + }{ + Address: u.Address, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Validateaddressrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/validateaddressresponse.go b/platformclientv2/validateaddressresponse.go index 1ec5c3118..e7501d38a 100644 --- a/platformclientv2/validateaddressresponse.go +++ b/platformclientv2/validateaddressresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Validateaddressresponse struct { } +func (u *Validateaddressresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Validateaddressresponse + + + + return json.Marshal(&struct { + Valid *bool `json:"valid,omitempty"` + + Response *Subscriberresponse `json:"response,omitempty"` + *Alias + }{ + Valid: u.Valid, + + Response: u.Response, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Validateaddressresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/validateworkplanmessages.go b/platformclientv2/validateworkplanmessages.go index d67b666bb..e410f69b1 100644 --- a/platformclientv2/validateworkplanmessages.go +++ b/platformclientv2/validateworkplanmessages.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Validateworkplanmessages struct { } +func (u *Validateworkplanmessages) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Validateworkplanmessages + + + + return json.Marshal(&struct { + ViolationMessages *[]Workplanconfigurationviolationmessage `json:"violationMessages,omitempty"` + + ConstraintConflictMessage *Constraintconflictmessage `json:"constraintConflictMessage,omitempty"` + *Alias + }{ + ViolationMessages: u.ViolationMessages, + + ConstraintConflictMessage: u.ConstraintConflictMessage, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Validateworkplanmessages) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/validateworkplanresponse.go b/platformclientv2/validateworkplanresponse.go index 893c0906a..50a4d922d 100644 --- a/platformclientv2/validateworkplanresponse.go +++ b/platformclientv2/validateworkplanresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Validateworkplanresponse struct { } +func (u *Validateworkplanresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Validateworkplanresponse + + + + return json.Marshal(&struct { + WorkPlan *Workplanreference `json:"workPlan,omitempty"` + + Valid *bool `json:"valid,omitempty"` + + Messages *Validateworkplanmessages `json:"messages,omitempty"` + *Alias + }{ + WorkPlan: u.WorkPlan, + + Valid: u.Valid, + + Messages: u.Messages, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Validateworkplanresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/validationlimits.go b/platformclientv2/validationlimits.go index dda5605e6..20177f421 100644 --- a/platformclientv2/validationlimits.go +++ b/platformclientv2/validationlimits.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Validationlimits struct { } +func (u *Validationlimits) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Validationlimits + + + + return json.Marshal(&struct { + MinLength *Minlength `json:"minLength,omitempty"` + + MaxLength *Maxlength `json:"maxLength,omitempty"` + + MinItems *Minlength `json:"minItems,omitempty"` + + MaxItems *Maxlength `json:"maxItems,omitempty"` + + Minimum *Minlength `json:"minimum,omitempty"` + + Maximum *Maxlength `json:"maximum,omitempty"` + *Alias + }{ + MinLength: u.MinLength, + + MaxLength: u.MaxLength, + + MinItems: u.MinItems, + + MaxItems: u.MaxItems, + + Minimum: u.Minimum, + + Maximum: u.Maximum, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Validationlimits) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/validationservicerequest.go b/platformclientv2/validationservicerequest.go index d2cfb7f98..8ccaf853e 100644 --- a/platformclientv2/validationservicerequest.go +++ b/platformclientv2/validationservicerequest.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,34 @@ type Validationservicerequest struct { } +func (u *Validationservicerequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Validationservicerequest + + + DateImportEnded := new(string) + if u.DateImportEnded != nil { + + *DateImportEnded = timeutil.Strftime(u.DateImportEnded, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateImportEnded = nil + } + + + return json.Marshal(&struct { + DateImportEnded *string `json:"dateImportEnded,omitempty"` + + FileUrl *string `json:"fileUrl,omitempty"` + *Alias + }{ + DateImportEnded: DateImportEnded, + + FileUrl: u.FileUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Validationservicerequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/valuewrapperdate.go b/platformclientv2/valuewrapperdate.go index e9fb2177d..6c7c81586 100644 --- a/platformclientv2/valuewrapperdate.go +++ b/platformclientv2/valuewrapperdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -13,6 +14,30 @@ type Valuewrapperdate struct { } +func (u *Valuewrapperdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Valuewrapperdate + + + Value := new(string) + if u.Value != nil { + + *Value = timeutil.Strftime(u.Value, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Value = nil + } + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + *Alias + }{ + Value: Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Valuewrapperdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/valuewrapperplanningperiodsettings.go b/platformclientv2/valuewrapperplanningperiodsettings.go index d3e694bff..e7384c09f 100644 --- a/platformclientv2/valuewrapperplanningperiodsettings.go +++ b/platformclientv2/valuewrapperplanningperiodsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Valuewrapperplanningperiodsettings struct { } +func (u *Valuewrapperplanningperiodsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Valuewrapperplanningperiodsettings + + + + return json.Marshal(&struct { + Value *Planningperiodsettings `json:"value,omitempty"` + *Alias + }{ + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Valuewrapperplanningperiodsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/valuewrapperstring.go b/platformclientv2/valuewrapperstring.go index 3614af843..90e149508 100644 --- a/platformclientv2/valuewrapperstring.go +++ b/platformclientv2/valuewrapperstring.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Valuewrapperstring struct { } +func (u *Valuewrapperstring) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Valuewrapperstring + + + + return json.Marshal(&struct { + Value *string `json:"value,omitempty"` + *Alias + }{ + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Valuewrapperstring) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/vendorconnectionrequest.go b/platformclientv2/vendorconnectionrequest.go index 6eba26c98..68a0b0c71 100644 --- a/platformclientv2/vendorconnectionrequest.go +++ b/platformclientv2/vendorconnectionrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Vendorconnectionrequest struct { } +func (u *Vendorconnectionrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Vendorconnectionrequest + + + + return json.Marshal(&struct { + Publisher *string `json:"publisher,omitempty"` + + VarType *string `json:"type,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Publisher: u.Publisher, + + VarType: u.VarType, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Vendorconnectionrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/video.go b/platformclientv2/video.go index a3d501c26..1aca2f43b 100644 --- a/platformclientv2/video.go +++ b/platformclientv2/video.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -81,6 +82,114 @@ type Video struct { } +func (u *Video) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Video + + + StartAlertingTime := new(string) + if u.StartAlertingTime != nil { + + *StartAlertingTime = timeutil.Strftime(u.StartAlertingTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartAlertingTime = nil + } + + ConnectedTime := new(string) + if u.ConnectedTime != nil { + + *ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ConnectedTime = nil + } + + DisconnectedTime := new(string) + if u.DisconnectedTime != nil { + + *DisconnectedTime = timeutil.Strftime(u.DisconnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DisconnectedTime = nil + } + + + return json.Marshal(&struct { + State *string `json:"state,omitempty"` + + Id *string `json:"id,omitempty"` + + Context *string `json:"context,omitempty"` + + AudioMuted *bool `json:"audioMuted,omitempty"` + + VideoMuted *bool `json:"videoMuted,omitempty"` + + SharingScreen *bool `json:"sharingScreen,omitempty"` + + PeerCount *int `json:"peerCount,omitempty"` + + DisconnectType *string `json:"disconnectType,omitempty"` + + StartAlertingTime *string `json:"startAlertingTime,omitempty"` + + ConnectedTime *string `json:"connectedTime,omitempty"` + + DisconnectedTime *string `json:"disconnectedTime,omitempty"` + + Provider *string `json:"provider,omitempty"` + + PeerId *string `json:"peerId,omitempty"` + + Msids *[]string `json:"msids,omitempty"` + + Self *Address `json:"self,omitempty"` + + Wrapup *Wrapup `json:"wrapup,omitempty"` + + AfterCallWork *Aftercallwork `json:"afterCallWork,omitempty"` + + AfterCallWorkRequired *bool `json:"afterCallWorkRequired,omitempty"` + *Alias + }{ + State: u.State, + + Id: u.Id, + + Context: u.Context, + + AudioMuted: u.AudioMuted, + + VideoMuted: u.VideoMuted, + + SharingScreen: u.SharingScreen, + + PeerCount: u.PeerCount, + + DisconnectType: u.DisconnectType, + + StartAlertingTime: StartAlertingTime, + + ConnectedTime: ConnectedTime, + + DisconnectedTime: DisconnectedTime, + + Provider: u.Provider, + + PeerId: u.PeerId, + + Msids: u.Msids, + + Self: u.Self, + + Wrapup: u.Wrapup, + + AfterCallWork: u.AfterCallWork, + + AfterCallWorkRequired: u.AfterCallWorkRequired, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Video) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/viewfilter.go b/platformclientv2/viewfilter.go index 7d52e65b7..740b0f80a 100644 --- a/platformclientv2/viewfilter.go +++ b/platformclientv2/viewfilter.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -488,6 +489,498 @@ type Viewfilter struct { } +func (u *Viewfilter) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Viewfilter + + + + return json.Marshal(&struct { + MediaTypes *[]string `json:"mediaTypes,omitempty"` + + QueueIds *[]string `json:"queueIds,omitempty"` + + SkillIds *[]string `json:"skillIds,omitempty"` + + SkillGroups *[]string `json:"skillGroups,omitempty"` + + LanguageIds *[]string `json:"languageIds,omitempty"` + + LanguageGroups *[]string `json:"languageGroups,omitempty"` + + Directions *[]string `json:"directions,omitempty"` + + OriginatingDirections *[]string `json:"originatingDirections,omitempty"` + + WrapUpCodes *[]string `json:"wrapUpCodes,omitempty"` + + DnisList *[]string `json:"dnisList,omitempty"` + + SessionDnisList *[]string `json:"sessionDnisList,omitempty"` + + FilterQueuesByUserIds *[]string `json:"filterQueuesByUserIds,omitempty"` + + FilterUsersByQueueIds *[]string `json:"filterUsersByQueueIds,omitempty"` + + UserIds *[]string `json:"userIds,omitempty"` + + AddressTos *[]string `json:"addressTos,omitempty"` + + AddressFroms *[]string `json:"addressFroms,omitempty"` + + OutboundCampaignIds *[]string `json:"outboundCampaignIds,omitempty"` + + OutboundContactListIds *[]string `json:"outboundContactListIds,omitempty"` + + ContactIds *[]string `json:"contactIds,omitempty"` + + ExternalContactIds *[]string `json:"externalContactIds,omitempty"` + + ExternalOrgIds *[]string `json:"externalOrgIds,omitempty"` + + AniList *[]string `json:"aniList,omitempty"` + + DurationsMilliseconds *[]Numericrange `json:"durationsMilliseconds,omitempty"` + + AcdDurationsMilliseconds *[]Numericrange `json:"acdDurationsMilliseconds,omitempty"` + + TalkDurationsMilliseconds *[]Numericrange `json:"talkDurationsMilliseconds,omitempty"` + + AcwDurationsMilliseconds *[]Numericrange `json:"acwDurationsMilliseconds,omitempty"` + + HandleDurationsMilliseconds *[]Numericrange `json:"handleDurationsMilliseconds,omitempty"` + + HoldDurationsMilliseconds *[]Numericrange `json:"holdDurationsMilliseconds,omitempty"` + + AbandonDurationsMilliseconds *[]Numericrange `json:"abandonDurationsMilliseconds,omitempty"` + + EvaluationScore *Numericrange `json:"evaluationScore,omitempty"` + + EvaluationCriticalScore *Numericrange `json:"evaluationCriticalScore,omitempty"` + + EvaluationFormIds *[]string `json:"evaluationFormIds,omitempty"` + + EvaluatedAgentIds *[]string `json:"evaluatedAgentIds,omitempty"` + + EvaluatorIds *[]string `json:"evaluatorIds,omitempty"` + + Transferred *bool `json:"transferred,omitempty"` + + Abandoned *bool `json:"abandoned,omitempty"` + + Answered *bool `json:"answered,omitempty"` + + MessageTypes *[]string `json:"messageTypes,omitempty"` + + DivisionIds *[]string `json:"divisionIds,omitempty"` + + SurveyFormIds *[]string `json:"surveyFormIds,omitempty"` + + SurveyTotalScore *Numericrange `json:"surveyTotalScore,omitempty"` + + SurveyNpsScore *Numericrange `json:"surveyNpsScore,omitempty"` + + Mos *Numericrange `json:"mos,omitempty"` + + SurveyQuestionGroupScore *Numericrange `json:"surveyQuestionGroupScore,omitempty"` + + SurveyPromoterScore *Numericrange `json:"surveyPromoterScore,omitempty"` + + SurveyFormContextIds *[]string `json:"surveyFormContextIds,omitempty"` + + ConversationIds *[]string `json:"conversationIds,omitempty"` + + SipCallIds *[]string `json:"sipCallIds,omitempty"` + + IsEnded *bool `json:"isEnded,omitempty"` + + IsSurveyed *bool `json:"isSurveyed,omitempty"` + + SurveyScores *[]Numericrange `json:"surveyScores,omitempty"` + + PromoterScores *[]Numericrange `json:"promoterScores,omitempty"` + + IsCampaign *bool `json:"isCampaign,omitempty"` + + SurveyStatuses *[]string `json:"surveyStatuses,omitempty"` + + ConversationProperties *Conversationproperties `json:"conversationProperties,omitempty"` + + IsBlindTransferred *bool `json:"isBlindTransferred,omitempty"` + + IsConsulted *bool `json:"isConsulted,omitempty"` + + IsConsultTransferred *bool `json:"isConsultTransferred,omitempty"` + + RemoteParticipants *[]string `json:"remoteParticipants,omitempty"` + + FlowIds *[]string `json:"flowIds,omitempty"` + + FlowOutcomeIds *[]string `json:"flowOutcomeIds,omitempty"` + + FlowOutcomeValues *[]string `json:"flowOutcomeValues,omitempty"` + + FlowDestinationTypes *[]string `json:"flowDestinationTypes,omitempty"` + + FlowDisconnectReasons *[]string `json:"flowDisconnectReasons,omitempty"` + + FlowTypes *[]string `json:"flowTypes,omitempty"` + + FlowEntryTypes *[]string `json:"flowEntryTypes,omitempty"` + + FlowEntryReasons *[]string `json:"flowEntryReasons,omitempty"` + + FlowVersions *[]string `json:"flowVersions,omitempty"` + + GroupIds *[]string `json:"groupIds,omitempty"` + + HasJourneyCustomerId *bool `json:"hasJourneyCustomerId,omitempty"` + + HasJourneyActionMapId *bool `json:"hasJourneyActionMapId,omitempty"` + + HasJourneyVisitId *bool `json:"hasJourneyVisitId,omitempty"` + + HasMedia *bool `json:"hasMedia,omitempty"` + + RoleIds *[]string `json:"roleIds,omitempty"` + + ReportsTos *[]string `json:"reportsTos,omitempty"` + + LocationIds *[]string `json:"locationIds,omitempty"` + + FlowOutTypes *[]string `json:"flowOutTypes,omitempty"` + + ProviderList *[]string `json:"providerList,omitempty"` + + CallbackNumberList *[]string `json:"callbackNumberList,omitempty"` + + CallbackInterval *string `json:"callbackInterval,omitempty"` + + UsedRoutingTypes *[]string `json:"usedRoutingTypes,omitempty"` + + RequestedRoutingTypes *[]string `json:"requestedRoutingTypes,omitempty"` + + HasAgentAssistId *bool `json:"hasAgentAssistId,omitempty"` + + Transcripts *[]Transcripts `json:"transcripts,omitempty"` + + TranscriptLanguages *[]string `json:"transcriptLanguages,omitempty"` + + ParticipantPurposes *[]string `json:"participantPurposes,omitempty"` + + ShowFirstQueue *bool `json:"showFirstQueue,omitempty"` + + TeamIds *[]string `json:"teamIds,omitempty"` + + FilterUsersByTeamIds *[]string `json:"filterUsersByTeamIds,omitempty"` + + JourneyActionMapIds *[]string `json:"journeyActionMapIds,omitempty"` + + JourneyOutcomeIds *[]string `json:"journeyOutcomeIds,omitempty"` + + JourneySegmentIds *[]string `json:"journeySegmentIds,omitempty"` + + JourneyActionMapTypes *[]string `json:"journeyActionMapTypes,omitempty"` + + DevelopmentRoleList *[]string `json:"developmentRoleList,omitempty"` + + DevelopmentTypeList *[]string `json:"developmentTypeList,omitempty"` + + DevelopmentStatusList *[]string `json:"developmentStatusList,omitempty"` + + DevelopmentModuleIds *[]string `json:"developmentModuleIds,omitempty"` + + DevelopmentActivityOverdue *bool `json:"developmentActivityOverdue,omitempty"` + + CustomerSentimentScore *Numericrange `json:"customerSentimentScore,omitempty"` + + CustomerSentimentTrend *Numericrange `json:"customerSentimentTrend,omitempty"` + + FlowTransferTargets *[]string `json:"flowTransferTargets,omitempty"` + + DevelopmentName *string `json:"developmentName,omitempty"` + + TopicIds *[]string `json:"topicIds,omitempty"` + + ExternalTags *[]string `json:"externalTags,omitempty"` + + IsNotResponding *bool `json:"isNotResponding,omitempty"` + + IsAuthenticated *bool `json:"isAuthenticated,omitempty"` + + BotIds *[]string `json:"botIds,omitempty"` + + BotVersions *[]string `json:"botVersions,omitempty"` + + BotMessageTypes *[]string `json:"botMessageTypes,omitempty"` + + BotProviderList *[]string `json:"botProviderList,omitempty"` + + BotProductList *[]string `json:"botProductList,omitempty"` + + BotRecognitionFailureReasonList *[]string `json:"botRecognitionFailureReasonList,omitempty"` + + BotIntentList *[]string `json:"botIntentList,omitempty"` + + BotFinalIntentList *[]string `json:"botFinalIntentList,omitempty"` + + BotSlotList *[]string `json:"botSlotList,omitempty"` + + BotResultList *[]string `json:"botResultList,omitempty"` + + BlockedReasons *[]string `json:"blockedReasons,omitempty"` + + IsRecorded *bool `json:"isRecorded,omitempty"` + + HasEvaluation *bool `json:"hasEvaluation,omitempty"` + + HasScoredEvaluation *bool `json:"hasScoredEvaluation,omitempty"` + *Alias + }{ + MediaTypes: u.MediaTypes, + + QueueIds: u.QueueIds, + + SkillIds: u.SkillIds, + + SkillGroups: u.SkillGroups, + + LanguageIds: u.LanguageIds, + + LanguageGroups: u.LanguageGroups, + + Directions: u.Directions, + + OriginatingDirections: u.OriginatingDirections, + + WrapUpCodes: u.WrapUpCodes, + + DnisList: u.DnisList, + + SessionDnisList: u.SessionDnisList, + + FilterQueuesByUserIds: u.FilterQueuesByUserIds, + + FilterUsersByQueueIds: u.FilterUsersByQueueIds, + + UserIds: u.UserIds, + + AddressTos: u.AddressTos, + + AddressFroms: u.AddressFroms, + + OutboundCampaignIds: u.OutboundCampaignIds, + + OutboundContactListIds: u.OutboundContactListIds, + + ContactIds: u.ContactIds, + + ExternalContactIds: u.ExternalContactIds, + + ExternalOrgIds: u.ExternalOrgIds, + + AniList: u.AniList, + + DurationsMilliseconds: u.DurationsMilliseconds, + + AcdDurationsMilliseconds: u.AcdDurationsMilliseconds, + + TalkDurationsMilliseconds: u.TalkDurationsMilliseconds, + + AcwDurationsMilliseconds: u.AcwDurationsMilliseconds, + + HandleDurationsMilliseconds: u.HandleDurationsMilliseconds, + + HoldDurationsMilliseconds: u.HoldDurationsMilliseconds, + + AbandonDurationsMilliseconds: u.AbandonDurationsMilliseconds, + + EvaluationScore: u.EvaluationScore, + + EvaluationCriticalScore: u.EvaluationCriticalScore, + + EvaluationFormIds: u.EvaluationFormIds, + + EvaluatedAgentIds: u.EvaluatedAgentIds, + + EvaluatorIds: u.EvaluatorIds, + + Transferred: u.Transferred, + + Abandoned: u.Abandoned, + + Answered: u.Answered, + + MessageTypes: u.MessageTypes, + + DivisionIds: u.DivisionIds, + + SurveyFormIds: u.SurveyFormIds, + + SurveyTotalScore: u.SurveyTotalScore, + + SurveyNpsScore: u.SurveyNpsScore, + + Mos: u.Mos, + + SurveyQuestionGroupScore: u.SurveyQuestionGroupScore, + + SurveyPromoterScore: u.SurveyPromoterScore, + + SurveyFormContextIds: u.SurveyFormContextIds, + + ConversationIds: u.ConversationIds, + + SipCallIds: u.SipCallIds, + + IsEnded: u.IsEnded, + + IsSurveyed: u.IsSurveyed, + + SurveyScores: u.SurveyScores, + + PromoterScores: u.PromoterScores, + + IsCampaign: u.IsCampaign, + + SurveyStatuses: u.SurveyStatuses, + + ConversationProperties: u.ConversationProperties, + + IsBlindTransferred: u.IsBlindTransferred, + + IsConsulted: u.IsConsulted, + + IsConsultTransferred: u.IsConsultTransferred, + + RemoteParticipants: u.RemoteParticipants, + + FlowIds: u.FlowIds, + + FlowOutcomeIds: u.FlowOutcomeIds, + + FlowOutcomeValues: u.FlowOutcomeValues, + + FlowDestinationTypes: u.FlowDestinationTypes, + + FlowDisconnectReasons: u.FlowDisconnectReasons, + + FlowTypes: u.FlowTypes, + + FlowEntryTypes: u.FlowEntryTypes, + + FlowEntryReasons: u.FlowEntryReasons, + + FlowVersions: u.FlowVersions, + + GroupIds: u.GroupIds, + + HasJourneyCustomerId: u.HasJourneyCustomerId, + + HasJourneyActionMapId: u.HasJourneyActionMapId, + + HasJourneyVisitId: u.HasJourneyVisitId, + + HasMedia: u.HasMedia, + + RoleIds: u.RoleIds, + + ReportsTos: u.ReportsTos, + + LocationIds: u.LocationIds, + + FlowOutTypes: u.FlowOutTypes, + + ProviderList: u.ProviderList, + + CallbackNumberList: u.CallbackNumberList, + + CallbackInterval: u.CallbackInterval, + + UsedRoutingTypes: u.UsedRoutingTypes, + + RequestedRoutingTypes: u.RequestedRoutingTypes, + + HasAgentAssistId: u.HasAgentAssistId, + + Transcripts: u.Transcripts, + + TranscriptLanguages: u.TranscriptLanguages, + + ParticipantPurposes: u.ParticipantPurposes, + + ShowFirstQueue: u.ShowFirstQueue, + + TeamIds: u.TeamIds, + + FilterUsersByTeamIds: u.FilterUsersByTeamIds, + + JourneyActionMapIds: u.JourneyActionMapIds, + + JourneyOutcomeIds: u.JourneyOutcomeIds, + + JourneySegmentIds: u.JourneySegmentIds, + + JourneyActionMapTypes: u.JourneyActionMapTypes, + + DevelopmentRoleList: u.DevelopmentRoleList, + + DevelopmentTypeList: u.DevelopmentTypeList, + + DevelopmentStatusList: u.DevelopmentStatusList, + + DevelopmentModuleIds: u.DevelopmentModuleIds, + + DevelopmentActivityOverdue: u.DevelopmentActivityOverdue, + + CustomerSentimentScore: u.CustomerSentimentScore, + + CustomerSentimentTrend: u.CustomerSentimentTrend, + + FlowTransferTargets: u.FlowTransferTargets, + + DevelopmentName: u.DevelopmentName, + + TopicIds: u.TopicIds, + + ExternalTags: u.ExternalTags, + + IsNotResponding: u.IsNotResponding, + + IsAuthenticated: u.IsAuthenticated, + + BotIds: u.BotIds, + + BotVersions: u.BotVersions, + + BotMessageTypes: u.BotMessageTypes, + + BotProviderList: u.BotProviderList, + + BotProductList: u.BotProductList, + + BotRecognitionFailureReasonList: u.BotRecognitionFailureReasonList, + + BotIntentList: u.BotIntentList, + + BotFinalIntentList: u.BotFinalIntentList, + + BotSlotList: u.BotSlotList, + + BotResultList: u.BotResultList, + + BlockedReasons: u.BlockedReasons, + + IsRecorded: u.IsRecorded, + + HasEvaluation: u.HasEvaluation, + + HasScoredEvaluation: u.HasScoredEvaluation, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Viewfilter) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/visibilitycondition.go b/platformclientv2/visibilitycondition.go index 0d71801f3..348c90370 100644 --- a/platformclientv2/visibilitycondition.go +++ b/platformclientv2/visibilitycondition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Visibilitycondition struct { } +func (u *Visibilitycondition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Visibilitycondition + + + + return json.Marshal(&struct { + CombiningOperation *string `json:"combiningOperation,omitempty"` + + Predicates *[]interface{} `json:"predicates,omitempty"` + *Alias + }{ + CombiningOperation: u.CombiningOperation, + + Predicates: u.Predicates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Visibilitycondition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/vmpairinginfo.go b/platformclientv2/vmpairinginfo.go index 2edc8d6be..ea96bc3aa 100644 --- a/platformclientv2/vmpairinginfo.go +++ b/platformclientv2/vmpairinginfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Vmpairinginfo struct { } +func (u *Vmpairinginfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Vmpairinginfo + + + + return json.Marshal(&struct { + MetaData *Metadata `json:"meta-data,omitempty"` + + EdgeId *string `json:"edge-id,omitempty"` + + AuthToken *string `json:"auth-token,omitempty"` + + OrgId *string `json:"org-id,omitempty"` + *Alias + }{ + MetaData: u.MetaData, + + EdgeId: u.EdgeId, + + AuthToken: u.AuthToken, + + OrgId: u.OrgId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Vmpairinginfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemail.go b/platformclientv2/voicemail.go index 94208e82d..a99abdec8 100644 --- a/platformclientv2/voicemail.go +++ b/platformclientv2/voicemail.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Voicemail struct { } +func (u *Voicemail) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemail + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + UploadStatus *string `json:"uploadStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + UploadStatus: u.UploadStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemail) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailcopyrecord.go b/platformclientv2/voicemailcopyrecord.go index 30c192303..90e33b2b6 100644 --- a/platformclientv2/voicemailcopyrecord.go +++ b/platformclientv2/voicemailcopyrecord.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Voicemailcopyrecord struct { } +func (u *Voicemailcopyrecord) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailcopyrecord + + + Date := new(string) + if u.Date != nil { + + *Date = timeutil.Strftime(u.Date, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Date = nil + } + + + return json.Marshal(&struct { + User *User `json:"user,omitempty"` + + Group *Group `json:"group,omitempty"` + + Date *string `json:"date,omitempty"` + *Alias + }{ + User: u.User, + + Group: u.Group, + + Date: Date, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailcopyrecord) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailgrouppolicy.go b/platformclientv2/voicemailgrouppolicy.go index 1dcd9128a..d080f760c 100644 --- a/platformclientv2/voicemailgrouppolicy.go +++ b/platformclientv2/voicemailgrouppolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Voicemailgrouppolicy struct { } +func (u *Voicemailgrouppolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailgrouppolicy + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Group *Group `json:"group,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + SendEmailNotifications *bool `json:"sendEmailNotifications,omitempty"` + + DisableEmailPii *bool `json:"disableEmailPii,omitempty"` + + RotateCallsSecs *int `json:"rotateCallsSecs,omitempty"` + + StopRingingAfterRotations *int `json:"stopRingingAfterRotations,omitempty"` + + OverflowGroupId *string `json:"overflowGroupId,omitempty"` + + GroupAlertType *string `json:"groupAlertType,omitempty"` + *Alias + }{ + Name: u.Name, + + Group: u.Group, + + Enabled: u.Enabled, + + SendEmailNotifications: u.SendEmailNotifications, + + DisableEmailPii: u.DisableEmailPii, + + RotateCallsSecs: u.RotateCallsSecs, + + StopRingingAfterRotations: u.StopRingingAfterRotations, + + OverflowGroupId: u.OverflowGroupId, + + GroupAlertType: u.GroupAlertType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailgrouppolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailmailboxinfo.go b/platformclientv2/voicemailmailboxinfo.go index ceb8b16a6..4f01f601a 100644 --- a/platformclientv2/voicemailmailboxinfo.go +++ b/platformclientv2/voicemailmailboxinfo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,58 @@ type Voicemailmailboxinfo struct { } +func (u *Voicemailmailboxinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailmailboxinfo + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + UsageSizeBytes *int `json:"usageSizeBytes,omitempty"` + + TotalCount *int `json:"totalCount,omitempty"` + + UnreadCount *int `json:"unreadCount,omitempty"` + + DeletedCount *int `json:"deletedCount,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + UsageSizeBytes: u.UsageSizeBytes, + + TotalCount: u.TotalCount, + + UnreadCount: u.UnreadCount, + + DeletedCount: u.DeletedCount, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailmailboxinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailmediainfo.go b/platformclientv2/voicemailmediainfo.go index 07efa1716..6da5757ad 100644 --- a/platformclientv2/voicemailmediainfo.go +++ b/platformclientv2/voicemailmediainfo.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Voicemailmediainfo struct { } +func (u *Voicemailmediainfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailmediainfo + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MediaFileUri *string `json:"mediaFileUri,omitempty"` + + MediaImageUri *string `json:"mediaImageUri,omitempty"` + + WaveformData *[]float32 `json:"waveformData,omitempty"` + *Alias + }{ + Id: u.Id, + + MediaFileUri: u.MediaFileUri, + + MediaImageUri: u.MediaImageUri, + + WaveformData: u.WaveformData, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailmediainfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailmessage.go b/platformclientv2/voicemailmessage.go index b9718af19..95e9d3773 100644 --- a/platformclientv2/voicemailmessage.go +++ b/platformclientv2/voicemailmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -89,6 +90,122 @@ type Voicemailmessage struct { } +func (u *Voicemailmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailmessage + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + DeletedDate := new(string) + if u.DeletedDate != nil { + + *DeletedDate = timeutil.Strftime(u.DeletedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DeletedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Conversation *Conversation `json:"conversation,omitempty"` + + Read *bool `json:"read,omitempty"` + + AudioRecordingDurationSeconds *int `json:"audioRecordingDurationSeconds,omitempty"` + + AudioRecordingSizeBytes *int `json:"audioRecordingSizeBytes,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + DeletedDate *string `json:"deletedDate,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + CallerName *string `json:"callerName,omitempty"` + + CallerUser *User `json:"callerUser,omitempty"` + + Deleted *bool `json:"deleted,omitempty"` + + Note *string `json:"note,omitempty"` + + User *User `json:"user,omitempty"` + + Group *Group `json:"group,omitempty"` + + Queue *Queue `json:"queue,omitempty"` + + CopiedFrom *Voicemailcopyrecord `json:"copiedFrom,omitempty"` + + CopiedTo *[]Voicemailcopyrecord `json:"copiedTo,omitempty"` + + DeleteRetentionPolicy *Voicemailretentionpolicy `json:"deleteRetentionPolicy,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Conversation: u.Conversation, + + Read: u.Read, + + AudioRecordingDurationSeconds: u.AudioRecordingDurationSeconds, + + AudioRecordingSizeBytes: u.AudioRecordingSizeBytes, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + + DeletedDate: DeletedDate, + + CallerAddress: u.CallerAddress, + + CallerName: u.CallerName, + + CallerUser: u.CallerUser, + + Deleted: u.Deleted, + + Note: u.Note, + + User: u.User, + + Group: u.Group, + + Queue: u.Queue, + + CopiedFrom: u.CopiedFrom, + + CopiedTo: u.CopiedTo, + + DeleteRetentionPolicy: u.DeleteRetentionPolicy, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailmessageentitylisting.go b/platformclientv2/voicemailmessageentitylisting.go index 403aaf90a..dc961c655 100644 --- a/platformclientv2/voicemailmessageentitylisting.go +++ b/platformclientv2/voicemailmessageentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Voicemailmessageentitylisting struct { } +func (u *Voicemailmessageentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailmessageentitylisting + + + + return json.Marshal(&struct { + Entities *[]Voicemailmessage `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailmessageentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailmessagestopicowner.go b/platformclientv2/voicemailmessagestopicowner.go index 19760772d..74b19acfd 100644 --- a/platformclientv2/voicemailmessagestopicowner.go +++ b/platformclientv2/voicemailmessagestopicowner.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Voicemailmessagestopicowner struct { } +func (u *Voicemailmessagestopicowner) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailmessagestopicowner + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailmessagestopicowner) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailmessagestopicvoicemailcopyrecord.go b/platformclientv2/voicemailmessagestopicvoicemailcopyrecord.go index b990e97e6..881fa2c29 100644 --- a/platformclientv2/voicemailmessagestopicvoicemailcopyrecord.go +++ b/platformclientv2/voicemailmessagestopicvoicemailcopyrecord.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Voicemailmessagestopicvoicemailcopyrecord struct { } +func (u *Voicemailmessagestopicvoicemailcopyrecord) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailmessagestopicvoicemailcopyrecord + + + + return json.Marshal(&struct { + User *Voicemailmessagestopicowner `json:"user,omitempty"` + + Group *Voicemailmessagestopicowner `json:"group,omitempty"` + *Alias + }{ + User: u.User, + + Group: u.Group, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailmessagestopicvoicemailcopyrecord) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailmessagestopicvoicemailmessage.go b/platformclientv2/voicemailmessagestopicvoicemailmessage.go index bafc1036c..ca25a6356 100644 --- a/platformclientv2/voicemailmessagestopicvoicemailmessage.go +++ b/platformclientv2/voicemailmessagestopicvoicemailmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -65,6 +66,90 @@ type Voicemailmessagestopicvoicemailmessage struct { } +func (u *Voicemailmessagestopicvoicemailmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailmessagestopicvoicemailmessage + + + CreatedDate := new(string) + if u.CreatedDate != nil { + + *CreatedDate = timeutil.Strftime(u.CreatedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + CreatedDate = nil + } + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Read *bool `json:"read,omitempty"` + + AudioRecordingDurationSeconds *int `json:"audioRecordingDurationSeconds,omitempty"` + + AudioRecordingSizeBytes *int `json:"audioRecordingSizeBytes,omitempty"` + + CreatedDate *string `json:"createdDate,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + CallerAddress *string `json:"callerAddress,omitempty"` + + CallerName *string `json:"callerName,omitempty"` + + Action *string `json:"action,omitempty"` + + Note *string `json:"note,omitempty"` + + Deleted *bool `json:"deleted,omitempty"` + + ModifiedByUserId *string `json:"modifiedByUserId,omitempty"` + + CopiedTo *[]Voicemailmessagestopicvoicemailcopyrecord `json:"copiedTo,omitempty"` + + CopiedFrom *Voicemailmessagestopicvoicemailcopyrecord `json:"copiedFrom,omitempty"` + *Alias + }{ + Id: u.Id, + + Read: u.Read, + + AudioRecordingDurationSeconds: u.AudioRecordingDurationSeconds, + + AudioRecordingSizeBytes: u.AudioRecordingSizeBytes, + + CreatedDate: CreatedDate, + + ModifiedDate: ModifiedDate, + + CallerAddress: u.CallerAddress, + + CallerName: u.CallerName, + + Action: u.Action, + + Note: u.Note, + + Deleted: u.Deleted, + + ModifiedByUserId: u.ModifiedByUserId, + + CopiedTo: u.CopiedTo, + + CopiedFrom: u.CopiedFrom, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailmessagestopicvoicemailmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailorganizationpolicy.go b/platformclientv2/voicemailorganizationpolicy.go index 211e6c06f..75a20e8c2 100644 --- a/platformclientv2/voicemailorganizationpolicy.go +++ b/platformclientv2/voicemailorganizationpolicy.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Voicemailorganizationpolicy struct { } +func (u *Voicemailorganizationpolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailorganizationpolicy + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + AlertTimeoutSeconds *int `json:"alertTimeoutSeconds,omitempty"` + + PinConfiguration *Pinconfiguration `json:"pinConfiguration,omitempty"` + + VoicemailExtension *string `json:"voicemailExtension,omitempty"` + + PinRequired *bool `json:"pinRequired,omitempty"` + + SendEmailNotifications *bool `json:"sendEmailNotifications,omitempty"` + + DisableEmailPii *bool `json:"disableEmailPii,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + AlertTimeoutSeconds: u.AlertTimeoutSeconds, + + PinConfiguration: u.PinConfiguration, + + VoicemailExtension: u.VoicemailExtension, + + PinRequired: u.PinRequired, + + SendEmailNotifications: u.SendEmailNotifications, + + DisableEmailPii: u.DisableEmailPii, + + ModifiedDate: ModifiedDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailorganizationpolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailretentionpolicy.go b/platformclientv2/voicemailretentionpolicy.go index 3105f5783..cb0d10987 100644 --- a/platformclientv2/voicemailretentionpolicy.go +++ b/platformclientv2/voicemailretentionpolicy.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Voicemailretentionpolicy struct { } +func (u *Voicemailretentionpolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailretentionpolicy + + + + return json.Marshal(&struct { + VoicemailRetentionPolicyType *string `json:"voicemailRetentionPolicyType,omitempty"` + + NumberOfDays *int `json:"numberOfDays,omitempty"` + *Alias + }{ + VoicemailRetentionPolicyType: u.VoicemailRetentionPolicyType, + + NumberOfDays: u.NumberOfDays, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailretentionpolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailsearchcriteria.go b/platformclientv2/voicemailsearchcriteria.go index f3cb92a47..23195236c 100644 --- a/platformclientv2/voicemailsearchcriteria.go +++ b/platformclientv2/voicemailsearchcriteria.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Voicemailsearchcriteria struct { } +func (u *Voicemailsearchcriteria) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailsearchcriteria + + + + return json.Marshal(&struct { + EndValue *string `json:"endValue,omitempty"` + + Values *[]string `json:"values,omitempty"` + + StartValue *string `json:"startValue,omitempty"` + + Fields *[]string `json:"fields,omitempty"` + + Value *string `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + Group *[]Voicemailsearchcriteria `json:"group,omitempty"` + + DateFormat *string `json:"dateFormat,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + EndValue: u.EndValue, + + Values: u.Values, + + StartValue: u.StartValue, + + Fields: u.Fields, + + Value: u.Value, + + Operator: u.Operator, + + Group: u.Group, + + DateFormat: u.DateFormat, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailsearchcriteria) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailsearchrequest.go b/platformclientv2/voicemailsearchrequest.go index 69b218617..b41e325bf 100644 --- a/platformclientv2/voicemailsearchrequest.go +++ b/platformclientv2/voicemailsearchrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Voicemailsearchrequest struct { } +func (u *Voicemailsearchrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailsearchrequest + + + + return json.Marshal(&struct { + SortOrder *string `json:"sortOrder,omitempty"` + + SortBy *string `json:"sortBy,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Sort *[]Searchsort `json:"sort,omitempty"` + + Expand *[]string `json:"expand,omitempty"` + + Query *[]Voicemailsearchcriteria `json:"query,omitempty"` + *Alias + }{ + SortOrder: u.SortOrder, + + SortBy: u.SortBy, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Sort: u.Sort, + + Expand: u.Expand, + + Query: u.Query, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailsearchrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailssearchresponse.go b/platformclientv2/voicemailssearchresponse.go index 7fbbea07e..51dd33838 100644 --- a/platformclientv2/voicemailssearchresponse.go +++ b/platformclientv2/voicemailssearchresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Voicemailssearchresponse struct { } +func (u *Voicemailssearchresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailssearchresponse + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + CurrentPage *string `json:"currentPage,omitempty"` + + NextPage *string `json:"nextPage,omitempty"` + + Types *[]string `json:"types,omitempty"` + + Results *[]Voicemailmessage `json:"results,omitempty"` + *Alias + }{ + Total: u.Total, + + PageCount: u.PageCount, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + PreviousPage: u.PreviousPage, + + CurrentPage: u.CurrentPage, + + NextPage: u.NextPage, + + Types: u.Types, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailssearchresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/voicemailuserpolicy.go b/platformclientv2/voicemailuserpolicy.go index aad106448..a0b253071 100644 --- a/platformclientv2/voicemailuserpolicy.go +++ b/platformclientv2/voicemailuserpolicy.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,46 @@ type Voicemailuserpolicy struct { } +func (u *Voicemailuserpolicy) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Voicemailuserpolicy + + + ModifiedDate := new(string) + if u.ModifiedDate != nil { + + *ModifiedDate = timeutil.Strftime(u.ModifiedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ModifiedDate = nil + } + + + return json.Marshal(&struct { + Enabled *bool `json:"enabled,omitempty"` + + AlertTimeoutSeconds *int `json:"alertTimeoutSeconds,omitempty"` + + Pin *string `json:"pin,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + SendEmailNotifications *bool `json:"sendEmailNotifications,omitempty"` + *Alias + }{ + Enabled: u.Enabled, + + AlertTimeoutSeconds: u.AlertTimeoutSeconds, + + Pin: u.Pin, + + ModifiedDate: ModifiedDate, + + SendEmailNotifications: u.SendEmailNotifications, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Voicemailuserpolicy) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/void.go b/platformclientv2/void.go index 5aec7ea13..556082dce 100644 --- a/platformclientv2/void.go +++ b/platformclientv2/void.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Void type Void struct { } +func (u *Void) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Void + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Void) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatconfig.go b/platformclientv2/webchatconfig.go index 58ef5c120..9ef3f3d5a 100644 --- a/platformclientv2/webchatconfig.go +++ b/platformclientv2/webchatconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Webchatconfig struct { } +func (u *Webchatconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatconfig + + + + return json.Marshal(&struct { + WebChatSkin *string `json:"webChatSkin,omitempty"` + *Alias + }{ + WebChatSkin: u.WebChatSkin, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatconversation.go b/platformclientv2/webchatconversation.go index cdc036977..5f276fedd 100644 --- a/platformclientv2/webchatconversation.go +++ b/platformclientv2/webchatconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Webchatconversation struct { } +func (u *Webchatconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Member *Webchatmemberinfo `json:"member,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Member: u.Member, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatdeployment.go b/platformclientv2/webchatdeployment.go index 62044210c..aa3b557e1 100644 --- a/platformclientv2/webchatdeployment.go +++ b/platformclientv2/webchatdeployment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Webchatdeployment struct { } +func (u *Webchatdeployment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatdeployment + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + AuthenticationRequired *bool `json:"authenticationRequired,omitempty"` + + AuthenticationUrl *string `json:"authenticationUrl,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + WebChatConfig *Webchatconfig `json:"webChatConfig,omitempty"` + + AllowedDomains *[]string `json:"allowedDomains,omitempty"` + + Flow *Domainentityref `json:"flow,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + AuthenticationRequired: u.AuthenticationRequired, + + AuthenticationUrl: u.AuthenticationUrl, + + Disabled: u.Disabled, + + WebChatConfig: u.WebChatConfig, + + AllowedDomains: u.AllowedDomains, + + Flow: u.Flow, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatdeployment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatdeploymententitylisting.go b/platformclientv2/webchatdeploymententitylisting.go index ed5f56f7a..c74d92da8 100644 --- a/platformclientv2/webchatdeploymententitylisting.go +++ b/platformclientv2/webchatdeploymententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Webchatdeploymententitylisting struct { } +func (u *Webchatdeploymententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatdeploymententitylisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Webchatdeployment `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatdeploymententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatguestmediarequest.go b/platformclientv2/webchatguestmediarequest.go index 62b13d829..d84bc398e 100644 --- a/platformclientv2/webchatguestmediarequest.go +++ b/platformclientv2/webchatguestmediarequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Webchatguestmediarequest struct { } +func (u *Webchatguestmediarequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatguestmediarequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Types *[]string `json:"types,omitempty"` + + State *string `json:"state,omitempty"` + + CommunicationId *string `json:"communicationId,omitempty"` + + SecurityKey *string `json:"securityKey,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Types: u.Types, + + State: u.State, + + CommunicationId: u.CommunicationId, + + SecurityKey: u.SecurityKey, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatguestmediarequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatguestmediarequestentitylist.go b/platformclientv2/webchatguestmediarequestentitylist.go index 6ee5a37ce..ab402f821 100644 --- a/platformclientv2/webchatguestmediarequestentitylist.go +++ b/platformclientv2/webchatguestmediarequestentitylist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Webchatguestmediarequestentitylist struct { } +func (u *Webchatguestmediarequestentitylist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatguestmediarequestentitylist + + + + return json.Marshal(&struct { + Entities *[]Webchatguestmediarequest `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatguestmediarequestentitylist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatmemberinfo.go b/platformclientv2/webchatmemberinfo.go index fc1cf46c3..005707ef2 100644 --- a/platformclientv2/webchatmemberinfo.go +++ b/platformclientv2/webchatmemberinfo.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Webchatmemberinfo struct { } +func (u *Webchatmemberinfo) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatmemberinfo + + + JoinDate := new(string) + if u.JoinDate != nil { + + *JoinDate = timeutil.Strftime(u.JoinDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + JoinDate = nil + } + + LeaveDate := new(string) + if u.LeaveDate != nil { + + *LeaveDate = timeutil.Strftime(u.LeaveDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + LeaveDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Email *string `json:"email,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + AvatarImageUrl *string `json:"avatarImageUrl,omitempty"` + + Role *string `json:"role,omitempty"` + + JoinDate *string `json:"joinDate,omitempty"` + + LeaveDate *string `json:"leaveDate,omitempty"` + + AuthenticatedGuest *bool `json:"authenticatedGuest,omitempty"` + + CustomFields *map[string]string `json:"customFields,omitempty"` + + State *string `json:"state,omitempty"` + *Alias + }{ + Id: u.Id, + + DisplayName: u.DisplayName, + + FirstName: u.FirstName, + + LastName: u.LastName, + + Email: u.Email, + + PhoneNumber: u.PhoneNumber, + + AvatarImageUrl: u.AvatarImageUrl, + + Role: u.Role, + + JoinDate: JoinDate, + + LeaveDate: LeaveDate, + + AuthenticatedGuest: u.AuthenticatedGuest, + + CustomFields: u.CustomFields, + + State: u.State, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatmemberinfo) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatmemberinfoentitylist.go b/platformclientv2/webchatmemberinfoentitylist.go index 377bbd067..b2faa4d58 100644 --- a/platformclientv2/webchatmemberinfoentitylist.go +++ b/platformclientv2/webchatmemberinfoentitylist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Webchatmemberinfoentitylist struct { } +func (u *Webchatmemberinfoentitylist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatmemberinfoentitylist + + + + return json.Marshal(&struct { + Entities *[]Webchatmemberinfo `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatmemberinfoentitylist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatmessage.go b/platformclientv2/webchatmessage.go index 8bc049451..44340b88d 100644 --- a/platformclientv2/webchatmessage.go +++ b/platformclientv2/webchatmessage.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,58 @@ type Webchatmessage struct { } +func (u *Webchatmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatmessage + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Conversation *Webchatconversation `json:"conversation,omitempty"` + + Sender *Webchatmemberinfo `json:"sender,omitempty"` + + Body *string `json:"body,omitempty"` + + BodyType *string `json:"bodyType,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Conversation: u.Conversation, + + Sender: u.Sender, + + Body: u.Body, + + BodyType: u.BodyType, + + Timestamp: Timestamp, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatmessageentitylist.go b/platformclientv2/webchatmessageentitylist.go index 98d3b0c09..69268211c 100644 --- a/platformclientv2/webchatmessageentitylist.go +++ b/platformclientv2/webchatmessageentitylist.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Webchatmessageentitylist struct { } +func (u *Webchatmessageentitylist) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatmessageentitylist + + + + return json.Marshal(&struct { + PageSize *int `json:"pageSize,omitempty"` + + Entities *[]Webchatmessage `json:"entities,omitempty"` + + PreviousPage *string `json:"previousPage,omitempty"` + + Next *string `json:"next,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + PageSize: u.PageSize, + + Entities: u.Entities, + + PreviousPage: u.PreviousPage, + + Next: u.Next, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatmessageentitylist) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatroutingtarget.go b/platformclientv2/webchatroutingtarget.go index d6101174b..d948e6237 100644 --- a/platformclientv2/webchatroutingtarget.go +++ b/platformclientv2/webchatroutingtarget.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Webchatroutingtarget struct { } +func (u *Webchatroutingtarget) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatroutingtarget + + + + return json.Marshal(&struct { + TargetType *string `json:"targetType,omitempty"` + + TargetAddress *string `json:"targetAddress,omitempty"` + + Skills *[]string `json:"skills,omitempty"` + + Language *string `json:"language,omitempty"` + + Priority *int `json:"priority,omitempty"` + *Alias + }{ + TargetType: u.TargetType, + + TargetAddress: u.TargetAddress, + + Skills: u.Skills, + + Language: u.Language, + + Priority: u.Priority, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatroutingtarget) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchatsettings.go b/platformclientv2/webchatsettings.go index cb53fd436..363b85a82 100644 --- a/platformclientv2/webchatsettings.go +++ b/platformclientv2/webchatsettings.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Webchatsettings struct { } +func (u *Webchatsettings) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchatsettings + + + + return json.Marshal(&struct { + RequireDeployment *bool `json:"requireDeployment,omitempty"` + *Alias + }{ + RequireDeployment: u.RequireDeployment, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchatsettings) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webchattyping.go b/platformclientv2/webchattyping.go index 445733302..f2869009b 100644 --- a/platformclientv2/webchattyping.go +++ b/platformclientv2/webchattyping.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,42 @@ type Webchattyping struct { } +func (u *Webchattyping) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webchattyping + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Conversation *Webchatconversation `json:"conversation,omitempty"` + + Sender *Webchatmemberinfo `json:"sender,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + *Alias + }{ + Id: u.Id, + + Conversation: u.Conversation, + + Sender: u.Sender, + + Timestamp: Timestamp, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webchattyping) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeployment.go b/platformclientv2/webdeployment.go index 739c4e568..034b3a57d 100644 --- a/platformclientv2/webdeployment.go +++ b/platformclientv2/webdeployment.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,86 @@ type Webdeployment struct { } +func (u *Webdeployment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeployment + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + Configuration *Webdeploymentconfigurationversionentityref `json:"configuration,omitempty"` + + AllowAllDomains *bool `json:"allowAllDomains,omitempty"` + + AllowedDomains *[]string `json:"allowedDomains,omitempty"` + + Snippet *string `json:"snippet,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + LastModifiedUser *Addressableentityref `json:"lastModifiedUser,omitempty"` + + Flow *Domainentityref `json:"flow,omitempty"` + + Status *string `json:"status,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + Configuration: u.Configuration, + + AllowAllDomains: u.AllowAllDomains, + + AllowedDomains: u.AllowedDomains, + + Snippet: u.Snippet, + + DateCreated: DateCreated, + + DateModified: DateModified, + + LastModifiedUser: u.LastModifiedUser, + + Flow: u.Flow, + + Status: u.Status, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeployment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeploymentconfigurationversion.go b/platformclientv2/webdeploymentconfigurationversion.go index 752abdef9..bba8deaa2 100644 --- a/platformclientv2/webdeploymentconfigurationversion.go +++ b/platformclientv2/webdeploymentconfigurationversion.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -77,6 +78,110 @@ type Webdeploymentconfigurationversion struct { } +func (u *Webdeploymentconfigurationversion) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeploymentconfigurationversion + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DatePublished := new(string) + if u.DatePublished != nil { + + *DatePublished = timeutil.Strftime(u.DatePublished, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DatePublished = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Version *string `json:"version,omitempty"` + + Description *string `json:"description,omitempty"` + + Languages *[]string `json:"languages,omitempty"` + + DefaultLanguage *string `json:"defaultLanguage,omitempty"` + + Messenger *Messengersettings `json:"messenger,omitempty"` + + JourneyEvents *Journeyeventssettings `json:"journeyEvents,omitempty"` + + AuthenticationSettings *Authenticationsettings `json:"authenticationSettings,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + DatePublished *string `json:"datePublished,omitempty"` + + LastModifiedUser *Addressableentityref `json:"lastModifiedUser,omitempty"` + + CreatedUser *Addressableentityref `json:"createdUser,omitempty"` + + PublishedUser *Addressableentityref `json:"publishedUser,omitempty"` + + Status *string `json:"status,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Version: u.Version, + + Description: u.Description, + + Languages: u.Languages, + + DefaultLanguage: u.DefaultLanguage, + + Messenger: u.Messenger, + + JourneyEvents: u.JourneyEvents, + + AuthenticationSettings: u.AuthenticationSettings, + + DateCreated: DateCreated, + + DateModified: DateModified, + + DatePublished: DatePublished, + + LastModifiedUser: u.LastModifiedUser, + + CreatedUser: u.CreatedUser, + + PublishedUser: u.PublishedUser, + + Status: u.Status, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeploymentconfigurationversion) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeploymentconfigurationversionentitylisting.go b/platformclientv2/webdeploymentconfigurationversionentitylisting.go index 499cc2ac7..8bbef6b40 100644 --- a/platformclientv2/webdeploymentconfigurationversionentitylisting.go +++ b/platformclientv2/webdeploymentconfigurationversionentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Webdeploymentconfigurationversionentitylisting struct { } +func (u *Webdeploymentconfigurationversionentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeploymentconfigurationversionentitylisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Webdeploymentconfigurationversion `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeploymentconfigurationversionentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeploymentconfigurationversionentityref.go b/platformclientv2/webdeploymentconfigurationversionentityref.go index de781314e..5749396ff 100644 --- a/platformclientv2/webdeploymentconfigurationversionentityref.go +++ b/platformclientv2/webdeploymentconfigurationversionentityref.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Webdeploymentconfigurationversionentityref struct { } +func (u *Webdeploymentconfigurationversionentityref) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeploymentconfigurationversionentityref + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + Version *string `json:"version,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeploymentconfigurationversionentityref) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeploymententitylisting.go b/platformclientv2/webdeploymententitylisting.go index 49ed3cca4..6f414c182 100644 --- a/platformclientv2/webdeploymententitylisting.go +++ b/platformclientv2/webdeploymententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Webdeploymententitylisting struct { } +func (u *Webdeploymententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeploymententitylisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Webdeployment `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeploymententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeploymentsconfigtopicwebmessagingconfigchangeeventbody.go b/platformclientv2/webdeploymentsconfigtopicwebmessagingconfigchangeeventbody.go index 58d74abb6..303a61729 100644 --- a/platformclientv2/webdeploymentsconfigtopicwebmessagingconfigchangeeventbody.go +++ b/platformclientv2/webdeploymentsconfigtopicwebmessagingconfigchangeeventbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Webdeploymentsconfigtopicwebmessagingconfigchangeeventbody struct { } +func (u *Webdeploymentsconfigtopicwebmessagingconfigchangeeventbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeploymentsconfigtopicwebmessagingconfigchangeeventbody + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *string `json:"version,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeploymentsconfigtopicwebmessagingconfigchangeeventbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody.go b/platformclientv2/webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody.go index cc58cf888..863d0dc44 100644 --- a/platformclientv2/webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody.go +++ b/platformclientv2/webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody struct { } +func (u *Webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Version *string `json:"version,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + Id: u.Id, + + Version: u.Version, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody.go b/platformclientv2/webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody.go index 9ae4fc7b2..a7935a389 100644 --- a/platformclientv2/webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody.go +++ b/platformclientv2/webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody struct { } +func (u *Webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Configuration *Webdeploymentsdeploymenttopicwebmessagingconfigchangeeventbody `json:"configuration,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + Id: u.Id, + + Configuration: u.Configuration, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webdeploymentsdeploymenttopicwebmessagingdeploymentchangeeventbody) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/webmessagingofferfields.go b/platformclientv2/webmessagingofferfields.go index 98a14aed6..d13ee9418 100644 --- a/platformclientv2/webmessagingofferfields.go +++ b/platformclientv2/webmessagingofferfields.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Webmessagingofferfields struct { } +func (u *Webmessagingofferfields) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Webmessagingofferfields + + + + return json.Marshal(&struct { + OfferText *string `json:"offerText,omitempty"` + *Alias + }{ + OfferText: u.OfferText, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Webmessagingofferfields) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekschedule.go b/platformclientv2/weekschedule.go index 809e61757..e8ac31532 100644 --- a/platformclientv2/weekschedule.go +++ b/platformclientv2/weekschedule.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Weekschedule struct { } +func (u *Weekschedule) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekschedule + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + GenerationResults *Weekschedulegenerationresult `json:"generationResults,omitempty"` + + ShortTermForecast *Shorttermforecastreference `json:"shortTermForecast,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + UserSchedules *map[string]Userschedule `json:"userSchedules,omitempty"` + + HeadcountForecast *Headcountforecast `json:"headcountForecast,omitempty"` + + AgentSchedulesVersion *int `json:"agentSchedulesVersion,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + + WeekDate: u.WeekDate, + + Description: u.Description, + + Published: u.Published, + + GenerationResults: u.GenerationResults, + + ShortTermForecast: u.ShortTermForecast, + + Metadata: u.Metadata, + + UserSchedules: u.UserSchedules, + + HeadcountForecast: u.HeadcountForecast, + + AgentSchedulesVersion: u.AgentSchedulesVersion, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekschedule) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekschedulegenerationresult.go b/platformclientv2/weekschedulegenerationresult.go index 498841e6f..5737f45d7 100644 --- a/platformclientv2/weekschedulegenerationresult.go +++ b/platformclientv2/weekschedulegenerationresult.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Weekschedulegenerationresult struct { } +func (u *Weekschedulegenerationresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekschedulegenerationresult + + + + return json.Marshal(&struct { + Failed *bool `json:"failed,omitempty"` + + RunId *string `json:"runId,omitempty"` + + AgentWarnings *[]Schedulegenerationwarning `json:"agentWarnings,omitempty"` + + AgentWarningCount *int `json:"agentWarningCount,omitempty"` + *Alias + }{ + Failed: u.Failed, + + RunId: u.RunId, + + AgentWarnings: u.AgentWarnings, + + AgentWarningCount: u.AgentWarningCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekschedulegenerationresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekschedulelistitemresponse.go b/platformclientv2/weekschedulelistitemresponse.go index 0aef8f918..00451fd76 100644 --- a/platformclientv2/weekschedulelistitemresponse.go +++ b/platformclientv2/weekschedulelistitemresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Weekschedulelistitemresponse struct { } +func (u *Weekschedulelistitemresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekschedulelistitemresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + GenerationResults *Weekschedulegenerationresult `json:"generationResults,omitempty"` + + ShortTermForecast *Shorttermforecastreference `json:"shortTermForecast,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + + WeekDate: u.WeekDate, + + Description: u.Description, + + Published: u.Published, + + GenerationResults: u.GenerationResults, + + ShortTermForecast: u.ShortTermForecast, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekschedulelistitemresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekschedulelistresponse.go b/platformclientv2/weekschedulelistresponse.go index 05d13e207..334d91e9f 100644 --- a/platformclientv2/weekschedulelistresponse.go +++ b/platformclientv2/weekschedulelistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Weekschedulelistresponse struct { } +func (u *Weekschedulelistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekschedulelistresponse + + + + return json.Marshal(&struct { + Entities *[]Weekschedulelistitemresponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekschedulelistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekschedulereference.go b/platformclientv2/weekschedulereference.go index dbc5131f8..50677ab02 100644 --- a/platformclientv2/weekschedulereference.go +++ b/platformclientv2/weekschedulereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Weekschedulereference struct { } +func (u *Weekschedulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekschedulereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + + WeekDate: u.WeekDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekschedulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekscheduleresponse.go b/platformclientv2/weekscheduleresponse.go index 21486046a..7c57d619b 100644 --- a/platformclientv2/weekscheduleresponse.go +++ b/platformclientv2/weekscheduleresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Weekscheduleresponse struct { } +func (u *Weekscheduleresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekscheduleresponse + + + + return json.Marshal(&struct { + Result *Weekschedule `json:"result,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + Result: u.Result, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekscheduleresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekshifttradelistresponse.go b/platformclientv2/weekshifttradelistresponse.go index 052a184fb..1fb8d8db0 100644 --- a/platformclientv2/weekshifttradelistresponse.go +++ b/platformclientv2/weekshifttradelistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Weekshifttradelistresponse struct { } +func (u *Weekshifttradelistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekshifttradelistresponse + + + + return json.Marshal(&struct { + Entities *[]Weekshifttraderesponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekshifttradelistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekshifttradematchessummaryresponse.go b/platformclientv2/weekshifttradematchessummaryresponse.go index 5ee412731..cef7183f7 100644 --- a/platformclientv2/weekshifttradematchessummaryresponse.go +++ b/platformclientv2/weekshifttradematchessummaryresponse.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,33 @@ type Weekshifttradematchessummaryresponse struct { } +func (u *Weekshifttradematchessummaryresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekshifttradematchessummaryresponse + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + WeekDate *string `json:"weekDate,omitempty"` + + Count *int `json:"count,omitempty"` + *Alias + }{ + WeekDate: WeekDate, + + Count: u.Count, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekshifttradematchessummaryresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/weekshifttraderesponse.go b/platformclientv2/weekshifttraderesponse.go index 243aefd5c..5ee4be7c7 100644 --- a/platformclientv2/weekshifttraderesponse.go +++ b/platformclientv2/weekshifttraderesponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Weekshifttraderesponse struct { } +func (u *Weekshifttraderesponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Weekshifttraderesponse + + + + return json.Marshal(&struct { + Trade *Shifttraderesponse `json:"trade,omitempty"` + + MatchReview *Shifttradematchreviewresponse `json:"matchReview,omitempty"` + *Alias + }{ + Trade: u.Trade, + + MatchReview: u.MatchReview, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Weekshifttraderesponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentconversation.go b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentconversation.go index 315b2def4..46d28814a 100644 --- a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentconversation.go +++ b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentconversation.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wemcoachingappointmenttopiccoachingappointmentconversation struct { } +func (u *Wemcoachingappointmenttopiccoachingappointmentconversation) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wemcoachingappointmenttopiccoachingappointmentconversation + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Action *string `json:"action,omitempty"` + *Alias + }{ + Id: u.Id, + + Action: u.Action, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wemcoachingappointmenttopiccoachingappointmentconversation) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentdocument.go b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentdocument.go index 28d47b20b..429680522 100644 --- a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentdocument.go +++ b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentdocument.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wemcoachingappointmenttopiccoachingappointmentdocument struct { } +func (u *Wemcoachingappointmenttopiccoachingappointmentdocument) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wemcoachingappointmenttopiccoachingappointmentdocument + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Action *string `json:"action,omitempty"` + *Alias + }{ + Id: u.Id, + + Action: u.Action, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wemcoachingappointmenttopiccoachingappointmentdocument) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentexternallink.go b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentexternallink.go index 5df1ff07b..d8da76003 100644 --- a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentexternallink.go +++ b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentexternallink.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wemcoachingappointmenttopiccoachingappointmentexternallink struct { } +func (u *Wemcoachingappointmenttopiccoachingappointmentexternallink) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wemcoachingappointmenttopiccoachingappointmentexternallink + + + + return json.Marshal(&struct { + ExternalLink *string `json:"externalLink,omitempty"` + + Action *string `json:"action,omitempty"` + *Alias + }{ + ExternalLink: u.ExternalLink, + + Action: u.Action, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wemcoachingappointmenttopiccoachingappointmentexternallink) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentnotification.go b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentnotification.go index af8ee3877..8e73b995d 100644 --- a/platformclientv2/wemcoachingappointmenttopiccoachingappointmentnotification.go +++ b/platformclientv2/wemcoachingappointmenttopiccoachingappointmentnotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,114 @@ type Wemcoachingappointmenttopiccoachingappointmentnotification struct { } +func (u *Wemcoachingappointmenttopiccoachingappointmentnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wemcoachingappointmenttopiccoachingappointmentnotification + + + DateStart := new(string) + if u.DateStart != nil { + + *DateStart = timeutil.Strftime(u.DateStart, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateStart = nil + } + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + DateCompleted := new(string) + if u.DateCompleted != nil { + + *DateCompleted = timeutil.Strftime(u.DateCompleted, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCompleted = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateStart *string `json:"dateStart,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Status *string `json:"status,omitempty"` + + Facilitator *Wemcoachingappointmenttopicuserreference `json:"facilitator,omitempty"` + + Attendees *[]Wemcoachingappointmenttopicuserreference `json:"attendees,omitempty"` + + CreatedBy *Wemcoachingappointmenttopicuserreference `json:"createdBy,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + ModifiedBy *Wemcoachingappointmenttopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Conversations *[]Wemcoachingappointmenttopiccoachingappointmentconversation `json:"conversations,omitempty"` + + Documents *[]Wemcoachingappointmenttopiccoachingappointmentdocument `json:"documents,omitempty"` + + ChangeType *string `json:"changeType,omitempty"` + + DateCompleted *string `json:"dateCompleted,omitempty"` + + ExternalLinks *[]Wemcoachingappointmenttopiccoachingappointmentexternallink `json:"externalLinks,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateStart: DateStart, + + LengthInMinutes: u.LengthInMinutes, + + Status: u.Status, + + Facilitator: u.Facilitator, + + Attendees: u.Attendees, + + CreatedBy: u.CreatedBy, + + DateCreated: DateCreated, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + + Conversations: u.Conversations, + + Documents: u.Documents, + + ChangeType: u.ChangeType, + + DateCompleted: DateCompleted, + + ExternalLinks: u.ExternalLinks, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wemcoachingappointmenttopiccoachingappointmentnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wemcoachingappointmenttopicuserreference.go b/platformclientv2/wemcoachingappointmenttopicuserreference.go index 32e13bfce..74a265368 100644 --- a/platformclientv2/wemcoachingappointmenttopicuserreference.go +++ b/platformclientv2/wemcoachingappointmenttopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wemcoachingappointmenttopicuserreference struct { } +func (u *Wemcoachingappointmenttopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wemcoachingappointmenttopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wemcoachingappointmenttopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmagent.go b/platformclientv2/wfmagent.go index 52c2c0b43..456d66fb9 100644 --- a/platformclientv2/wfmagent.go +++ b/platformclientv2/wfmagent.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Wfmagent struct { } +func (u *Wfmagent) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmagent + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *Userreference `json:"user,omitempty"` + + WorkPlan *Workplanreference `json:"workPlan,omitempty"` + + WorkPlanRotation *Workplanrotationreference `json:"workPlanRotation,omitempty"` + + AcceptDirectShiftTrades *bool `json:"acceptDirectShiftTrades,omitempty"` + + Queues *[]Queuereference `json:"queues,omitempty"` + + Languages *[]Languagereference `json:"languages,omitempty"` + + Skills *[]Routingskillreference `json:"skills,omitempty"` + + Schedulable *bool `json:"schedulable,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + WorkPlan: u.WorkPlan, + + WorkPlanRotation: u.WorkPlanRotation, + + AcceptDirectShiftTrades: u.AcceptDirectShiftTrades, + + Queues: u.Queues, + + Languages: u.Languages, + + Skills: u.Skills, + + Schedulable: u.Schedulable, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmagent) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmagentscheduleupdatetopicuserreference.go b/platformclientv2/wfmagentscheduleupdatetopicuserreference.go index 5721a2ce6..7cbc0410c 100644 --- a/platformclientv2/wfmagentscheduleupdatetopicuserreference.go +++ b/platformclientv2/wfmagentscheduleupdatetopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmagentscheduleupdatetopicuserreference struct { } +func (u *Wfmagentscheduleupdatetopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmagentscheduleupdatetopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmagentscheduleupdatetopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdate.go b/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdate.go index 00e70a908..12782aa4d 100644 --- a/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdate.go +++ b/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,26 @@ type Wfmagentscheduleupdatetopicwfmagentscheduleupdate struct { } +func (u *Wfmagentscheduleupdatetopicwfmagentscheduleupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmagentscheduleupdatetopicwfmagentscheduleupdate + + + + return json.Marshal(&struct { + UpdateType *string `json:"updateType,omitempty"` + + ShiftStartDates *[]time.Time `json:"shiftStartDates,omitempty"` + *Alias + }{ + UpdateType: u.UpdateType, + + ShiftStartDates: u.ShiftStartDates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmagentscheduleupdatetopicwfmagentscheduleupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification.go b/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification.go index de8151251..b74c38083 100644 --- a/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification.go +++ b/platformclientv2/wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,58 @@ type Wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification struct { } +func (u *Wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + User *Wfmagentscheduleupdatetopicuserreference `json:"user,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + Shifts *[]Wfmagentscheduleupdatetopicwfmscheduleshift `json:"shifts,omitempty"` + + FullDayTimeOffMarkers *[]Wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker `json:"fullDayTimeOffMarkers,omitempty"` + + Updates *[]Wfmagentscheduleupdatetopicwfmagentscheduleupdate `json:"updates,omitempty"` + *Alias + }{ + User: u.User, + + StartDate: StartDate, + + EndDate: EndDate, + + Shifts: u.Shifts, + + FullDayTimeOffMarkers: u.FullDayTimeOffMarkers, + + Updates: u.Updates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmagentscheduleupdatetopicwfmagentscheduleupdatenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker.go b/platformclientv2/wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker.go index dd7692a0d..f52e4c32c 100644 --- a/platformclientv2/wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker.go +++ b/platformclientv2/wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker struct { } +func (u *Wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker + + + + return json.Marshal(&struct { + TimeOffRequestId *string `json:"timeOffRequestId,omitempty"` + + ManagementUnitDate *string `json:"managementUnitDate,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + IsPaid *bool `json:"isPaid,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Description *string `json:"description,omitempty"` + + Paid *bool `json:"paid,omitempty"` + *Alias + }{ + TimeOffRequestId: u.TimeOffRequestId, + + ManagementUnitDate: u.ManagementUnitDate, + + ActivityCodeId: u.ActivityCodeId, + + IsPaid: u.IsPaid, + + LengthInMinutes: u.LengthInMinutes, + + Description: u.Description, + + Paid: u.Paid, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmagentscheduleupdatetopicwfmfulldaytimeoffmarker) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleactivity.go b/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleactivity.go index 57ed3b33a..a6f9874cf 100644 --- a/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleactivity.go +++ b/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleactivity.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Wfmagentscheduleupdatetopicwfmscheduleactivity struct { } +func (u *Wfmagentscheduleupdatetopicwfmscheduleactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmagentscheduleupdatetopicwfmscheduleactivity + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + TimeOffRequestId *string `json:"timeOffRequestId,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + ActivityCodeId: u.ActivityCodeId, + + StartDate: StartDate, + + CountsAsPaidTime: u.CountsAsPaidTime, + + LengthInMinutes: u.LengthInMinutes, + + TimeOffRequestId: u.TimeOffRequestId, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmagentscheduleupdatetopicwfmscheduleactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleshift.go b/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleshift.go index 328bbd8b3..047c44c43 100644 --- a/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleshift.go +++ b/platformclientv2/wfmagentscheduleupdatetopicwfmscheduleshift.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Wfmagentscheduleupdatetopicwfmscheduleshift struct { } +func (u *Wfmagentscheduleupdatetopicwfmscheduleshift) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmagentscheduleupdatetopicwfmscheduleshift + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + + return json.Marshal(&struct { + WeekDate *string `json:"weekDate,omitempty"` + + WeekScheduleId *string `json:"weekScheduleId,omitempty"` + + Id *string `json:"id,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + LengthInMinutes *int `json:"lengthInMinutes,omitempty"` + + Activities *[]Wfmagentscheduleupdatetopicwfmscheduleactivity `json:"activities,omitempty"` + *Alias + }{ + WeekDate: u.WeekDate, + + WeekScheduleId: u.WeekScheduleId, + + Id: u.Id, + + StartDate: StartDate, + + LengthInMinutes: u.LengthInMinutes, + + Activities: u.Activities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmagentscheduleupdatetopicwfmscheduleshift) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicbuintradaydatagroup.go b/platformclientv2/wfmbuintradaydataupdatetopicbuintradaydatagroup.go index 573f81461..c1ba28a3b 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicbuintradaydatagroup.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicbuintradaydatagroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Wfmbuintradaydataupdatetopicbuintradaydatagroup struct { } +func (u *Wfmbuintradaydataupdatetopicbuintradaydatagroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicbuintradaydatagroup + + + + return json.Marshal(&struct { + MediaType *string `json:"mediaType,omitempty"` + + ForecastDataSummary *Wfmbuintradaydataupdatetopicbuintradayforecastdata `json:"forecastDataSummary,omitempty"` + + ForecastDataPerInterval *[]Wfmbuintradaydataupdatetopicbuintradayforecastdata `json:"forecastDataPerInterval,omitempty"` + + ScheduleDataSummary *Wfmbuintradaydataupdatetopicbuintradayscheduledata `json:"scheduleDataSummary,omitempty"` + + ScheduleDataPerInterval *[]Wfmbuintradaydataupdatetopicbuintradayscheduledata `json:"scheduleDataPerInterval,omitempty"` + + PerformancePredictionDataSummary *Wfmbuintradaydataupdatetopicintradayperformancepredictiondata `json:"performancePredictionDataSummary,omitempty"` + + PerformancePredictionDataPerInterval *[]Wfmbuintradaydataupdatetopicintradayperformancepredictiondata `json:"performancePredictionDataPerInterval,omitempty"` + *Alias + }{ + MediaType: u.MediaType, + + ForecastDataSummary: u.ForecastDataSummary, + + ForecastDataPerInterval: u.ForecastDataPerInterval, + + ScheduleDataSummary: u.ScheduleDataSummary, + + ScheduleDataPerInterval: u.ScheduleDataPerInterval, + + PerformancePredictionDataSummary: u.PerformancePredictionDataSummary, + + PerformancePredictionDataPerInterval: u.PerformancePredictionDataPerInterval, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicbuintradaydatagroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicbuintradayforecastdata.go b/platformclientv2/wfmbuintradaydataupdatetopicbuintradayforecastdata.go index f1d2570d7..5d513d6fe 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicbuintradayforecastdata.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicbuintradayforecastdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmbuintradaydataupdatetopicbuintradayforecastdata struct { } +func (u *Wfmbuintradaydataupdatetopicbuintradayforecastdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicbuintradayforecastdata + + + + return json.Marshal(&struct { + Offered *float32 `json:"offered,omitempty"` + + AverageHandleTimeSeconds *float32 `json:"averageHandleTimeSeconds,omitempty"` + *Alias + }{ + Offered: u.Offered, + + AverageHandleTimeSeconds: u.AverageHandleTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicbuintradayforecastdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicbuintradaynotification.go b/platformclientv2/wfmbuintradaydataupdatetopicbuintradaynotification.go index d977ddc18..bbeea0092 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicbuintradaynotification.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicbuintradaynotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmbuintradaydataupdatetopicbuintradaynotification struct { } +func (u *Wfmbuintradaydataupdatetopicbuintradaynotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicbuintradaynotification + + + + return json.Marshal(&struct { + OperationId *string `json:"operationId,omitempty"` + + Result *Wfmbuintradaydataupdatetopicbuintradayresult `json:"result,omitempty"` + *Alias + }{ + OperationId: u.OperationId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicbuintradaynotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicbuintradayresult.go b/platformclientv2/wfmbuintradaydataupdatetopicbuintradayresult.go index 2734df45a..f6aa9a372 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicbuintradayresult.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicbuintradayresult.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Wfmbuintradaydataupdatetopicbuintradayresult struct { } +func (u *Wfmbuintradaydataupdatetopicbuintradayresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicbuintradayresult + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + IntervalLengthMinutes *int `json:"intervalLengthMinutes,omitempty"` + + IntradayDataGroupings *[]Wfmbuintradaydataupdatetopicbuintradaydatagroup `json:"intradayDataGroupings,omitempty"` + + Categories *[]string `json:"categories,omitempty"` + + NoDataReason *string `json:"noDataReason,omitempty"` + + Schedule *Wfmbuintradaydataupdatetopicbuschedulereference `json:"schedule,omitempty"` + + ShortTermForecast *Wfmbuintradaydataupdatetopicbushorttermforecastreference `json:"shortTermForecast,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + IntervalLengthMinutes: u.IntervalLengthMinutes, + + IntradayDataGroupings: u.IntradayDataGroupings, + + Categories: u.Categories, + + NoDataReason: u.NoDataReason, + + Schedule: u.Schedule, + + ShortTermForecast: u.ShortTermForecast, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicbuintradayresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicbuintradayscheduledata.go b/platformclientv2/wfmbuintradaydataupdatetopicbuintradayscheduledata.go index 3e6161d86..a980c4693 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicbuintradayscheduledata.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicbuintradayscheduledata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbuintradaydataupdatetopicbuintradayscheduledata struct { } +func (u *Wfmbuintradaydataupdatetopicbuintradayscheduledata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicbuintradayscheduledata + + + + return json.Marshal(&struct { + OnQueueTimeSeconds *int `json:"onQueueTimeSeconds,omitempty"` + *Alias + }{ + OnQueueTimeSeconds: u.OnQueueTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicbuintradayscheduledata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicbuschedulereference.go b/platformclientv2/wfmbuintradaydataupdatetopicbuschedulereference.go index 44d484dd0..bbbe8e8ab 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicbuschedulereference.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicbuschedulereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbuintradaydataupdatetopicbuschedulereference struct { } +func (u *Wfmbuintradaydataupdatetopicbuschedulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicbuschedulereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicbuschedulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicbushorttermforecastreference.go b/platformclientv2/wfmbuintradaydataupdatetopicbushorttermforecastreference.go index b31b0c18f..e52e44d32 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicbushorttermforecastreference.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicbushorttermforecastreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbuintradaydataupdatetopicbushorttermforecastreference struct { } +func (u *Wfmbuintradaydataupdatetopicbushorttermforecastreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicbushorttermforecastreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: u.WeekDate, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicbushorttermforecastreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuintradaydataupdatetopicintradayperformancepredictiondata.go b/platformclientv2/wfmbuintradaydataupdatetopicintradayperformancepredictiondata.go index eb66ff312..a072ac6d5 100644 --- a/platformclientv2/wfmbuintradaydataupdatetopicintradayperformancepredictiondata.go +++ b/platformclientv2/wfmbuintradaydataupdatetopicintradayperformancepredictiondata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbuintradaydataupdatetopicintradayperformancepredictiondata struct { } +func (u *Wfmbuintradaydataupdatetopicintradayperformancepredictiondata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuintradaydataupdatetopicintradayperformancepredictiondata + + + + return json.Marshal(&struct { + ServiceLevelPercent *float32 `json:"serviceLevelPercent,omitempty"` + + AverageSpeedOfAnswerSeconds *float32 `json:"averageSpeedOfAnswerSeconds,omitempty"` + + OccupancyPercent *float32 `json:"occupancyPercent,omitempty"` + *Alias + }{ + ServiceLevelPercent: u.ServiceLevelPercent, + + AverageSpeedOfAnswerSeconds: u.AverageSpeedOfAnswerSeconds, + + OccupancyPercent: u.OccupancyPercent, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuintradaydataupdatetopicintradayperformancepredictiondata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotification.go b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotification.go index 8c56a85e2..da0714407 100644 --- a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotification.go +++ b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotif } +func (u *Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting `json:"result,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdatenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult.go b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult.go index 4ad6a7571..6bcac7a9b 100644 --- a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult.go +++ b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,50 @@ type Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresul } +func (u *Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult + + + ReviewedDate := new(string) + if u.ReviewedDate != nil { + + *ReviewedDate = timeutil.Strftime(u.ReviewedDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReviewedDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + State *string `json:"state,omitempty"` + + ReviewedBy *Wfmbulkshifttradestateupdatenotificationtopicuserreference `json:"reviewedBy,omitempty"` + + ReviewedDate *string `json:"reviewedDate,omitempty"` + + FailureReason *string `json:"failureReason,omitempty"` + + Metadata *Wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + State: u.State, + + ReviewedBy: u.ReviewedBy, + + ReviewedDate: ReviewedDate, + + FailureReason: u.FailureReason, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting.go b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting.go index 81b3e3a0c..7cff86c8b 100644 --- a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting.go +++ b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresul } +func (u *Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting + + + + return json.Marshal(&struct { + Entities *[]Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresult `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbulkshifttradestateupdatenotificationtopicbulkshifttradestateupdateresultlisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicuserreference.go b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicuserreference.go index 667deda9a..a09433286 100644 --- a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicuserreference.go +++ b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbulkshifttradestateupdatenotificationtopicuserreference struct { } +func (u *Wfmbulkshifttradestateupdatenotificationtopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbulkshifttradestateupdatenotificationtopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbulkshifttradestateupdatenotificationtopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata.go b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata.go index d170d2b18..5bccef59d 100644 --- a/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata.go +++ b/platformclientv2/wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata str } +func (u *Wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + + ModifiedBy *Wfmbulkshifttradestateupdatenotificationtopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Version: u.Version, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbulkshifttradestateupdatenotificationtopicwfmversionedentitymetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuschedulequeryresulttopicbuschedulesearchresultnotification.go b/platformclientv2/wfmbuschedulequeryresulttopicbuschedulesearchresultnotification.go index 823b9d556..059631237 100644 --- a/platformclientv2/wfmbuschedulequeryresulttopicbuschedulesearchresultnotification.go +++ b/platformclientv2/wfmbuschedulequeryresulttopicbuschedulesearchresultnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbuschedulequeryresulttopicbuschedulesearchresultnotification struct { } +func (u *Wfmbuschedulequeryresulttopicbuschedulesearchresultnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuschedulequeryresulttopicbuschedulesearchresultnotification + + + + return json.Marshal(&struct { + OperationId *string `json:"operationId,omitempty"` + + BusinessUnitId *string `json:"businessUnitId,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + OperationId: u.OperationId, + + BusinessUnitId: u.BusinessUnitId, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuschedulequeryresulttopicbuschedulesearchresultnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduleruntopicbuschedulereference.go b/platformclientv2/wfmbuscheduleruntopicbuschedulereference.go index a92741d07..100c62568 100644 --- a/platformclientv2/wfmbuscheduleruntopicbuschedulereference.go +++ b/platformclientv2/wfmbuscheduleruntopicbuschedulereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbuscheduleruntopicbuschedulereference struct { } +func (u *Wfmbuscheduleruntopicbuschedulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduleruntopicbuschedulereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduleruntopicbuschedulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduleruntopicbuschedulerun.go b/platformclientv2/wfmbuscheduleruntopicbuschedulerun.go index 20b68933e..41d7e0917 100644 --- a/platformclientv2/wfmbuscheduleruntopicbuschedulerun.go +++ b/platformclientv2/wfmbuscheduleruntopicbuschedulerun.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Wfmbuscheduleruntopicbuschedulerun struct { } +func (u *Wfmbuscheduleruntopicbuschedulerun) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduleruntopicbuschedulerun + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + PercentComplete *float32 `json:"percentComplete,omitempty"` + + IntradayRescheduling *bool `json:"intradayRescheduling,omitempty"` + + State *string `json:"state,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Schedule *Wfmbuscheduleruntopicbuschedulereference `json:"schedule,omitempty"` + + SchedulingCanceledBy *Wfmbuscheduleruntopicuserreference `json:"schedulingCanceledBy,omitempty"` + + SchedulingCompletedTime *string `json:"schedulingCompletedTime,omitempty"` + + MessageCount *int `json:"messageCount,omitempty"` + *Alias + }{ + Id: u.Id, + + PercentComplete: u.PercentComplete, + + IntradayRescheduling: u.IntradayRescheduling, + + State: u.State, + + WeekCount: u.WeekCount, + + Schedule: u.Schedule, + + SchedulingCanceledBy: u.SchedulingCanceledBy, + + SchedulingCompletedTime: u.SchedulingCompletedTime, + + MessageCount: u.MessageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduleruntopicbuschedulerun) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduleruntopicbuschedulingrunprogressnotification.go b/platformclientv2/wfmbuscheduleruntopicbuschedulingrunprogressnotification.go index f6ca707b1..e6aa876c5 100644 --- a/platformclientv2/wfmbuscheduleruntopicbuschedulingrunprogressnotification.go +++ b/platformclientv2/wfmbuscheduleruntopicbuschedulingrunprogressnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbuscheduleruntopicbuschedulingrunprogressnotification struct { } +func (u *Wfmbuscheduleruntopicbuschedulingrunprogressnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduleruntopicbuschedulingrunprogressnotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Result *Wfmbuscheduleruntopicbuschedulerun `json:"result,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduleruntopicbuschedulingrunprogressnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduleruntopicuserreference.go b/platformclientv2/wfmbuscheduleruntopicuserreference.go index a6a96b16f..784de32ed 100644 --- a/platformclientv2/wfmbuscheduleruntopicuserreference.go +++ b/platformclientv2/wfmbuscheduleruntopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbuscheduleruntopicuserreference struct { } +func (u *Wfmbuscheduleruntopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduleruntopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduleruntopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuschedulesearchresulttopicbuschedulesearchresultnotification.go b/platformclientv2/wfmbuschedulesearchresulttopicbuschedulesearchresultnotification.go index e4a5c8193..264d5791e 100644 --- a/platformclientv2/wfmbuschedulesearchresulttopicbuschedulesearchresultnotification.go +++ b/platformclientv2/wfmbuschedulesearchresulttopicbuschedulesearchresultnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbuschedulesearchresulttopicbuschedulesearchresultnotification struct { } +func (u *Wfmbuschedulesearchresulttopicbuschedulesearchresultnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuschedulesearchresulttopicbuschedulesearchresultnotification + + + + return json.Marshal(&struct { + OperationId *string `json:"operationId,omitempty"` + + BusinessUnitId *string `json:"businessUnitId,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + *Alias + }{ + OperationId: u.OperationId, + + BusinessUnitId: u.BusinessUnitId, + + DownloadUrl: u.DownloadUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuschedulesearchresulttopicbuschedulesearchresultnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicbumanagementunitschedulesummary.go b/platformclientv2/wfmbuscheduletopicbumanagementunitschedulesummary.go index ddef6ccd8..909eb08ca 100644 --- a/platformclientv2/wfmbuscheduletopicbumanagementunitschedulesummary.go +++ b/platformclientv2/wfmbuscheduletopicbumanagementunitschedulesummary.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Wfmbuscheduletopicbumanagementunitschedulesummary struct { } +func (u *Wfmbuscheduletopicbumanagementunitschedulesummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicbumanagementunitschedulesummary + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + ManagementUnit *Wfmbuscheduletopicmanagementunit `json:"managementUnit,omitempty"` + + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + Agents *[]Wfmbuscheduletopicuserreference `json:"agents,omitempty"` + + AgentCount *int `json:"agentCount,omitempty"` + *Alias + }{ + ManagementUnit: u.ManagementUnit, + + StartDate: StartDate, + + EndDate: EndDate, + + Agents: u.Agents, + + AgentCount: u.AgentCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicbumanagementunitschedulesummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicbuschedulegenerationresultsummary.go b/platformclientv2/wfmbuscheduletopicbuschedulegenerationresultsummary.go index 28e62db54..d3bc444bb 100644 --- a/platformclientv2/wfmbuscheduletopicbuschedulegenerationresultsummary.go +++ b/platformclientv2/wfmbuscheduletopicbuschedulegenerationresultsummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbuscheduletopicbuschedulegenerationresultsummary struct { } +func (u *Wfmbuscheduletopicbuschedulegenerationresultsummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicbuschedulegenerationresultsummary + + + + return json.Marshal(&struct { + Failed *bool `json:"failed,omitempty"` + + RunId *string `json:"runId,omitempty"` + + MessageCount *int `json:"messageCount,omitempty"` + *Alias + }{ + Failed: u.Failed, + + RunId: u.RunId, + + MessageCount: u.MessageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicbuschedulegenerationresultsummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicbuschedulemetadata.go b/platformclientv2/wfmbuscheduletopicbuschedulemetadata.go index e2d5c9637..1bfaf4f14 100644 --- a/platformclientv2/wfmbuscheduletopicbuschedulemetadata.go +++ b/platformclientv2/wfmbuscheduletopicbuschedulemetadata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Wfmbuscheduletopicbuschedulemetadata struct { } +func (u *Wfmbuscheduletopicbuschedulemetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicbuschedulemetadata + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Description *string `json:"description,omitempty"` + + Published *bool `json:"published,omitempty"` + + ShortTermForecast *Wfmbuscheduletopicbushorttermforecastreference `json:"shortTermForecast,omitempty"` + + ManagementUnits *[]Wfmbuscheduletopicbumanagementunitschedulesummary `json:"managementUnits,omitempty"` + + GenerationResults *Wfmbuscheduletopicbuschedulegenerationresultsummary `json:"generationResults,omitempty"` + + Metadata *Wfmbuscheduletopicwfmversionedentitymetadata `json:"metadata,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekCount: u.WeekCount, + + Description: u.Description, + + Published: u.Published, + + ShortTermForecast: u.ShortTermForecast, + + ManagementUnits: u.ManagementUnits, + + GenerationResults: u.GenerationResults, + + Metadata: u.Metadata, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicbuschedulemetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicbuschedulenotification.go b/platformclientv2/wfmbuscheduletopicbuschedulenotification.go index 9ddca8297..ffe371e37 100644 --- a/platformclientv2/wfmbuscheduletopicbuschedulenotification.go +++ b/platformclientv2/wfmbuscheduletopicbuschedulenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Wfmbuscheduletopicbuschedulenotification struct { } +func (u *Wfmbuscheduletopicbuschedulenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicbuschedulenotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + EventType *string `json:"eventType,omitempty"` + + Result *Wfmbuscheduletopicbuschedulemetadata `json:"result,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + EventType: u.EventType, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicbuschedulenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicbushorttermforecastreference.go b/platformclientv2/wfmbuscheduletopicbushorttermforecastreference.go index f4fff03af..dd995412f 100644 --- a/platformclientv2/wfmbuscheduletopicbushorttermforecastreference.go +++ b/platformclientv2/wfmbuscheduletopicbushorttermforecastreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbuscheduletopicbushorttermforecastreference struct { } +func (u *Wfmbuscheduletopicbushorttermforecastreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicbushorttermforecastreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: u.WeekDate, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicbushorttermforecastreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicmanagementunit.go b/platformclientv2/wfmbuscheduletopicmanagementunit.go index 716ceb49e..64a44d639 100644 --- a/platformclientv2/wfmbuscheduletopicmanagementunit.go +++ b/platformclientv2/wfmbuscheduletopicmanagementunit.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbuscheduletopicmanagementunit struct { } +func (u *Wfmbuscheduletopicmanagementunit) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicmanagementunit + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicmanagementunit) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicuserreference.go b/platformclientv2/wfmbuscheduletopicuserreference.go index b7c46e42f..6255bc0f2 100644 --- a/platformclientv2/wfmbuscheduletopicuserreference.go +++ b/platformclientv2/wfmbuscheduletopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbuscheduletopicuserreference struct { } +func (u *Wfmbuscheduletopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbuscheduletopicwfmversionedentitymetadata.go b/platformclientv2/wfmbuscheduletopicwfmversionedentitymetadata.go index a239c6752..4b5a1344a 100644 --- a/platformclientv2/wfmbuscheduletopicwfmversionedentitymetadata.go +++ b/platformclientv2/wfmbuscheduletopicwfmversionedentitymetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Wfmbuscheduletopicwfmversionedentitymetadata struct { } +func (u *Wfmbuscheduletopicwfmversionedentitymetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbuscheduletopicwfmversionedentitymetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + + ModifiedBy *Wfmbuscheduletopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Version: u.Version, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbuscheduletopicwfmversionedentitymetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastcopycompletetopicbuforecastmodification.go b/platformclientv2/wfmbushorttermforecastcopycompletetopicbuforecastmodification.go index 02ed90a18..c8a89c2c0 100644 --- a/platformclientv2/wfmbushorttermforecastcopycompletetopicbuforecastmodification.go +++ b/platformclientv2/wfmbushorttermforecastcopycompletetopicbuforecastmodification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Wfmbushorttermforecastcopycompletetopicbuforecastmodification struct { } +func (u *Wfmbushorttermforecastcopycompletetopicbuforecastmodification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastcopycompletetopicbuforecastmodification + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + StartIntervalIndex *int `json:"startIntervalIndex,omitempty"` + + EndIntervalIndex *int `json:"endIntervalIndex,omitempty"` + + Metric *string `json:"metric,omitempty"` + + LegacyMetric *string `json:"legacyMetric,omitempty"` + + Value *float32 `json:"value,omitempty"` + + Values *[]Wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue `json:"values,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + DisplayGranularity *string `json:"displayGranularity,omitempty"` + + PlanningGroupIds *[]string `json:"planningGroupIds,omitempty"` + *Alias + }{ + VarType: u.VarType, + + StartIntervalIndex: u.StartIntervalIndex, + + EndIntervalIndex: u.EndIntervalIndex, + + Metric: u.Metric, + + LegacyMetric: u.LegacyMetric, + + Value: u.Value, + + Values: u.Values, + + Enabled: u.Enabled, + + Granularity: u.Granularity, + + DisplayGranularity: u.DisplayGranularity, + + PlanningGroupIds: u.PlanningGroupIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastcopycompletetopicbuforecastmodification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecast.go b/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecast.go index 14c3fffcf..d34f7fa9c 100644 --- a/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecast.go +++ b/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecast.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Wfmbushorttermforecastcopycompletetopicbushorttermforecast struct { } +func (u *Wfmbushorttermforecastcopycompletetopicbushorttermforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastcopycompletetopicbushorttermforecast + + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + CreationMethod *string `json:"creationMethod,omitempty"` + + Description *string `json:"description,omitempty"` + + Legacy *bool `json:"legacy,omitempty"` + + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + + SourceDays *[]Wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer `json:"sourceDays,omitempty"` + + Modifications *[]Wfmbushorttermforecastcopycompletetopicbuforecastmodification `json:"modifications,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + PlanningGroupsVersion *int `json:"planningGroupsVersion,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Metadata *Wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata `json:"metadata,omitempty"` + + CanUseForScheduling *bool `json:"canUseForScheduling,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: u.WeekDate, + + CreationMethod: u.CreationMethod, + + Description: u.Description, + + Legacy: u.Legacy, + + ReferenceStartDate: ReferenceStartDate, + + SourceDays: u.SourceDays, + + Modifications: u.Modifications, + + TimeZone: u.TimeZone, + + PlanningGroupsVersion: u.PlanningGroupsVersion, + + WeekCount: u.WeekCount, + + Metadata: u.Metadata, + + CanUseForScheduling: u.CanUseForScheduling, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastcopycompletetopicbushorttermforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification.go b/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification.go index c9fa45456..716198d95 100644 --- a/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification.go +++ b/platformclientv2/wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification stru } +func (u *Wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + Result *Wfmbushorttermforecastcopycompletetopicbushorttermforecast `json:"result,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + *Alias + }{ + Status: u.Status, + + Result: u.Result, + + OperationId: u.OperationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastcopycompletetopicbushorttermforecastnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer.go b/platformclientv2/wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer.go index 4dbb8466b..6fbb150ab 100644 --- a/platformclientv2/wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer.go +++ b/platformclientv2/wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer struct { } +func (u *Wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer + + + + return json.Marshal(&struct { + DayOfWeek *string `json:"dayOfWeek,omitempty"` + + Weight *int `json:"weight,omitempty"` + + Date *string `json:"date,omitempty"` + + FileName *string `json:"fileName,omitempty"` + + DataKey *string `json:"dataKey,omitempty"` + *Alias + }{ + DayOfWeek: u.DayOfWeek, + + Weight: u.Weight, + + Date: u.Date, + + FileName: u.FileName, + + DataKey: u.DataKey, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastcopycompletetopicforecastsourcedaypointer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue.go b/platformclientv2/wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue.go index 93489c78f..c9ef0d2c6 100644 --- a/platformclientv2/wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue.go +++ b/platformclientv2/wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue stru } +func (u *Wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue + + + + return json.Marshal(&struct { + IntervalIndex *int `json:"intervalIndex,omitempty"` + + Value *float32 `json:"value,omitempty"` + *Alias + }{ + IntervalIndex: u.IntervalIndex, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastcopycompletetopicmodificationintervaloffsetvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastcopycompletetopicuserreference.go b/platformclientv2/wfmbushorttermforecastcopycompletetopicuserreference.go index 38c4f94a6..dc9ef8cc3 100644 --- a/platformclientv2/wfmbushorttermforecastcopycompletetopicuserreference.go +++ b/platformclientv2/wfmbushorttermforecastcopycompletetopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbushorttermforecastcopycompletetopicuserreference struct { } +func (u *Wfmbushorttermforecastcopycompletetopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastcopycompletetopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastcopycompletetopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata.go b/platformclientv2/wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata.go index e3e1087e1..d9fbad407 100644 --- a/platformclientv2/wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata.go +++ b/platformclientv2/wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata struct { } +func (u *Wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + + ModifiedBy *Wfmbushorttermforecastcopycompletetopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Version: u.Version, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastcopycompletetopicwfmversionedentitymetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbuforecastmodification.go b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbuforecastmodification.go index 86f08d729..e7659227c 100644 --- a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbuforecastmodification.go +++ b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbuforecastmodification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Wfmbushorttermforecastgenerateprogresstopicbuforecastmodification struct { } +func (u *Wfmbushorttermforecastgenerateprogresstopicbuforecastmodification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastgenerateprogresstopicbuforecastmodification + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + StartIntervalIndex *int `json:"startIntervalIndex,omitempty"` + + EndIntervalIndex *int `json:"endIntervalIndex,omitempty"` + + Metric *string `json:"metric,omitempty"` + + LegacyMetric *string `json:"legacyMetric,omitempty"` + + Value *float32 `json:"value,omitempty"` + + Values *[]Wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue `json:"values,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + DisplayGranularity *string `json:"displayGranularity,omitempty"` + + PlanningGroupIds *[]string `json:"planningGroupIds,omitempty"` + *Alias + }{ + VarType: u.VarType, + + StartIntervalIndex: u.StartIntervalIndex, + + EndIntervalIndex: u.EndIntervalIndex, + + Metric: u.Metric, + + LegacyMetric: u.LegacyMetric, + + Value: u.Value, + + Values: u.Values, + + Enabled: u.Enabled, + + Granularity: u.Granularity, + + DisplayGranularity: u.DisplayGranularity, + + PlanningGroupIds: u.PlanningGroupIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastgenerateprogresstopicbuforecastmodification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbushorttermforecast.go b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbushorttermforecast.go index 9e3243e21..1c8040254 100644 --- a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbushorttermforecast.go +++ b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicbushorttermforecast.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Wfmbushorttermforecastgenerateprogresstopicbushorttermforecast struct { } +func (u *Wfmbushorttermforecastgenerateprogresstopicbushorttermforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastgenerateprogresstopicbushorttermforecast + + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + CreationMethod *string `json:"creationMethod,omitempty"` + + Description *string `json:"description,omitempty"` + + Legacy *bool `json:"legacy,omitempty"` + + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + + SourceDays *[]Wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer `json:"sourceDays,omitempty"` + + Modifications *[]Wfmbushorttermforecastgenerateprogresstopicbuforecastmodification `json:"modifications,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + PlanningGroupsVersion *int `json:"planningGroupsVersion,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Metadata *Wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata `json:"metadata,omitempty"` + + CanUseForScheduling *bool `json:"canUseForScheduling,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: u.WeekDate, + + CreationMethod: u.CreationMethod, + + Description: u.Description, + + Legacy: u.Legacy, + + ReferenceStartDate: ReferenceStartDate, + + SourceDays: u.SourceDays, + + Modifications: u.Modifications, + + TimeZone: u.TimeZone, + + PlanningGroupsVersion: u.PlanningGroupsVersion, + + WeekCount: u.WeekCount, + + Metadata: u.Metadata, + + CanUseForScheduling: u.CanUseForScheduling, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastgenerateprogresstopicbushorttermforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer.go b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer.go index 9eb2cefac..f207a9c74 100644 --- a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer.go +++ b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer struct } +func (u *Wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer + + + + return json.Marshal(&struct { + DayOfWeek *string `json:"dayOfWeek,omitempty"` + + Weight *int `json:"weight,omitempty"` + + Date *string `json:"date,omitempty"` + + FileName *string `json:"fileName,omitempty"` + + DataKey *string `json:"dataKey,omitempty"` + *Alias + }{ + DayOfWeek: u.DayOfWeek, + + Weight: u.Weight, + + Date: u.Date, + + FileName: u.FileName, + + DataKey: u.DataKey, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastgenerateprogresstopicforecastsourcedaypointer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogressnotification.go b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogressnotification.go index 173fac370..7dd3fa2a2 100644 --- a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogressnotification.go +++ b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogressnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogr } +func (u *Wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogressnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogressnotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + Result *Wfmbushorttermforecastgenerateprogresstopicbushorttermforecast `json:"result,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + Progress *int `json:"progress,omitempty"` + *Alias + }{ + Status: u.Status, + + Result: u.Result, + + OperationId: u.OperationId, + + Progress: u.Progress, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastgenerateprogresstopicgeneratebushorttermforecastprogressnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue.go b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue.go index 7e03e6d8c..9a4475208 100644 --- a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue.go +++ b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue } +func (u *Wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue + + + + return json.Marshal(&struct { + IntervalIndex *int `json:"intervalIndex,omitempty"` + + Value *float32 `json:"value,omitempty"` + *Alias + }{ + IntervalIndex: u.IntervalIndex, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastgenerateprogresstopicmodificationintervaloffsetvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicuserreference.go b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicuserreference.go index 26a368870..29718230b 100644 --- a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicuserreference.go +++ b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbushorttermforecastgenerateprogresstopicuserreference struct { } +func (u *Wfmbushorttermforecastgenerateprogresstopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastgenerateprogresstopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastgenerateprogresstopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata.go b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata.go index 4c7aae98d..b996054dd 100644 --- a/platformclientv2/wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata.go +++ b/platformclientv2/wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata struc } +func (u *Wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + + ModifiedBy *Wfmbushorttermforecastgenerateprogresstopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Version: u.Version, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastgenerateprogresstopicwfmversionedentitymetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastimportcompletetopicbuforecastmodification.go b/platformclientv2/wfmbushorttermforecastimportcompletetopicbuforecastmodification.go index a59b4c76b..063e2e977 100644 --- a/platformclientv2/wfmbushorttermforecastimportcompletetopicbuforecastmodification.go +++ b/platformclientv2/wfmbushorttermforecastimportcompletetopicbuforecastmodification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Wfmbushorttermforecastimportcompletetopicbuforecastmodification struct { } +func (u *Wfmbushorttermforecastimportcompletetopicbuforecastmodification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastimportcompletetopicbuforecastmodification + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + StartIntervalIndex *int `json:"startIntervalIndex,omitempty"` + + EndIntervalIndex *int `json:"endIntervalIndex,omitempty"` + + Metric *string `json:"metric,omitempty"` + + LegacyMetric *string `json:"legacyMetric,omitempty"` + + Value *float32 `json:"value,omitempty"` + + Values *[]Wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue `json:"values,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + DisplayGranularity *string `json:"displayGranularity,omitempty"` + + PlanningGroupIds *[]string `json:"planningGroupIds,omitempty"` + *Alias + }{ + VarType: u.VarType, + + StartIntervalIndex: u.StartIntervalIndex, + + EndIntervalIndex: u.EndIntervalIndex, + + Metric: u.Metric, + + LegacyMetric: u.LegacyMetric, + + Value: u.Value, + + Values: u.Values, + + Enabled: u.Enabled, + + Granularity: u.Granularity, + + DisplayGranularity: u.DisplayGranularity, + + PlanningGroupIds: u.PlanningGroupIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastimportcompletetopicbuforecastmodification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecast.go b/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecast.go index 205b33f7b..b4e6699e3 100644 --- a/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecast.go +++ b/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecast.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Wfmbushorttermforecastimportcompletetopicbushorttermforecast struct { } +func (u *Wfmbushorttermforecastimportcompletetopicbushorttermforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastimportcompletetopicbushorttermforecast + + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + CreationMethod *string `json:"creationMethod,omitempty"` + + Description *string `json:"description,omitempty"` + + Legacy *bool `json:"legacy,omitempty"` + + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + + SourceDays *[]Wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer `json:"sourceDays,omitempty"` + + Modifications *[]Wfmbushorttermforecastimportcompletetopicbuforecastmodification `json:"modifications,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + PlanningGroupsVersion *int `json:"planningGroupsVersion,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Metadata *Wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata `json:"metadata,omitempty"` + + CanUseForScheduling *bool `json:"canUseForScheduling,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: u.WeekDate, + + CreationMethod: u.CreationMethod, + + Description: u.Description, + + Legacy: u.Legacy, + + ReferenceStartDate: ReferenceStartDate, + + SourceDays: u.SourceDays, + + Modifications: u.Modifications, + + TimeZone: u.TimeZone, + + PlanningGroupsVersion: u.PlanningGroupsVersion, + + WeekCount: u.WeekCount, + + Metadata: u.Metadata, + + CanUseForScheduling: u.CanUseForScheduling, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastimportcompletetopicbushorttermforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification.go b/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification.go index f84342f18..95c57c2b9 100644 --- a/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification.go +++ b/platformclientv2/wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification st } +func (u *Wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + Result *Wfmbushorttermforecastimportcompletetopicbushorttermforecast `json:"result,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + *Alias + }{ + Status: u.Status, + + Result: u.Result, + + OperationId: u.OperationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastimportcompletetopicbushorttermforecastnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer.go b/platformclientv2/wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer.go index 0b5703097..3f379e4d9 100644 --- a/platformclientv2/wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer.go +++ b/platformclientv2/wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer struct { } +func (u *Wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer + + + + return json.Marshal(&struct { + DayOfWeek *string `json:"dayOfWeek,omitempty"` + + Weight *int `json:"weight,omitempty"` + + Date *string `json:"date,omitempty"` + + FileName *string `json:"fileName,omitempty"` + + DataKey *string `json:"dataKey,omitempty"` + *Alias + }{ + DayOfWeek: u.DayOfWeek, + + Weight: u.Weight, + + Date: u.Date, + + FileName: u.FileName, + + DataKey: u.DataKey, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastimportcompletetopicforecastsourcedaypointer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue.go b/platformclientv2/wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue.go index 778d4b5c0..ad13cc57e 100644 --- a/platformclientv2/wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue.go +++ b/platformclientv2/wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue st } +func (u *Wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue + + + + return json.Marshal(&struct { + IntervalIndex *int `json:"intervalIndex,omitempty"` + + Value *float32 `json:"value,omitempty"` + *Alias + }{ + IntervalIndex: u.IntervalIndex, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastimportcompletetopicmodificationintervaloffsetvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastimportcompletetopicuserreference.go b/platformclientv2/wfmbushorttermforecastimportcompletetopicuserreference.go index 0e0951021..a61b08889 100644 --- a/platformclientv2/wfmbushorttermforecastimportcompletetopicuserreference.go +++ b/platformclientv2/wfmbushorttermforecastimportcompletetopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbushorttermforecastimportcompletetopicuserreference struct { } +func (u *Wfmbushorttermforecastimportcompletetopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastimportcompletetopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastimportcompletetopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata.go b/platformclientv2/wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata.go index 5e06deb8f..c739c7f5d 100644 --- a/platformclientv2/wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata.go +++ b/platformclientv2/wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata struct } +func (u *Wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + + ModifiedBy *Wfmbushorttermforecastimportcompletetopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Version: u.Version, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastimportcompletetopicwfmversionedentitymetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastupdatecompletetopicbuforecastmodification.go b/platformclientv2/wfmbushorttermforecastupdatecompletetopicbuforecastmodification.go index de79398d8..a0bfb117c 100644 --- a/platformclientv2/wfmbushorttermforecastupdatecompletetopicbuforecastmodification.go +++ b/platformclientv2/wfmbushorttermforecastupdatecompletetopicbuforecastmodification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -52,6 +53,62 @@ type Wfmbushorttermforecastupdatecompletetopicbuforecastmodification struct { } +func (u *Wfmbushorttermforecastupdatecompletetopicbuforecastmodification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastupdatecompletetopicbuforecastmodification + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + StartIntervalIndex *int `json:"startIntervalIndex,omitempty"` + + EndIntervalIndex *int `json:"endIntervalIndex,omitempty"` + + Metric *string `json:"metric,omitempty"` + + LegacyMetric *string `json:"legacyMetric,omitempty"` + + Value *float32 `json:"value,omitempty"` + + Values *[]Wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue `json:"values,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Granularity *string `json:"granularity,omitempty"` + + DisplayGranularity *string `json:"displayGranularity,omitempty"` + + PlanningGroupIds *[]string `json:"planningGroupIds,omitempty"` + *Alias + }{ + VarType: u.VarType, + + StartIntervalIndex: u.StartIntervalIndex, + + EndIntervalIndex: u.EndIntervalIndex, + + Metric: u.Metric, + + LegacyMetric: u.LegacyMetric, + + Value: u.Value, + + Values: u.Values, + + Enabled: u.Enabled, + + Granularity: u.Granularity, + + DisplayGranularity: u.DisplayGranularity, + + PlanningGroupIds: u.PlanningGroupIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastupdatecompletetopicbuforecastmodification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecast.go b/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecast.go index fcb665e2b..7091ba62a 100644 --- a/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecast.go +++ b/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecast.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -61,6 +62,78 @@ type Wfmbushorttermforecastupdatecompletetopicbushorttermforecast struct { } +func (u *Wfmbushorttermforecastupdatecompletetopicbushorttermforecast) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastupdatecompletetopicbushorttermforecast + + + ReferenceStartDate := new(string) + if u.ReferenceStartDate != nil { + + *ReferenceStartDate = timeutil.Strftime(u.ReferenceStartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReferenceStartDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + CreationMethod *string `json:"creationMethod,omitempty"` + + Description *string `json:"description,omitempty"` + + Legacy *bool `json:"legacy,omitempty"` + + ReferenceStartDate *string `json:"referenceStartDate,omitempty"` + + SourceDays *[]Wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer `json:"sourceDays,omitempty"` + + Modifications *[]Wfmbushorttermforecastupdatecompletetopicbuforecastmodification `json:"modifications,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + PlanningGroupsVersion *int `json:"planningGroupsVersion,omitempty"` + + WeekCount *int `json:"weekCount,omitempty"` + + Metadata *Wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata `json:"metadata,omitempty"` + + CanUseForScheduling *bool `json:"canUseForScheduling,omitempty"` + *Alias + }{ + Id: u.Id, + + WeekDate: u.WeekDate, + + CreationMethod: u.CreationMethod, + + Description: u.Description, + + Legacy: u.Legacy, + + ReferenceStartDate: ReferenceStartDate, + + SourceDays: u.SourceDays, + + Modifications: u.Modifications, + + TimeZone: u.TimeZone, + + PlanningGroupsVersion: u.PlanningGroupsVersion, + + WeekCount: u.WeekCount, + + Metadata: u.Metadata, + + CanUseForScheduling: u.CanUseForScheduling, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastupdatecompletetopicbushorttermforecast) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification.go b/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification.go index 2b0c30bc8..721bf1fbb 100644 --- a/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification.go +++ b/platformclientv2/wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification st } +func (u *Wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + Result *Wfmbushorttermforecastupdatecompletetopicbushorttermforecast `json:"result,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + *Alias + }{ + Status: u.Status, + + Result: u.Result, + + OperationId: u.OperationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastupdatecompletetopicbushorttermforecastnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer.go b/platformclientv2/wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer.go index 317524793..f00c9b511 100644 --- a/platformclientv2/wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer.go +++ b/platformclientv2/wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer struct { } +func (u *Wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer + + + + return json.Marshal(&struct { + DayOfWeek *string `json:"dayOfWeek,omitempty"` + + Weight *int `json:"weight,omitempty"` + + Date *string `json:"date,omitempty"` + + FileName *string `json:"fileName,omitempty"` + + DataKey *string `json:"dataKey,omitempty"` + *Alias + }{ + DayOfWeek: u.DayOfWeek, + + Weight: u.Weight, + + Date: u.Date, + + FileName: u.FileName, + + DataKey: u.DataKey, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastupdatecompletetopicforecastsourcedaypointer) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue.go b/platformclientv2/wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue.go index 1629e9240..42924a71a 100644 --- a/platformclientv2/wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue.go +++ b/platformclientv2/wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue st } +func (u *Wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue + + + + return json.Marshal(&struct { + IntervalIndex *int `json:"intervalIndex,omitempty"` + + Value *float32 `json:"value,omitempty"` + *Alias + }{ + IntervalIndex: u.IntervalIndex, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastupdatecompletetopicmodificationintervaloffsetvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastupdatecompletetopicuserreference.go b/platformclientv2/wfmbushorttermforecastupdatecompletetopicuserreference.go index 882e611ce..7fb6556ea 100644 --- a/platformclientv2/wfmbushorttermforecastupdatecompletetopicuserreference.go +++ b/platformclientv2/wfmbushorttermforecastupdatecompletetopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmbushorttermforecastupdatecompletetopicuserreference struct { } +func (u *Wfmbushorttermforecastupdatecompletetopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastupdatecompletetopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastupdatecompletetopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata.go b/platformclientv2/wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata.go index 676d660db..9675dc8fe 100644 --- a/platformclientv2/wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata.go +++ b/platformclientv2/wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata struct } +func (u *Wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + + ModifiedBy *Wfmbushorttermforecastupdatecompletetopicuserreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Version: u.Version, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbushorttermforecastupdatecompletetopicwfmversionedentitymetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmbusinessunitreference.go b/platformclientv2/wfmbusinessunitreference.go index b54392cb2..b72cd78fd 100644 --- a/platformclientv2/wfmbusinessunitreference.go +++ b/platformclientv2/wfmbusinessunitreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmbusinessunitreference struct { } +func (u *Wfmbusinessunitreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmbusinessunitreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmbusinessunitreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmforecastmodificationintervaloffsetvalue.go b/platformclientv2/wfmforecastmodificationintervaloffsetvalue.go index 844a76d94..dcacb4b8d 100644 --- a/platformclientv2/wfmforecastmodificationintervaloffsetvalue.go +++ b/platformclientv2/wfmforecastmodificationintervaloffsetvalue.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmforecastmodificationintervaloffsetvalue struct { } +func (u *Wfmforecastmodificationintervaloffsetvalue) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmforecastmodificationintervaloffsetvalue + + + + return json.Marshal(&struct { + IntervalIndex *int `json:"intervalIndex,omitempty"` + + Value *float64 `json:"value,omitempty"` + *Alias + }{ + IntervalIndex: u.IntervalIndex, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmforecastmodificationintervaloffsetvalue) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalculationscompletenotice.go b/platformclientv2/wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalculationscompletenotice.go index e2e691f33..ac734305e 100644 --- a/platformclientv2/wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalculationscompletenotice.go +++ b/platformclientv2/wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalculationscompletenotice.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalcul } +func (u *Wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalculationscompletenotice) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalculationscompletenotice + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + + DownloadUrls *[]string `json:"downloadUrls,omitempty"` + + QueryState *string `json:"queryState,omitempty"` + *Alias + }{ + Id: u.Id, + + DownloadUrl: u.DownloadUrl, + + DownloadUrls: u.DownloadUrls, + + QueryState: u.QueryState, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmhistoricaladherencecalculationscompletetopicwfmhistoricaladherencecalculationscompletenotice) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmhistoricaladherencequery.go b/platformclientv2/wfmhistoricaladherencequery.go index 7f5ffc55f..9b21870ce 100644 --- a/platformclientv2/wfmhistoricaladherencequery.go +++ b/platformclientv2/wfmhistoricaladherencequery.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Wfmhistoricaladherencequery struct { } +func (u *Wfmhistoricaladherencequery) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmhistoricaladherencequery + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + UserIds *[]string `json:"userIds,omitempty"` + + IncludeExceptions *bool `json:"includeExceptions,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + TimeZone: u.TimeZone, + + UserIds: u.UserIds, + + IncludeExceptions: u.IncludeExceptions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmhistoricaladherencequery) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmhistoricaladherencequeryforusers.go b/platformclientv2/wfmhistoricaladherencequeryforusers.go index 7d0c9983a..64a4fa3db 100644 --- a/platformclientv2/wfmhistoricaladherencequeryforusers.go +++ b/platformclientv2/wfmhistoricaladherencequeryforusers.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -29,6 +30,54 @@ type Wfmhistoricaladherencequeryforusers struct { } +func (u *Wfmhistoricaladherencequeryforusers) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmhistoricaladherencequeryforusers + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + TimeZone *string `json:"timeZone,omitempty"` + + UserIds *[]string `json:"userIds,omitempty"` + + IncludeExceptions *bool `json:"includeExceptions,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + TimeZone: u.TimeZone, + + UserIds: u.UserIds, + + IncludeExceptions: u.IncludeExceptions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmhistoricaladherencequeryforusers) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmhistoricaladherenceresponse.go b/platformclientv2/wfmhistoricaladherenceresponse.go index 7458de281..0732d4500 100644 --- a/platformclientv2/wfmhistoricaladherenceresponse.go +++ b/platformclientv2/wfmhistoricaladherenceresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Wfmhistoricaladherenceresponse struct { } +func (u *Wfmhistoricaladherenceresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmhistoricaladherenceresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + + DownloadResult *Wfmhistoricaladherenceresultwrapper `json:"downloadResult,omitempty"` + + DownloadUrls *[]string `json:"downloadUrls,omitempty"` + + QueryState *string `json:"queryState,omitempty"` + *Alias + }{ + Id: u.Id, + + DownloadUrl: u.DownloadUrl, + + DownloadResult: u.DownloadResult, + + DownloadUrls: u.DownloadUrls, + + QueryState: u.QueryState, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmhistoricaladherenceresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmhistoricaladherenceresultwrapper.go b/platformclientv2/wfmhistoricaladherenceresultwrapper.go index c51d7363d..e27df5f1f 100644 --- a/platformclientv2/wfmhistoricaladherenceresultwrapper.go +++ b/platformclientv2/wfmhistoricaladherenceresultwrapper.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmhistoricaladherenceresultwrapper struct { } +func (u *Wfmhistoricaladherenceresultwrapper) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmhistoricaladherenceresultwrapper + + + + return json.Marshal(&struct { + EntityId *string `json:"entityId,omitempty"` + + Data *[]Historicaladherencequeryresult `json:"data,omitempty"` + + LookupIdToSecondaryPresenceId *map[string]string `json:"lookupIdToSecondaryPresenceId,omitempty"` + *Alias + }{ + EntityId: u.EntityId, + + Data: u.Data, + + LookupIdToSecondaryPresenceId: u.LookupIdToSecondaryPresenceId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmhistoricaladherenceresultwrapper) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequestupdate.go b/platformclientv2/wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequestupdate.go index fc3e6858b..d3ccd098a 100644 --- a/platformclientv2/wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequestupdate.go +++ b/platformclientv2/wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequestupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequ } +func (u *Wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequestupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequestupdate + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + *Alias + }{ + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmhistoricaldatauploadpurgerequeststatustopichistoricaldatauploadpurgerequestupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate.go b/platformclientv2/wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate.go index 8b384c3f6..f539875bc 100644 --- a/platformclientv2/wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate.go +++ b/platformclientv2/wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate } +func (u *Wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate + + + + return json.Marshal(&struct { + RequestId *string `json:"requestId,omitempty"` + + Status *string `json:"status,omitempty"` + + VarError *string `json:"error,omitempty"` + + Active *bool `json:"active,omitempty"` + + VarType *string `json:"type,omitempty"` + *Alias + }{ + RequestId: u.RequestId, + + Status: u.Status, + + VarError: u.VarError, + + Active: u.Active, + + VarType: u.VarType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmhistoricaldatauploadrequeststatustopichistoricaldatauploadrequestupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradaydatagroup.go b/platformclientv2/wfmintradaydataupdatetopicintradaydatagroup.go index 4abdee57e..1fc380366 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradaydatagroup.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradaydatagroup.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -36,6 +37,46 @@ type Wfmintradaydataupdatetopicintradaydatagroup struct { } +func (u *Wfmintradaydataupdatetopicintradaydatagroup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradaydatagroup + + + + return json.Marshal(&struct { + MediaType *string `json:"mediaType,omitempty"` + + ForecastDataPerInterval *[]Wfmintradaydataupdatetopicintradayforecastdata `json:"forecastDataPerInterval,omitempty"` + + ScheduleDataPerInterval *[]Wfmintradaydataupdatetopicintradayscheduledata `json:"scheduleDataPerInterval,omitempty"` + + HistoricalAgentDataPerInterval *[]Wfmintradaydataupdatetopicintradayhistoricalagentdata `json:"historicalAgentDataPerInterval,omitempty"` + + HistoricalQueueDataPerInterval *[]Wfmintradaydataupdatetopicintradayhistoricalqueuedata `json:"historicalQueueDataPerInterval,omitempty"` + + PerformancePredictionAgentDataPerInterval *[]Wfmintradaydataupdatetopicintradayperformancepredictionagentdata `json:"performancePredictionAgentDataPerInterval,omitempty"` + + PerformancePredictionQueueDataPerInterval *[]Wfmintradaydataupdatetopicintradayperformancepredictionqueuedata `json:"performancePredictionQueueDataPerInterval,omitempty"` + *Alias + }{ + MediaType: u.MediaType, + + ForecastDataPerInterval: u.ForecastDataPerInterval, + + ScheduleDataPerInterval: u.ScheduleDataPerInterval, + + HistoricalAgentDataPerInterval: u.HistoricalAgentDataPerInterval, + + HistoricalQueueDataPerInterval: u.HistoricalQueueDataPerInterval, + + PerformancePredictionAgentDataPerInterval: u.PerformancePredictionAgentDataPerInterval, + + PerformancePredictionQueueDataPerInterval: u.PerformancePredictionQueueDataPerInterval, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradaydatagroup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradaydataupdate.go b/platformclientv2/wfmintradaydataupdatetopicintradaydataupdate.go index 7e704e773..fbbde29e6 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradaydataupdate.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradaydataupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Wfmintradaydataupdatetopicintradaydataupdate struct { } +func (u *Wfmintradaydataupdatetopicintradaydataupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradaydataupdate + + + StartDate := new(string) + if u.StartDate != nil { + + *StartDate = timeutil.Strftime(u.StartDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + StartDate = nil + } + + EndDate := new(string) + if u.EndDate != nil { + + *EndDate = timeutil.Strftime(u.EndDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndDate = nil + } + + + return json.Marshal(&struct { + StartDate *string `json:"startDate,omitempty"` + + EndDate *string `json:"endDate,omitempty"` + + IntervalLengthMinutes *int `json:"intervalLengthMinutes,omitempty"` + + NumberOfIntervals *int `json:"numberOfIntervals,omitempty"` + + Metrics *[]Wfmintradaydataupdatetopicintradaymetric `json:"metrics,omitempty"` + + QueueIds *[]string `json:"queueIds,omitempty"` + + IntradayDataGroupings *[]Wfmintradaydataupdatetopicintradaydatagroup `json:"intradayDataGroupings,omitempty"` + *Alias + }{ + StartDate: StartDate, + + EndDate: EndDate, + + IntervalLengthMinutes: u.IntervalLengthMinutes, + + NumberOfIntervals: u.NumberOfIntervals, + + Metrics: u.Metrics, + + QueueIds: u.QueueIds, + + IntradayDataGroupings: u.IntradayDataGroupings, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradaydataupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradayforecastdata.go b/platformclientv2/wfmintradaydataupdatetopicintradayforecastdata.go index 898fe09c3..58ba8eadb 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradayforecastdata.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradayforecastdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmintradaydataupdatetopicintradayforecastdata struct { } +func (u *Wfmintradaydataupdatetopicintradayforecastdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradayforecastdata + + + + return json.Marshal(&struct { + Offered *float32 `json:"offered,omitempty"` + + AverageTalkTimeSeconds *float32 `json:"averageTalkTimeSeconds,omitempty"` + + AverageAfterCallWorkSeconds *float32 `json:"averageAfterCallWorkSeconds,omitempty"` + *Alias + }{ + Offered: u.Offered, + + AverageTalkTimeSeconds: u.AverageTalkTimeSeconds, + + AverageAfterCallWorkSeconds: u.AverageAfterCallWorkSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradayforecastdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalagentdata.go b/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalagentdata.go index f0daa6334..b3324d25e 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalagentdata.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalagentdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmintradaydataupdatetopicintradayhistoricalagentdata struct { } +func (u *Wfmintradaydataupdatetopicintradayhistoricalagentdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradayhistoricalagentdata + + + + return json.Marshal(&struct { + OnQueueTimeSeconds *float32 `json:"onQueueTimeSeconds,omitempty"` + + InteractingTimeSeconds *float32 `json:"interactingTimeSeconds,omitempty"` + *Alias + }{ + OnQueueTimeSeconds: u.OnQueueTimeSeconds, + + InteractingTimeSeconds: u.InteractingTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradayhistoricalagentdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalqueuedata.go b/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalqueuedata.go index 8e0e4eb55..ea24bbc0b 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalqueuedata.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradayhistoricalqueuedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -40,6 +41,50 @@ type Wfmintradaydataupdatetopicintradayhistoricalqueuedata struct { } +func (u *Wfmintradaydataupdatetopicintradayhistoricalqueuedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradayhistoricalqueuedata + + + + return json.Marshal(&struct { + Offered *int `json:"offered,omitempty"` + + Completed *int `json:"completed,omitempty"` + + Answered *int `json:"answered,omitempty"` + + Abandoned *int `json:"abandoned,omitempty"` + + AverageTalkTimeSeconds *float32 `json:"averageTalkTimeSeconds,omitempty"` + + AverageAfterCallWorkSeconds *float32 `json:"averageAfterCallWorkSeconds,omitempty"` + + ServiceLevelPercent *float32 `json:"serviceLevelPercent,omitempty"` + + AverageSpeedOfAnswerSeconds *float32 `json:"averageSpeedOfAnswerSeconds,omitempty"` + *Alias + }{ + Offered: u.Offered, + + Completed: u.Completed, + + Answered: u.Answered, + + Abandoned: u.Abandoned, + + AverageTalkTimeSeconds: u.AverageTalkTimeSeconds, + + AverageAfterCallWorkSeconds: u.AverageAfterCallWorkSeconds, + + ServiceLevelPercent: u.ServiceLevelPercent, + + AverageSpeedOfAnswerSeconds: u.AverageSpeedOfAnswerSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradayhistoricalqueuedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradaymetric.go b/platformclientv2/wfmintradaydataupdatetopicintradaymetric.go index 1e38d3856..5311da57f 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradaymetric.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradaymetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmintradaydataupdatetopicintradaymetric struct { } +func (u *Wfmintradaydataupdatetopicintradaymetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradaymetric + + + + return json.Marshal(&struct { + Category *string `json:"category,omitempty"` + + Version *string `json:"version,omitempty"` + *Alias + }{ + Category: u.Category, + + Version: u.Version, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradaymetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionagentdata.go b/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionagentdata.go index 2890815e6..9d691cfe6 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionagentdata.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionagentdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmintradaydataupdatetopicintradayperformancepredictionagentdata struct { } +func (u *Wfmintradaydataupdatetopicintradayperformancepredictionagentdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradayperformancepredictionagentdata + + + + return json.Marshal(&struct { + InteractingTimeSeconds *float32 `json:"interactingTimeSeconds,omitempty"` + *Alias + }{ + InteractingTimeSeconds: u.InteractingTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradayperformancepredictionagentdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionqueuedata.go b/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionqueuedata.go index c32bc937b..0b848a813 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionqueuedata.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradayperformancepredictionqueuedata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmintradaydataupdatetopicintradayperformancepredictionqueuedata struct { } +func (u *Wfmintradaydataupdatetopicintradayperformancepredictionqueuedata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradayperformancepredictionqueuedata + + + + return json.Marshal(&struct { + ServiceLevelPercent *float32 `json:"serviceLevelPercent,omitempty"` + + AverageSpeedOfAnswerSeconds *float32 `json:"averageSpeedOfAnswerSeconds,omitempty"` + + NumberOfInteractions *float32 `json:"numberOfInteractions,omitempty"` + *Alias + }{ + ServiceLevelPercent: u.ServiceLevelPercent, + + AverageSpeedOfAnswerSeconds: u.AverageSpeedOfAnswerSeconds, + + NumberOfInteractions: u.NumberOfInteractions, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradayperformancepredictionqueuedata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradaydataupdatetopicintradayscheduledata.go b/platformclientv2/wfmintradaydataupdatetopicintradayscheduledata.go index dedc38b3d..8f9e7bc4f 100644 --- a/platformclientv2/wfmintradaydataupdatetopicintradayscheduledata.go +++ b/platformclientv2/wfmintradaydataupdatetopicintradayscheduledata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmintradaydataupdatetopicintradayscheduledata struct { } +func (u *Wfmintradaydataupdatetopicintradayscheduledata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradaydataupdatetopicintradayscheduledata + + + + return json.Marshal(&struct { + OnQueueTimeSeconds *int `json:"onQueueTimeSeconds,omitempty"` + + ScheduledTimeSeconds *int `json:"scheduledTimeSeconds,omitempty"` + *Alias + }{ + OnQueueTimeSeconds: u.OnQueueTimeSeconds, + + ScheduledTimeSeconds: u.ScheduledTimeSeconds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradaydataupdatetopicintradayscheduledata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmintradayplanninggrouplisting.go b/platformclientv2/wfmintradayplanninggrouplisting.go index 8e4a2d58e..c0516d5b2 100644 --- a/platformclientv2/wfmintradayplanninggrouplisting.go +++ b/platformclientv2/wfmintradayplanninggrouplisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmintradayplanninggrouplisting struct { } +func (u *Wfmintradayplanninggrouplisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmintradayplanninggrouplisting + + + + return json.Marshal(&struct { + Entities *[]Forecastplanninggroupresponse `json:"entities,omitempty"` + + NoDataReason *string `json:"noDataReason,omitempty"` + *Alias + }{ + Entities: u.Entities, + + NoDataReason: u.NoDataReason, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmintradayplanninggrouplisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmmoveagentscompletetopicmanagementunit.go b/platformclientv2/wfmmoveagentscompletetopicmanagementunit.go index b760e59bb..1fbf54b66 100644 --- a/platformclientv2/wfmmoveagentscompletetopicmanagementunit.go +++ b/platformclientv2/wfmmoveagentscompletetopicmanagementunit.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmmoveagentscompletetopicmanagementunit struct { } +func (u *Wfmmoveagentscompletetopicmanagementunit) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmmoveagentscompletetopicmanagementunit + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmmoveagentscompletetopicmanagementunit) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmmoveagentscompletetopicuserreference.go b/platformclientv2/wfmmoveagentscompletetopicuserreference.go index 0ead373a2..40750cfcd 100644 --- a/platformclientv2/wfmmoveagentscompletetopicuserreference.go +++ b/platformclientv2/wfmmoveagentscompletetopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmmoveagentscompletetopicuserreference struct { } +func (u *Wfmmoveagentscompletetopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmmoveagentscompletetopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmmoveagentscompletetopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentdata.go b/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentdata.go index 212a3962d..2c42d588b 100644 --- a/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentdata.go +++ b/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentdata.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmmoveagentscompletetopicwfmmoveagentdata struct { } +func (u *Wfmmoveagentscompletetopicwfmmoveagentdata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmmoveagentscompletetopicwfmmoveagentdata + + + + return json.Marshal(&struct { + User *Wfmmoveagentscompletetopicuserreference `json:"user,omitempty"` + + Result *string `json:"result,omitempty"` + *Alias + }{ + User: u.User, + + Result: u.Result, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmmoveagentscompletetopicwfmmoveagentdata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentscomplete.go b/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentscomplete.go index 29cebfc57..c9e61cd83 100644 --- a/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentscomplete.go +++ b/platformclientv2/wfmmoveagentscompletetopicwfmmoveagentscomplete.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Wfmmoveagentscompletetopicwfmmoveagentscomplete struct { } +func (u *Wfmmoveagentscompletetopicwfmmoveagentscomplete) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmmoveagentscompletetopicwfmmoveagentscomplete + + + + return json.Marshal(&struct { + RequestingUser *Wfmmoveagentscompletetopicuserreference `json:"requestingUser,omitempty"` + + DestinationManagementUnit *Wfmmoveagentscompletetopicmanagementunit `json:"destinationManagementUnit,omitempty"` + + Results *[]Wfmmoveagentscompletetopicwfmmoveagentdata `json:"results,omitempty"` + *Alias + }{ + RequestingUser: u.RequestingUser, + + DestinationManagementUnit: u.DestinationManagementUnit, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmmoveagentscompletetopicwfmmoveagentscomplete) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmmovemanagementunittopicbusinessunit.go b/platformclientv2/wfmmovemanagementunittopicbusinessunit.go index 5f586b849..450a0a6e2 100644 --- a/platformclientv2/wfmmovemanagementunittopicbusinessunit.go +++ b/platformclientv2/wfmmovemanagementunittopicbusinessunit.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmmovemanagementunittopicbusinessunit struct { } +func (u *Wfmmovemanagementunittopicbusinessunit) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmmovemanagementunittopicbusinessunit + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmmovemanagementunittopicbusinessunit) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmmovemanagementunittopicmovemanagementunitnotification.go b/platformclientv2/wfmmovemanagementunittopicmovemanagementunitnotification.go index daacdb69a..54383b5d8 100644 --- a/platformclientv2/wfmmovemanagementunittopicmovemanagementunitnotification.go +++ b/platformclientv2/wfmmovemanagementunittopicmovemanagementunitnotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmmovemanagementunittopicmovemanagementunitnotification struct { } +func (u *Wfmmovemanagementunittopicmovemanagementunitnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmmovemanagementunittopicmovemanagementunitnotification + + + + return json.Marshal(&struct { + BusinessUnit *Wfmmovemanagementunittopicbusinessunit `json:"businessUnit,omitempty"` + + Status *string `json:"status,omitempty"` + *Alias + }{ + BusinessUnit: u.BusinessUnit, + + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmmovemanagementunittopicmovemanagementunitnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmschedulereference.go b/platformclientv2/wfmschedulereference.go index 0157566ed..6491246ae 100644 --- a/platformclientv2/wfmschedulereference.go +++ b/platformclientv2/wfmschedulereference.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -25,6 +26,41 @@ type Wfmschedulereference struct { } +func (u *Wfmschedulereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmschedulereference + + + WeekDate := new(string) + if u.WeekDate != nil { + *WeekDate = timeutil.Strftime(u.WeekDate, "%Y-%m-%d") + } else { + WeekDate = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + BusinessUnit *Wfmbusinessunitreference `json:"businessUnit,omitempty"` + + WeekDate *string `json:"weekDate,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + BusinessUnit: u.BusinessUnit, + + WeekDate: WeekDate, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmschedulereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmscheduletopicwfmschedulenotification.go b/platformclientv2/wfmscheduletopicwfmschedulenotification.go index 7795ea334..573af19ea 100644 --- a/platformclientv2/wfmscheduletopicwfmschedulenotification.go +++ b/platformclientv2/wfmscheduletopicwfmschedulenotification.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Wfmscheduletopicwfmschedulenotification struct { } +func (u *Wfmscheduletopicwfmschedulenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmscheduletopicwfmschedulenotification + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + + OperationId *string `json:"operationId,omitempty"` + + DownloadUrl *string `json:"downloadUrl,omitempty"` + + PercentComplete *int `json:"percentComplete,omitempty"` + + EventType *string `json:"eventType,omitempty"` + *Alias + }{ + Status: u.Status, + + OperationId: u.OperationId, + + DownloadUrl: u.DownloadUrl, + + PercentComplete: u.PercentComplete, + + EventType: u.EventType, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmscheduletopicwfmschedulenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmtimeoffrequestupdatetopictimeoffrequestupdate.go b/platformclientv2/wfmtimeoffrequestupdatetopictimeoffrequestupdate.go index bf4b35e56..db1f4a361 100644 --- a/platformclientv2/wfmtimeoffrequestupdatetopictimeoffrequestupdate.go +++ b/platformclientv2/wfmtimeoffrequestupdatetopictimeoffrequestupdate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -80,6 +81,90 @@ type Wfmtimeoffrequestupdatetopictimeoffrequestupdate struct { } +func (u *Wfmtimeoffrequestupdatetopictimeoffrequestupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmtimeoffrequestupdatetopictimeoffrequestupdate + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + User *Wfmtimeoffrequestupdatetopicuserreference `json:"user,omitempty"` + + IsFullDayRequest *bool `json:"isFullDayRequest,omitempty"` + + MarkedAsRead *bool `json:"markedAsRead,omitempty"` + + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Paid *bool `json:"paid,omitempty"` + + Status *string `json:"status,omitempty"` + + Substatus *string `json:"substatus,omitempty"` + + PartialDayStartDateTimes *[]string `json:"partialDayStartDateTimes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + + DailyDurationMinutes *int `json:"dailyDurationMinutes,omitempty"` + + Notes *string `json:"notes,omitempty"` + + ReviewedDate *string `json:"reviewedDate,omitempty"` + + ReviewedBy *string `json:"reviewedBy,omitempty"` + + SubmittedDate *string `json:"submittedDate,omitempty"` + + SubmittedBy *string `json:"submittedBy,omitempty"` + + ModifiedDate *string `json:"modifiedDate,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + *Alias + }{ + Id: u.Id, + + User: u.User, + + IsFullDayRequest: u.IsFullDayRequest, + + MarkedAsRead: u.MarkedAsRead, + + ActivityCodeId: u.ActivityCodeId, + + Paid: u.Paid, + + Status: u.Status, + + Substatus: u.Substatus, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + + DailyDurationMinutes: u.DailyDurationMinutes, + + Notes: u.Notes, + + ReviewedDate: u.ReviewedDate, + + ReviewedBy: u.ReviewedBy, + + SubmittedDate: u.SubmittedDate, + + SubmittedBy: u.SubmittedBy, + + ModifiedDate: u.ModifiedDate, + + ModifiedBy: u.ModifiedBy, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmtimeoffrequestupdatetopictimeoffrequestupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmtimeoffrequestupdatetopicuserreference.go b/platformclientv2/wfmtimeoffrequestupdatetopicuserreference.go index 5ac240e93..b8cf59fc9 100644 --- a/platformclientv2/wfmtimeoffrequestupdatetopicuserreference.go +++ b/platformclientv2/wfmtimeoffrequestupdatetopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmtimeoffrequestupdatetopicuserreference struct { } +func (u *Wfmtimeoffrequestupdatetopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmtimeoffrequestupdatetopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmtimeoffrequestupdatetopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmupdateagentdetailstopicwfmupdateagentdetailscomplete.go b/platformclientv2/wfmupdateagentdetailstopicwfmupdateagentdetailscomplete.go index 5e5aaf60c..d213ea66f 100644 --- a/platformclientv2/wfmupdateagentdetailstopicwfmupdateagentdetailscomplete.go +++ b/platformclientv2/wfmupdateagentdetailstopicwfmupdateagentdetailscomplete.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmupdateagentdetailstopicwfmupdateagentdetailscomplete struct { } +func (u *Wfmupdateagentdetailstopicwfmupdateagentdetailscomplete) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmupdateagentdetailstopicwfmupdateagentdetailscomplete + + + + return json.Marshal(&struct { + Status *string `json:"status,omitempty"` + *Alias + }{ + Status: u.Status, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmupdateagentdetailstopicwfmupdateagentdetailscomplete) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserentitylisting.go b/platformclientv2/wfmuserentitylisting.go index 0a6657504..970fea9c9 100644 --- a/platformclientv2/wfmuserentitylisting.go +++ b/platformclientv2/wfmuserentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmuserentitylisting struct { } +func (u *Wfmuserentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserentitylisting + + + + return json.Marshal(&struct { + Entities *[]User `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmusernotification.go b/platformclientv2/wfmusernotification.go index 8e245e91b..3d31a3efb 100644 --- a/platformclientv2/wfmusernotification.go +++ b/platformclientv2/wfmusernotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,62 @@ type Wfmusernotification struct { } +func (u *Wfmusernotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmusernotification + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MutableGroupId *string `json:"mutableGroupId,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + VarType *string `json:"type,omitempty"` + + ShiftTrade *Shifttradenotification `json:"shiftTrade,omitempty"` + + TimeOffRequest *Timeoffrequestnotification `json:"timeOffRequest,omitempty"` + + MarkedAsRead *bool `json:"markedAsRead,omitempty"` + + AgentNotification *bool `json:"agentNotification,omitempty"` + + OtherNotificationIdsInGroup *[]string `json:"otherNotificationIdsInGroup,omitempty"` + *Alias + }{ + Id: u.Id, + + MutableGroupId: u.MutableGroupId, + + Timestamp: Timestamp, + + VarType: u.VarType, + + ShiftTrade: u.ShiftTrade, + + TimeOffRequest: u.TimeOffRequest, + + MarkedAsRead: u.MarkedAsRead, + + AgentNotification: u.AgentNotification, + + OtherNotificationIdsInGroup: u.OtherNotificationIdsInGroup, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmusernotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmusernotificationtopicshifttradenotification.go b/platformclientv2/wfmusernotificationtopicshifttradenotification.go index d4d220242..586076e7d 100644 --- a/platformclientv2/wfmusernotificationtopicshifttradenotification.go +++ b/platformclientv2/wfmusernotificationtopicshifttradenotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Wfmusernotificationtopicshifttradenotification struct { } +func (u *Wfmusernotificationtopicshifttradenotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmusernotificationtopicshifttradenotification + + + InitiatingShiftDate := new(string) + if u.InitiatingShiftDate != nil { + + *InitiatingShiftDate = timeutil.Strftime(u.InitiatingShiftDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + InitiatingShiftDate = nil + } + + ReceivingShiftDate := new(string) + if u.ReceivingShiftDate != nil { + + *ReceivingShiftDate = timeutil.Strftime(u.ReceivingShiftDate, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ReceivingShiftDate = nil + } + + + return json.Marshal(&struct { + WeekDate *string `json:"weekDate,omitempty"` + + TradeId *string `json:"tradeId,omitempty"` + + OneSided *bool `json:"oneSided,omitempty"` + + NewState *string `json:"newState,omitempty"` + + InitiatingUser *Wfmusernotificationtopicuserreference `json:"initiatingUser,omitempty"` + + InitiatingShiftDate *string `json:"initiatingShiftDate,omitempty"` + + ReceivingUser *Wfmusernotificationtopicuserreference `json:"receivingUser,omitempty"` + + ReceivingShiftDate *string `json:"receivingShiftDate,omitempty"` + *Alias + }{ + WeekDate: u.WeekDate, + + TradeId: u.TradeId, + + OneSided: u.OneSided, + + NewState: u.NewState, + + InitiatingUser: u.InitiatingUser, + + InitiatingShiftDate: InitiatingShiftDate, + + ReceivingUser: u.ReceivingUser, + + ReceivingShiftDate: ReceivingShiftDate, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmusernotificationtopicshifttradenotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmusernotificationtopictimeoffrequestnotification.go b/platformclientv2/wfmusernotificationtopictimeoffrequestnotification.go index b17ff70a5..06dcf0e0d 100644 --- a/platformclientv2/wfmusernotificationtopictimeoffrequestnotification.go +++ b/platformclientv2/wfmusernotificationtopictimeoffrequestnotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,42 @@ type Wfmusernotificationtopictimeoffrequestnotification struct { } +func (u *Wfmusernotificationtopictimeoffrequestnotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmusernotificationtopictimeoffrequestnotification + + + + return json.Marshal(&struct { + TimeOffRequestId *string `json:"timeOffRequestId,omitempty"` + + User *Wfmusernotificationtopicuserreference `json:"user,omitempty"` + + IsFullDayRequest *bool `json:"isFullDayRequest,omitempty"` + + Status *string `json:"status,omitempty"` + + PartialDayStartDateTimes *[]time.Time `json:"partialDayStartDateTimes,omitempty"` + + FullDayManagementUnitDates *[]string `json:"fullDayManagementUnitDates,omitempty"` + *Alias + }{ + TimeOffRequestId: u.TimeOffRequestId, + + User: u.User, + + IsFullDayRequest: u.IsFullDayRequest, + + Status: u.Status, + + PartialDayStartDateTimes: u.PartialDayStartDateTimes, + + FullDayManagementUnitDates: u.FullDayManagementUnitDates, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmusernotificationtopictimeoffrequestnotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmusernotificationtopicuserreference.go b/platformclientv2/wfmusernotificationtopicuserreference.go index 2af04c481..039a701c6 100644 --- a/platformclientv2/wfmusernotificationtopicuserreference.go +++ b/platformclientv2/wfmusernotificationtopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmusernotificationtopicuserreference struct { } +func (u *Wfmusernotificationtopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmusernotificationtopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmusernotificationtopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmusernotificationtopicwfmusernotification.go b/platformclientv2/wfmusernotificationtopicwfmusernotification.go index 4b0a88519..2c9739e45 100644 --- a/platformclientv2/wfmusernotificationtopicwfmusernotification.go +++ b/platformclientv2/wfmusernotificationtopicwfmusernotification.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -45,6 +46,62 @@ type Wfmusernotificationtopicwfmusernotification struct { } +func (u *Wfmusernotificationtopicwfmusernotification) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmusernotificationtopicwfmusernotification + + + Timestamp := new(string) + if u.Timestamp != nil { + + *Timestamp = timeutil.Strftime(u.Timestamp, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + Timestamp = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + MutableGroupId *string `json:"mutableGroupId,omitempty"` + + Timestamp *string `json:"timestamp,omitempty"` + + VarType *string `json:"type,omitempty"` + + ShiftTrade *Wfmusernotificationtopicshifttradenotification `json:"shiftTrade,omitempty"` + + TimeOffRequest *Wfmusernotificationtopictimeoffrequestnotification `json:"timeOffRequest,omitempty"` + + AgentNotification *bool `json:"agentNotification,omitempty"` + + OtherNotificationIdsInGroup *[]string `json:"otherNotificationIdsInGroup,omitempty"` + + MarkedAsRead *bool `json:"markedAsRead,omitempty"` + *Alias + }{ + Id: u.Id, + + MutableGroupId: u.MutableGroupId, + + Timestamp: Timestamp, + + VarType: u.VarType, + + ShiftTrade: u.ShiftTrade, + + TimeOffRequest: u.TimeOffRequest, + + AgentNotification: u.AgentNotification, + + OtherNotificationIdsInGroup: u.OtherNotificationIdsInGroup, + + MarkedAsRead: u.MarkedAsRead, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmusernotificationtopicwfmusernotification) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicqueuereference.go b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicqueuereference.go index 3be7e5a7d..1ce856330 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicqueuereference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicqueuereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmuserscheduleadherenceupdatedmutopicqueuereference struct { } +func (u *Wfmuserscheduleadherenceupdatedmutopicqueuereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedmutopicqueuereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedmutopicqueuereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicurireference.go b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicurireference.go index 081342b4a..891fe0a3c 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicurireference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmuserscheduleadherenceupdatedmutopicurireference struct { } +func (u *Wfmuserscheduleadherenceupdatedmutopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedmutopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedmutopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserreference.go b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserreference.go index 1a69839f5..36f90cb75 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserreference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmuserscheduleadherenceupdatedmutopicuserreference struct { } +func (u *Wfmuserscheduleadherenceupdatedmutopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedmutopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedmutopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate.go b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate.go index 9780adf20..7c8e60190 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,106 @@ type Wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate struct { } +func (u *Wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate + + + AdherenceChangeTime := new(string) + if u.AdherenceChangeTime != nil { + + *AdherenceChangeTime = timeutil.Strftime(u.AdherenceChangeTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + AdherenceChangeTime = nil + } + + PresenceUpdateTime := new(string) + if u.PresenceUpdateTime != nil { + + *PresenceUpdateTime = timeutil.Strftime(u.PresenceUpdateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PresenceUpdateTime = nil + } + + ActiveQueuesModifiedTime := new(string) + if u.ActiveQueuesModifiedTime != nil { + + *ActiveQueuesModifiedTime = timeutil.Strftime(u.ActiveQueuesModifiedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ActiveQueuesModifiedTime = nil + } + + + return json.Marshal(&struct { + User *Wfmuserscheduleadherenceupdatedmutopicuserreference `json:"user,omitempty"` + + ManagementUnitId *string `json:"managementUnitId,omitempty"` + + Team *Wfmuserscheduleadherenceupdatedmutopicurireference `json:"team,omitempty"` + + ScheduledActivityCategory *string `json:"scheduledActivityCategory,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + OrganizationSecondaryPresenceId *string `json:"organizationSecondaryPresenceId,omitempty"` + + RoutingStatus *string `json:"routingStatus,omitempty"` + + ActualActivityCategory *string `json:"actualActivityCategory,omitempty"` + + IsOutOfOffice *bool `json:"isOutOfOffice,omitempty"` + + AdherenceState *string `json:"adherenceState,omitempty"` + + Impact *string `json:"impact,omitempty"` + + AdherenceChangeTime *string `json:"adherenceChangeTime,omitempty"` + + PresenceUpdateTime *string `json:"presenceUpdateTime,omitempty"` + + ActiveQueues *[]Wfmuserscheduleadherenceupdatedmutopicqueuereference `json:"activeQueues,omitempty"` + + ActiveQueuesModifiedTime *string `json:"activeQueuesModifiedTime,omitempty"` + + RemovedFromManagementUnit *bool `json:"removedFromManagementUnit,omitempty"` + *Alias + }{ + User: u.User, + + ManagementUnitId: u.ManagementUnitId, + + Team: u.Team, + + ScheduledActivityCategory: u.ScheduledActivityCategory, + + SystemPresence: u.SystemPresence, + + OrganizationSecondaryPresenceId: u.OrganizationSecondaryPresenceId, + + RoutingStatus: u.RoutingStatus, + + ActualActivityCategory: u.ActualActivityCategory, + + IsOutOfOffice: u.IsOutOfOffice, + + AdherenceState: u.AdherenceState, + + Impact: u.Impact, + + AdherenceChangeTime: AdherenceChangeTime, + + PresenceUpdateTime: PresenceUpdateTime, + + ActiveQueues: u.ActiveQueues, + + ActiveQueuesModifiedTime: ActiveQueuesModifiedTime, + + RemovedFromManagementUnit: u.RemovedFromManagementUnit, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedmutopicuserscheduleadherenceupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicqueuereference.go b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicqueuereference.go index 75e5264dd..a88e47d7b 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicqueuereference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicqueuereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmuserscheduleadherenceupdatedteamtopicqueuereference struct { } +func (u *Wfmuserscheduleadherenceupdatedteamtopicqueuereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedteamtopicqueuereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedteamtopicqueuereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicurireference.go b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicurireference.go index d871c8f61..da2d29c5d 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicurireference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmuserscheduleadherenceupdatedteamtopicurireference struct { } +func (u *Wfmuserscheduleadherenceupdatedteamtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedteamtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedteamtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserreference.go b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserreference.go index d95cb3c46..de524882a 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserreference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmuserscheduleadherenceupdatedteamtopicuserreference struct { } +func (u *Wfmuserscheduleadherenceupdatedteamtopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedteamtopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedteamtopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate.go b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate.go index 61a606582..e8403a6ec 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,106 @@ type Wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate struct } +func (u *Wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate + + + AdherenceChangeTime := new(string) + if u.AdherenceChangeTime != nil { + + *AdherenceChangeTime = timeutil.Strftime(u.AdherenceChangeTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + AdherenceChangeTime = nil + } + + PresenceUpdateTime := new(string) + if u.PresenceUpdateTime != nil { + + *PresenceUpdateTime = timeutil.Strftime(u.PresenceUpdateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PresenceUpdateTime = nil + } + + ActiveQueuesModifiedTime := new(string) + if u.ActiveQueuesModifiedTime != nil { + + *ActiveQueuesModifiedTime = timeutil.Strftime(u.ActiveQueuesModifiedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ActiveQueuesModifiedTime = nil + } + + + return json.Marshal(&struct { + User *Wfmuserscheduleadherenceupdatedteamtopicuserreference `json:"user,omitempty"` + + ManagementUnitId *string `json:"managementUnitId,omitempty"` + + Team *Wfmuserscheduleadherenceupdatedteamtopicurireference `json:"team,omitempty"` + + ScheduledActivityCategory *string `json:"scheduledActivityCategory,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + OrganizationSecondaryPresenceId *string `json:"organizationSecondaryPresenceId,omitempty"` + + RoutingStatus *string `json:"routingStatus,omitempty"` + + ActualActivityCategory *string `json:"actualActivityCategory,omitempty"` + + IsOutOfOffice *bool `json:"isOutOfOffice,omitempty"` + + AdherenceState *string `json:"adherenceState,omitempty"` + + Impact *string `json:"impact,omitempty"` + + AdherenceChangeTime *string `json:"adherenceChangeTime,omitempty"` + + PresenceUpdateTime *string `json:"presenceUpdateTime,omitempty"` + + ActiveQueues *[]Wfmuserscheduleadherenceupdatedteamtopicqueuereference `json:"activeQueues,omitempty"` + + ActiveQueuesModifiedTime *string `json:"activeQueuesModifiedTime,omitempty"` + + RemovedFromManagementUnit *bool `json:"removedFromManagementUnit,omitempty"` + *Alias + }{ + User: u.User, + + ManagementUnitId: u.ManagementUnitId, + + Team: u.Team, + + ScheduledActivityCategory: u.ScheduledActivityCategory, + + SystemPresence: u.SystemPresence, + + OrganizationSecondaryPresenceId: u.OrganizationSecondaryPresenceId, + + RoutingStatus: u.RoutingStatus, + + ActualActivityCategory: u.ActualActivityCategory, + + IsOutOfOffice: u.IsOutOfOffice, + + AdherenceState: u.AdherenceState, + + Impact: u.Impact, + + AdherenceChangeTime: AdherenceChangeTime, + + PresenceUpdateTime: PresenceUpdateTime, + + ActiveQueues: u.ActiveQueues, + + ActiveQueuesModifiedTime: ActiveQueuesModifiedTime, + + RemovedFromManagementUnit: u.RemovedFromManagementUnit, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedteamtopicuserscheduleadherenceupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedtopicqueuereference.go b/platformclientv2/wfmuserscheduleadherenceupdatedtopicqueuereference.go index 40be5d204..9bbdccc89 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedtopicqueuereference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedtopicqueuereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmuserscheduleadherenceupdatedtopicqueuereference struct { } +func (u *Wfmuserscheduleadherenceupdatedtopicqueuereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedtopicqueuereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedtopicqueuereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedtopicurireference.go b/platformclientv2/wfmuserscheduleadherenceupdatedtopicurireference.go index 1b8197c3a..0c3718896 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedtopicurireference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedtopicurireference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Wfmuserscheduleadherenceupdatedtopicurireference struct { } +func (u *Wfmuserscheduleadherenceupdatedtopicurireference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedtopicurireference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedtopicurireference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserreference.go b/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserreference.go index 7056c27a3..9b2080118 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserreference.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wfmuserscheduleadherenceupdatedtopicuserreference struct { } +func (u *Wfmuserscheduleadherenceupdatedtopicuserreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedtopicuserreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedtopicuserreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate.go b/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate.go index d755e142a..7c7bf88e6 100644 --- a/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate.go +++ b/platformclientv2/wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -73,6 +74,106 @@ type Wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate struct { } +func (u *Wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate + + + AdherenceChangeTime := new(string) + if u.AdherenceChangeTime != nil { + + *AdherenceChangeTime = timeutil.Strftime(u.AdherenceChangeTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + AdherenceChangeTime = nil + } + + PresenceUpdateTime := new(string) + if u.PresenceUpdateTime != nil { + + *PresenceUpdateTime = timeutil.Strftime(u.PresenceUpdateTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + PresenceUpdateTime = nil + } + + ActiveQueuesModifiedTime := new(string) + if u.ActiveQueuesModifiedTime != nil { + + *ActiveQueuesModifiedTime = timeutil.Strftime(u.ActiveQueuesModifiedTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + ActiveQueuesModifiedTime = nil + } + + + return json.Marshal(&struct { + User *Wfmuserscheduleadherenceupdatedtopicuserreference `json:"user,omitempty"` + + ManagementUnitId *string `json:"managementUnitId,omitempty"` + + Team *Wfmuserscheduleadherenceupdatedtopicurireference `json:"team,omitempty"` + + ScheduledActivityCategory *string `json:"scheduledActivityCategory,omitempty"` + + SystemPresence *string `json:"systemPresence,omitempty"` + + OrganizationSecondaryPresenceId *string `json:"organizationSecondaryPresenceId,omitempty"` + + RoutingStatus *string `json:"routingStatus,omitempty"` + + ActualActivityCategory *string `json:"actualActivityCategory,omitempty"` + + IsOutOfOffice *bool `json:"isOutOfOffice,omitempty"` + + AdherenceState *string `json:"adherenceState,omitempty"` + + Impact *string `json:"impact,omitempty"` + + AdherenceChangeTime *string `json:"adherenceChangeTime,omitempty"` + + PresenceUpdateTime *string `json:"presenceUpdateTime,omitempty"` + + ActiveQueues *[]Wfmuserscheduleadherenceupdatedtopicqueuereference `json:"activeQueues,omitempty"` + + ActiveQueuesModifiedTime *string `json:"activeQueuesModifiedTime,omitempty"` + + RemovedFromManagementUnit *bool `json:"removedFromManagementUnit,omitempty"` + *Alias + }{ + User: u.User, + + ManagementUnitId: u.ManagementUnitId, + + Team: u.Team, + + ScheduledActivityCategory: u.ScheduledActivityCategory, + + SystemPresence: u.SystemPresence, + + OrganizationSecondaryPresenceId: u.OrganizationSecondaryPresenceId, + + RoutingStatus: u.RoutingStatus, + + ActualActivityCategory: u.ActualActivityCategory, + + IsOutOfOffice: u.IsOutOfOffice, + + AdherenceState: u.AdherenceState, + + Impact: u.Impact, + + AdherenceChangeTime: AdherenceChangeTime, + + PresenceUpdateTime: PresenceUpdateTime, + + ActiveQueues: u.ActiveQueues, + + ActiveQueuesModifiedTime: ActiveQueuesModifiedTime, + + RemovedFromManagementUnit: u.RemovedFromManagementUnit, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmuserscheduleadherenceupdatedtopicuserscheduleadherenceupdate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wfmversionedentitymetadata.go b/platformclientv2/wfmversionedentitymetadata.go index 04c767bce..807a64278 100644 --- a/platformclientv2/wfmversionedentitymetadata.go +++ b/platformclientv2/wfmversionedentitymetadata.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -21,6 +22,38 @@ type Wfmversionedentitymetadata struct { } +func (u *Wfmversionedentitymetadata) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wfmversionedentitymetadata + + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Version *int `json:"version,omitempty"` + + ModifiedBy *Userreference `json:"modifiedBy,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + *Alias + }{ + Version: u.Version, + + ModifiedBy: u.ModifiedBy, + + DateModified: DateModified, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wfmversionedentitymetadata) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/whatsappdefinition.go b/platformclientv2/whatsappdefinition.go index a67fe1d0c..0233a0455 100644 --- a/platformclientv2/whatsappdefinition.go +++ b/platformclientv2/whatsappdefinition.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Whatsappdefinition struct { } +func (u *Whatsappdefinition) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Whatsappdefinition + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Namespace *string `json:"namespace,omitempty"` + + Language *string `json:"language,omitempty"` + *Alias + }{ + Name: u.Name, + + Namespace: u.Namespace, + + Language: u.Language, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Whatsappdefinition) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/whatsappid.go b/platformclientv2/whatsappid.go index 379d853b9..991bdecde 100644 --- a/platformclientv2/whatsappid.go +++ b/platformclientv2/whatsappid.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Whatsappid struct { } +func (u *Whatsappid) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Whatsappid + + + + return json.Marshal(&struct { + PhoneNumber *Phonenumber `json:"phoneNumber,omitempty"` + + DisplayName *string `json:"displayName,omitempty"` + *Alias + }{ + PhoneNumber: u.PhoneNumber, + + DisplayName: u.DisplayName, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Whatsappid) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/whatsappintegration.go b/platformclientv2/whatsappintegration.go index cba582c66..72f67a142 100644 --- a/platformclientv2/whatsappintegration.go +++ b/platformclientv2/whatsappintegration.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -69,6 +70,94 @@ type Whatsappintegration struct { } +func (u *Whatsappintegration) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Whatsappintegration + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + Status *string `json:"status,omitempty"` + + Recipient *Domainentityref `json:"recipient,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + CreatedBy *Domainentityref `json:"createdBy,omitempty"` + + ModifiedBy *Domainentityref `json:"modifiedBy,omitempty"` + + Version *int `json:"version,omitempty"` + + ActivationStatusCode *string `json:"activationStatusCode,omitempty"` + + ActivationErrorInfo *Errorbody `json:"activationErrorInfo,omitempty"` + + CreateStatus *string `json:"createStatus,omitempty"` + + CreateError *Errorbody `json:"createError,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PhoneNumber: u.PhoneNumber, + + Status: u.Status, + + Recipient: u.Recipient, + + DateCreated: DateCreated, + + DateModified: DateModified, + + CreatedBy: u.CreatedBy, + + ModifiedBy: u.ModifiedBy, + + Version: u.Version, + + ActivationStatusCode: u.ActivationStatusCode, + + ActivationErrorInfo: u.ActivationErrorInfo, + + CreateStatus: u.CreateStatus, + + CreateError: u.CreateError, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Whatsappintegration) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/whatsappintegrationentitylisting.go b/platformclientv2/whatsappintegrationentitylisting.go index cb1afd4fc..7659411aa 100644 --- a/platformclientv2/whatsappintegrationentitylisting.go +++ b/platformclientv2/whatsappintegrationentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Whatsappintegrationentitylisting struct { } +func (u *Whatsappintegrationentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Whatsappintegrationentitylisting + + + + return json.Marshal(&struct { + Entities *[]Whatsappintegration `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Whatsappintegrationentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/whatsappintegrationrequest.go b/platformclientv2/whatsappintegrationrequest.go index f57b3bb3b..ea449d9db 100644 --- a/platformclientv2/whatsappintegrationrequest.go +++ b/platformclientv2/whatsappintegrationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Whatsappintegrationrequest struct { } +func (u *Whatsappintegrationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Whatsappintegrationrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + PhoneNumber *string `json:"phoneNumber,omitempty"` + + WabaCertificate *string `json:"wabaCertificate,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + PhoneNumber: u.PhoneNumber, + + WabaCertificate: u.WabaCertificate, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Whatsappintegrationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/whatsappintegrationupdaterequest.go b/platformclientv2/whatsappintegrationupdaterequest.go index 97493b230..7075b77b6 100644 --- a/platformclientv2/whatsappintegrationupdaterequest.go +++ b/platformclientv2/whatsappintegrationupdaterequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -32,6 +33,42 @@ type Whatsappintegrationupdaterequest struct { } +func (u *Whatsappintegrationupdaterequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Whatsappintegrationupdaterequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Action *string `json:"action,omitempty"` + + AuthenticationMethod *string `json:"authenticationMethod,omitempty"` + + ConfirmationCode *string `json:"confirmationCode,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Action: u.Action, + + AuthenticationMethod: u.AuthenticationMethod, + + ConfirmationCode: u.ConfirmationCode, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Whatsappintegrationupdaterequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/widgetclientconfig.go b/platformclientv2/widgetclientconfig.go index 498f600c1..171f9a71f 100644 --- a/platformclientv2/widgetclientconfig.go +++ b/platformclientv2/widgetclientconfig.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Widgetclientconfig struct { } +func (u *Widgetclientconfig) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Widgetclientconfig + + + + return json.Marshal(&struct { + V1 *Widgetclientconfigv1 `json:"v1,omitempty"` + + V2 *Widgetclientconfigv2 `json:"v2,omitempty"` + + V1Http *Widgetclientconfigv1http `json:"v1-http,omitempty"` + + ThirdParty *Widgetclientconfigthirdparty `json:"third-party,omitempty"` + *Alias + }{ + V1: u.V1, + + V2: u.V2, + + V1Http: u.V1Http, + + ThirdParty: u.ThirdParty, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Widgetclientconfig) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/widgetclientconfigthirdparty.go b/platformclientv2/widgetclientconfigthirdparty.go index 9f3c47996..0dfdc3e57 100644 --- a/platformclientv2/widgetclientconfigthirdparty.go +++ b/platformclientv2/widgetclientconfigthirdparty.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Widgetclientconfigthirdparty type Widgetclientconfigthirdparty struct { } +func (u *Widgetclientconfigthirdparty) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Widgetclientconfigthirdparty + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Widgetclientconfigthirdparty) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/widgetclientconfigv1.go b/platformclientv2/widgetclientconfigv1.go index 44b2cb517..7a5730631 100644 --- a/platformclientv2/widgetclientconfigv1.go +++ b/platformclientv2/widgetclientconfigv1.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Widgetclientconfigv1 struct { } +func (u *Widgetclientconfigv1) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Widgetclientconfigv1 + + + + return json.Marshal(&struct { + WebChatSkin *string `json:"webChatSkin,omitempty"` + + AuthenticationUrl *string `json:"authenticationUrl,omitempty"` + *Alias + }{ + WebChatSkin: u.WebChatSkin, + + AuthenticationUrl: u.AuthenticationUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Widgetclientconfigv1) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/widgetclientconfigv1http.go b/platformclientv2/widgetclientconfigv1http.go index ce85acf89..4b026fa5b 100644 --- a/platformclientv2/widgetclientconfigv1http.go +++ b/platformclientv2/widgetclientconfigv1http.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Widgetclientconfigv1http struct { } +func (u *Widgetclientconfigv1http) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Widgetclientconfigv1http + + + + return json.Marshal(&struct { + WebChatSkin *string `json:"webChatSkin,omitempty"` + + AuthenticationUrl *string `json:"authenticationUrl,omitempty"` + *Alias + }{ + WebChatSkin: u.WebChatSkin, + + AuthenticationUrl: u.AuthenticationUrl, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Widgetclientconfigv1http) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/widgetclientconfigv2.go b/platformclientv2/widgetclientconfigv2.go index 1c7fa2428..1fecf14d4 100644 --- a/platformclientv2/widgetclientconfigv2.go +++ b/platformclientv2/widgetclientconfigv2.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -8,6 +9,18 @@ import ( // Widgetclientconfigv2 type Widgetclientconfigv2 struct { } +func (u *Widgetclientconfigv2) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Widgetclientconfigv2 + + + + return json.Marshal(&struct { *Alias + }{ Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Widgetclientconfigv2) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/widgetdeployment.go b/platformclientv2/widgetdeployment.go index 85ce41025..0ed43731c 100644 --- a/platformclientv2/widgetdeployment.go +++ b/platformclientv2/widgetdeployment.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Widgetdeployment struct { } +func (u *Widgetdeployment) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Widgetdeployment + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + + AuthenticationRequired *bool `json:"authenticationRequired,omitempty"` + + Disabled *bool `json:"disabled,omitempty"` + + Flow *Domainentityref `json:"flow,omitempty"` + + AllowedDomains *[]string `json:"allowedDomains,omitempty"` + + ClientType *string `json:"clientType,omitempty"` + + ClientConfig *Widgetclientconfig `json:"clientConfig,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Description: u.Description, + + AuthenticationRequired: u.AuthenticationRequired, + + Disabled: u.Disabled, + + Flow: u.Flow, + + AllowedDomains: u.AllowedDomains, + + ClientType: u.ClientType, + + ClientConfig: u.ClientConfig, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Widgetdeployment) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/widgetdeploymententitylisting.go b/platformclientv2/widgetdeploymententitylisting.go index 5ef504630..3546edb42 100644 --- a/platformclientv2/widgetdeploymententitylisting.go +++ b/platformclientv2/widgetdeploymententitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Widgetdeploymententitylisting struct { } +func (u *Widgetdeploymententitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Widgetdeploymententitylisting + + + + return json.Marshal(&struct { + Total *int `json:"total,omitempty"` + + Entities *[]Widgetdeployment `json:"entities,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Total: u.Total, + + Entities: u.Entities, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Widgetdeploymententitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workdaymetric.go b/platformclientv2/workdaymetric.go index 54904d3a3..7ce04c458 100644 --- a/platformclientv2/workdaymetric.go +++ b/platformclientv2/workdaymetric.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Workdaymetric struct { } +func (u *Workdaymetric) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workdaymetric + + + + return json.Marshal(&struct { + Metric *Metric `json:"metric,omitempty"` + + Objective *Objective `json:"objective,omitempty"` + + Points *int `json:"points,omitempty"` + + Value *float64 `json:"value,omitempty"` + + PunctualityEvents *[]Punctualityevent `json:"punctualityEvents,omitempty"` + *Alias + }{ + Metric: u.Metric, + + Objective: u.Objective, + + Points: u.Points, + + Value: u.Value, + + PunctualityEvents: u.PunctualityEvents, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workdaymetric) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workdaymetriclisting.go b/platformclientv2/workdaymetriclisting.go index fff27c25d..2d7c64d87 100644 --- a/platformclientv2/workdaymetriclisting.go +++ b/platformclientv2/workdaymetriclisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Workdaymetriclisting struct { } +func (u *Workdaymetriclisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workdaymetriclisting + + + + return json.Marshal(&struct { + Entities *[]Workdaymetric `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workdaymetriclisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workdaypointstrend.go b/platformclientv2/workdaypointstrend.go index cb7e3b048..f175f78e3 100644 --- a/platformclientv2/workdaypointstrend.go +++ b/platformclientv2/workdaypointstrend.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,56 @@ type Workdaypointstrend struct { } +func (u *Workdaypointstrend) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workdaypointstrend + + + DateStartWorkday := new(string) + if u.DateStartWorkday != nil { + *DateStartWorkday = timeutil.Strftime(u.DateStartWorkday, "%Y-%m-%d") + } else { + DateStartWorkday = nil + } + + DateEndWorkday := new(string) + if u.DateEndWorkday != nil { + *DateEndWorkday = timeutil.Strftime(u.DateEndWorkday, "%Y-%m-%d") + } else { + DateEndWorkday = nil + } + + + return json.Marshal(&struct { + DateStartWorkday *string `json:"dateStartWorkday,omitempty"` + + DateEndWorkday *string `json:"dateEndWorkday,omitempty"` + + User *Userreference `json:"user,omitempty"` + + DayOfWeek *string `json:"dayOfWeek,omitempty"` + + AveragePoints *float64 `json:"averagePoints,omitempty"` + + Trend *[]Workdaypointstrenditem `json:"trend,omitempty"` + *Alias + }{ + DateStartWorkday: DateStartWorkday, + + DateEndWorkday: DateEndWorkday, + + User: u.User, + + DayOfWeek: u.DayOfWeek, + + AveragePoints: u.AveragePoints, + + Trend: u.Trend, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workdaypointstrend) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workdaypointstrenditem.go b/platformclientv2/workdaypointstrenditem.go index ceaf200be..197856551 100644 --- a/platformclientv2/workdaypointstrenditem.go +++ b/platformclientv2/workdaypointstrenditem.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,33 @@ type Workdaypointstrenditem struct { } +func (u *Workdaypointstrenditem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workdaypointstrenditem + + + DateWorkday := new(string) + if u.DateWorkday != nil { + *DateWorkday = timeutil.Strftime(u.DateWorkday, "%Y-%m-%d") + } else { + DateWorkday = nil + } + + + return json.Marshal(&struct { + DateWorkday *string `json:"dateWorkday,omitempty"` + + Points *float64 `json:"points,omitempty"` + *Alias + }{ + DateWorkday: DateWorkday, + + Points: u.Points, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workdaypointstrenditem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workdayvaluesmetricitem.go b/platformclientv2/workdayvaluesmetricitem.go index 03b9a8096..6d638a1be 100644 --- a/platformclientv2/workdayvaluesmetricitem.go +++ b/platformclientv2/workdayvaluesmetricitem.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -24,6 +25,34 @@ type Workdayvaluesmetricitem struct { } +func (u *Workdayvaluesmetricitem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workdayvaluesmetricitem + + + + return json.Marshal(&struct { + MetricDefinition *Domainentityref `json:"metricDefinition,omitempty"` + + Average *float64 `json:"average,omitempty"` + + UnitType *string `json:"unitType,omitempty"` + + Trend *[]Workdayvaluestrenditem `json:"trend,omitempty"` + *Alias + }{ + MetricDefinition: u.MetricDefinition, + + Average: u.Average, + + UnitType: u.UnitType, + + Trend: u.Trend, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workdayvaluesmetricitem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workdayvaluestrend.go b/platformclientv2/workdayvaluestrend.go index a380f4e11..5dc2710a4 100644 --- a/platformclientv2/workdayvaluestrend.go +++ b/platformclientv2/workdayvaluestrend.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -33,6 +34,56 @@ type Workdayvaluestrend struct { } +func (u *Workdayvaluestrend) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workdayvaluestrend + + + DateStartWorkday := new(string) + if u.DateStartWorkday != nil { + *DateStartWorkday = timeutil.Strftime(u.DateStartWorkday, "%Y-%m-%d") + } else { + DateStartWorkday = nil + } + + DateEndWorkday := new(string) + if u.DateEndWorkday != nil { + *DateEndWorkday = timeutil.Strftime(u.DateEndWorkday, "%Y-%m-%d") + } else { + DateEndWorkday = nil + } + + + return json.Marshal(&struct { + DateStartWorkday *string `json:"dateStartWorkday,omitempty"` + + DateEndWorkday *string `json:"dateEndWorkday,omitempty"` + + Division *Division `json:"division,omitempty"` + + User *Userreference `json:"user,omitempty"` + + Timezone *string `json:"timezone,omitempty"` + + Results *[]Workdayvaluesmetricitem `json:"results,omitempty"` + *Alias + }{ + DateStartWorkday: DateStartWorkday, + + DateEndWorkday: DateEndWorkday, + + Division: u.Division, + + User: u.User, + + Timezone: u.Timezone, + + Results: u.Results, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workdayvaluestrend) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workdayvaluestrenditem.go b/platformclientv2/workdayvaluestrenditem.go index dde62100f..996980916 100644 --- a/platformclientv2/workdayvaluestrenditem.go +++ b/platformclientv2/workdayvaluestrenditem.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -17,6 +18,33 @@ type Workdayvaluestrenditem struct { } +func (u *Workdayvaluestrenditem) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workdayvaluestrenditem + + + DateWorkday := new(string) + if u.DateWorkday != nil { + *DateWorkday = timeutil.Strftime(u.DateWorkday, "%Y-%m-%d") + } else { + DateWorkday = nil + } + + + return json.Marshal(&struct { + DateWorkday *string `json:"dateWorkday,omitempty"` + + Value *float64 `json:"value,omitempty"` + *Alias + }{ + DateWorkday: DateWorkday, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workdayvaluestrenditem) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplan.go b/platformclientv2/workplan.go index a65045288..fa5dee725 100644 --- a/platformclientv2/workplan.go +++ b/platformclientv2/workplan.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -140,6 +141,150 @@ type Workplan struct { } +func (u *Workplan) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplan + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Valid *bool `json:"valid,omitempty"` + + ConstrainWeeklyPaidTime *bool `json:"constrainWeeklyPaidTime,omitempty"` + + FlexibleWeeklyPaidTime *bool `json:"flexibleWeeklyPaidTime,omitempty"` + + WeeklyExactPaidMinutes *int `json:"weeklyExactPaidMinutes,omitempty"` + + WeeklyMinimumPaidMinutes *int `json:"weeklyMinimumPaidMinutes,omitempty"` + + WeeklyMaximumPaidMinutes *int `json:"weeklyMaximumPaidMinutes,omitempty"` + + ConstrainPaidTimeGranularity *bool `json:"constrainPaidTimeGranularity,omitempty"` + + PaidTimeGranularityMinutes *int `json:"paidTimeGranularityMinutes,omitempty"` + + ConstrainMinimumTimeBetweenShifts *bool `json:"constrainMinimumTimeBetweenShifts,omitempty"` + + MinimumTimeBetweenShiftsMinutes *int `json:"minimumTimeBetweenShiftsMinutes,omitempty"` + + MaximumDays *int `json:"maximumDays,omitempty"` + + MinimumConsecutiveNonWorkingMinutesPerWeek *int `json:"minimumConsecutiveNonWorkingMinutesPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingWeekends *bool `json:"constrainMaximumConsecutiveWorkingWeekends,omitempty"` + + MaximumConsecutiveWorkingWeekends *int `json:"maximumConsecutiveWorkingWeekends,omitempty"` + + MinimumWorkingDaysPerWeek *int `json:"minimumWorkingDaysPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingDays *bool `json:"constrainMaximumConsecutiveWorkingDays,omitempty"` + + MaximumConsecutiveWorkingDays *int `json:"maximumConsecutiveWorkingDays,omitempty"` + + MinimumShiftStartDistanceMinutes *int `json:"minimumShiftStartDistanceMinutes,omitempty"` + + MinimumDaysOffPerPlanningPeriod *int `json:"minimumDaysOffPerPlanningPeriod,omitempty"` + + MaximumDaysOffPerPlanningPeriod *int `json:"maximumDaysOffPerPlanningPeriod,omitempty"` + + MinimumPaidMinutesPerPlanningPeriod *int `json:"minimumPaidMinutesPerPlanningPeriod,omitempty"` + + MaximumPaidMinutesPerPlanningPeriod *int `json:"maximumPaidMinutesPerPlanningPeriod,omitempty"` + + OptionalDays *Setwrapperdayofweek `json:"optionalDays,omitempty"` + + ShiftStartVarianceType *string `json:"shiftStartVarianceType,omitempty"` + + ShiftStartVariances *Listwrappershiftstartvariance `json:"shiftStartVariances,omitempty"` + + Shifts *[]Workplanshift `json:"shifts,omitempty"` + + Agents *[]Deletableuserreference `json:"agents,omitempty"` + + AgentCount *int `json:"agentCount,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Enabled: u.Enabled, + + Valid: u.Valid, + + ConstrainWeeklyPaidTime: u.ConstrainWeeklyPaidTime, + + FlexibleWeeklyPaidTime: u.FlexibleWeeklyPaidTime, + + WeeklyExactPaidMinutes: u.WeeklyExactPaidMinutes, + + WeeklyMinimumPaidMinutes: u.WeeklyMinimumPaidMinutes, + + WeeklyMaximumPaidMinutes: u.WeeklyMaximumPaidMinutes, + + ConstrainPaidTimeGranularity: u.ConstrainPaidTimeGranularity, + + PaidTimeGranularityMinutes: u.PaidTimeGranularityMinutes, + + ConstrainMinimumTimeBetweenShifts: u.ConstrainMinimumTimeBetweenShifts, + + MinimumTimeBetweenShiftsMinutes: u.MinimumTimeBetweenShiftsMinutes, + + MaximumDays: u.MaximumDays, + + MinimumConsecutiveNonWorkingMinutesPerWeek: u.MinimumConsecutiveNonWorkingMinutesPerWeek, + + ConstrainMaximumConsecutiveWorkingWeekends: u.ConstrainMaximumConsecutiveWorkingWeekends, + + MaximumConsecutiveWorkingWeekends: u.MaximumConsecutiveWorkingWeekends, + + MinimumWorkingDaysPerWeek: u.MinimumWorkingDaysPerWeek, + + ConstrainMaximumConsecutiveWorkingDays: u.ConstrainMaximumConsecutiveWorkingDays, + + MaximumConsecutiveWorkingDays: u.MaximumConsecutiveWorkingDays, + + MinimumShiftStartDistanceMinutes: u.MinimumShiftStartDistanceMinutes, + + MinimumDaysOffPerPlanningPeriod: u.MinimumDaysOffPerPlanningPeriod, + + MaximumDaysOffPerPlanningPeriod: u.MaximumDaysOffPerPlanningPeriod, + + MinimumPaidMinutesPerPlanningPeriod: u.MinimumPaidMinutesPerPlanningPeriod, + + MaximumPaidMinutesPerPlanningPeriod: u.MaximumPaidMinutesPerPlanningPeriod, + + OptionalDays: u.OptionalDays, + + ShiftStartVarianceType: u.ShiftStartVarianceType, + + ShiftStartVariances: u.ShiftStartVariances, + + Shifts: u.Shifts, + + Agents: u.Agents, + + AgentCount: u.AgentCount, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplan) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanactivity.go b/platformclientv2/workplanactivity.go index 600a4a00f..1ef7541bb 100644 --- a/platformclientv2/workplanactivity.go +++ b/platformclientv2/workplanactivity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -72,6 +73,82 @@ type Workplanactivity struct { } +func (u *Workplanactivity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanactivity + + + + return json.Marshal(&struct { + ActivityCodeId *string `json:"activityCodeId,omitempty"` + + Description *string `json:"description,omitempty"` + + LengthMinutes *int `json:"lengthMinutes,omitempty"` + + StartTimeIsRelativeToShiftStart *bool `json:"startTimeIsRelativeToShiftStart,omitempty"` + + FlexibleStartTime *bool `json:"flexibleStartTime,omitempty"` + + EarliestStartTimeMinutes *int `json:"earliestStartTimeMinutes,omitempty"` + + LatestStartTimeMinutes *int `json:"latestStartTimeMinutes,omitempty"` + + ExactStartTimeMinutes *int `json:"exactStartTimeMinutes,omitempty"` + + StartTimeIncrementMinutes *int `json:"startTimeIncrementMinutes,omitempty"` + + CountsAsPaidTime *bool `json:"countsAsPaidTime,omitempty"` + + CountsAsContiguousWorkTime *bool `json:"countsAsContiguousWorkTime,omitempty"` + + MinimumLengthFromShiftStartMinutes *int `json:"minimumLengthFromShiftStartMinutes,omitempty"` + + MinimumLengthFromShiftEndMinutes *int `json:"minimumLengthFromShiftEndMinutes,omitempty"` + + Id *string `json:"id,omitempty"` + + Delete *bool `json:"delete,omitempty"` + + ValidationId *string `json:"validationId,omitempty"` + *Alias + }{ + ActivityCodeId: u.ActivityCodeId, + + Description: u.Description, + + LengthMinutes: u.LengthMinutes, + + StartTimeIsRelativeToShiftStart: u.StartTimeIsRelativeToShiftStart, + + FlexibleStartTime: u.FlexibleStartTime, + + EarliestStartTimeMinutes: u.EarliestStartTimeMinutes, + + LatestStartTimeMinutes: u.LatestStartTimeMinutes, + + ExactStartTimeMinutes: u.ExactStartTimeMinutes, + + StartTimeIncrementMinutes: u.StartTimeIncrementMinutes, + + CountsAsPaidTime: u.CountsAsPaidTime, + + CountsAsContiguousWorkTime: u.CountsAsContiguousWorkTime, + + MinimumLengthFromShiftStartMinutes: u.MinimumLengthFromShiftStartMinutes, + + MinimumLengthFromShiftEndMinutes: u.MinimumLengthFromShiftEndMinutes, + + Id: u.Id, + + Delete: u.Delete, + + ValidationId: u.ValidationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanactivity) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanconfigurationviolationmessage.go b/platformclientv2/workplanconfigurationviolationmessage.go index 5a4963bf9..33eac9f8e 100644 --- a/platformclientv2/workplanconfigurationviolationmessage.go +++ b/platformclientv2/workplanconfigurationviolationmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Workplanconfigurationviolationmessage struct { } +func (u *Workplanconfigurationviolationmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanconfigurationviolationmessage + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Arguments *[]Workplanvalidationmessageargument `json:"arguments,omitempty"` + + Severity *string `json:"severity,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Arguments: u.Arguments, + + Severity: u.Severity, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanconfigurationviolationmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanconstraintconflictmessage.go b/platformclientv2/workplanconstraintconflictmessage.go index c0d88a8ba..7dd981b6f 100644 --- a/platformclientv2/workplanconstraintconflictmessage.go +++ b/platformclientv2/workplanconstraintconflictmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Workplanconstraintconflictmessage struct { } +func (u *Workplanconstraintconflictmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanconstraintconflictmessage + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Arguments *[]Workplanvalidationmessageargument `json:"arguments,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Arguments: u.Arguments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanconstraintconflictmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanconstraintmessage.go b/platformclientv2/workplanconstraintmessage.go index aa111b763..3b7357405 100644 --- a/platformclientv2/workplanconstraintmessage.go +++ b/platformclientv2/workplanconstraintmessage.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Workplanconstraintmessage struct { } +func (u *Workplanconstraintmessage) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanconstraintmessage + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Arguments *[]Workplanvalidationmessageargument `json:"arguments,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Arguments: u.Arguments, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanconstraintmessage) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanlistitemresponse.go b/platformclientv2/workplanlistitemresponse.go index 85fdbf951..be597aa77 100644 --- a/platformclientv2/workplanlistitemresponse.go +++ b/platformclientv2/workplanlistitemresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -140,6 +141,150 @@ type Workplanlistitemresponse struct { } +func (u *Workplanlistitemresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanlistitemresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Valid *bool `json:"valid,omitempty"` + + ConstrainWeeklyPaidTime *bool `json:"constrainWeeklyPaidTime,omitempty"` + + FlexibleWeeklyPaidTime *bool `json:"flexibleWeeklyPaidTime,omitempty"` + + WeeklyExactPaidMinutes *int `json:"weeklyExactPaidMinutes,omitempty"` + + WeeklyMinimumPaidMinutes *int `json:"weeklyMinimumPaidMinutes,omitempty"` + + WeeklyMaximumPaidMinutes *int `json:"weeklyMaximumPaidMinutes,omitempty"` + + ConstrainPaidTimeGranularity *bool `json:"constrainPaidTimeGranularity,omitempty"` + + PaidTimeGranularityMinutes *int `json:"paidTimeGranularityMinutes,omitempty"` + + ConstrainMinimumTimeBetweenShifts *bool `json:"constrainMinimumTimeBetweenShifts,omitempty"` + + MinimumTimeBetweenShiftsMinutes *int `json:"minimumTimeBetweenShiftsMinutes,omitempty"` + + MaximumDays *int `json:"maximumDays,omitempty"` + + MinimumConsecutiveNonWorkingMinutesPerWeek *int `json:"minimumConsecutiveNonWorkingMinutesPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingWeekends *bool `json:"constrainMaximumConsecutiveWorkingWeekends,omitempty"` + + MaximumConsecutiveWorkingWeekends *int `json:"maximumConsecutiveWorkingWeekends,omitempty"` + + MinimumWorkingDaysPerWeek *int `json:"minimumWorkingDaysPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingDays *bool `json:"constrainMaximumConsecutiveWorkingDays,omitempty"` + + MaximumConsecutiveWorkingDays *int `json:"maximumConsecutiveWorkingDays,omitempty"` + + MinimumShiftStartDistanceMinutes *int `json:"minimumShiftStartDistanceMinutes,omitempty"` + + MinimumDaysOffPerPlanningPeriod *int `json:"minimumDaysOffPerPlanningPeriod,omitempty"` + + MaximumDaysOffPerPlanningPeriod *int `json:"maximumDaysOffPerPlanningPeriod,omitempty"` + + MinimumPaidMinutesPerPlanningPeriod *int `json:"minimumPaidMinutesPerPlanningPeriod,omitempty"` + + MaximumPaidMinutesPerPlanningPeriod *int `json:"maximumPaidMinutesPerPlanningPeriod,omitempty"` + + OptionalDays *Setwrapperdayofweek `json:"optionalDays,omitempty"` + + ShiftStartVarianceType *string `json:"shiftStartVarianceType,omitempty"` + + ShiftStartVariances *Listwrappershiftstartvariance `json:"shiftStartVariances,omitempty"` + + Shifts *[]Workplanshift `json:"shifts,omitempty"` + + Agents *[]Deletableuserreference `json:"agents,omitempty"` + + AgentCount *int `json:"agentCount,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Enabled: u.Enabled, + + Valid: u.Valid, + + ConstrainWeeklyPaidTime: u.ConstrainWeeklyPaidTime, + + FlexibleWeeklyPaidTime: u.FlexibleWeeklyPaidTime, + + WeeklyExactPaidMinutes: u.WeeklyExactPaidMinutes, + + WeeklyMinimumPaidMinutes: u.WeeklyMinimumPaidMinutes, + + WeeklyMaximumPaidMinutes: u.WeeklyMaximumPaidMinutes, + + ConstrainPaidTimeGranularity: u.ConstrainPaidTimeGranularity, + + PaidTimeGranularityMinutes: u.PaidTimeGranularityMinutes, + + ConstrainMinimumTimeBetweenShifts: u.ConstrainMinimumTimeBetweenShifts, + + MinimumTimeBetweenShiftsMinutes: u.MinimumTimeBetweenShiftsMinutes, + + MaximumDays: u.MaximumDays, + + MinimumConsecutiveNonWorkingMinutesPerWeek: u.MinimumConsecutiveNonWorkingMinutesPerWeek, + + ConstrainMaximumConsecutiveWorkingWeekends: u.ConstrainMaximumConsecutiveWorkingWeekends, + + MaximumConsecutiveWorkingWeekends: u.MaximumConsecutiveWorkingWeekends, + + MinimumWorkingDaysPerWeek: u.MinimumWorkingDaysPerWeek, + + ConstrainMaximumConsecutiveWorkingDays: u.ConstrainMaximumConsecutiveWorkingDays, + + MaximumConsecutiveWorkingDays: u.MaximumConsecutiveWorkingDays, + + MinimumShiftStartDistanceMinutes: u.MinimumShiftStartDistanceMinutes, + + MinimumDaysOffPerPlanningPeriod: u.MinimumDaysOffPerPlanningPeriod, + + MaximumDaysOffPerPlanningPeriod: u.MaximumDaysOffPerPlanningPeriod, + + MinimumPaidMinutesPerPlanningPeriod: u.MinimumPaidMinutesPerPlanningPeriod, + + MaximumPaidMinutesPerPlanningPeriod: u.MaximumPaidMinutesPerPlanningPeriod, + + OptionalDays: u.OptionalDays, + + ShiftStartVarianceType: u.ShiftStartVarianceType, + + ShiftStartVariances: u.ShiftStartVariances, + + Shifts: u.Shifts, + + Agents: u.Agents, + + AgentCount: u.AgentCount, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanlistitemresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanlistresponse.go b/platformclientv2/workplanlistresponse.go index cf7b132fd..4dc1fc87b 100644 --- a/platformclientv2/workplanlistresponse.go +++ b/platformclientv2/workplanlistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Workplanlistresponse struct { } +func (u *Workplanlistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanlistresponse + + + + return json.Marshal(&struct { + Entities *[]Workplanlistitemresponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanlistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanpatternrequest.go b/platformclientv2/workplanpatternrequest.go index 7ca283051..85cd8d98b 100644 --- a/platformclientv2/workplanpatternrequest.go +++ b/platformclientv2/workplanpatternrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Workplanpatternrequest struct { } +func (u *Workplanpatternrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanpatternrequest + + + + return json.Marshal(&struct { + WorkPlanIds *[]string `json:"workPlanIds,omitempty"` + *Alias + }{ + WorkPlanIds: u.WorkPlanIds, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanpatternrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanpatternresponse.go b/platformclientv2/workplanpatternresponse.go index df451e75f..cf46dadb1 100644 --- a/platformclientv2/workplanpatternresponse.go +++ b/platformclientv2/workplanpatternresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Workplanpatternresponse struct { } +func (u *Workplanpatternresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanpatternresponse + + + + return json.Marshal(&struct { + WorkPlans *[]Workplanreference `json:"workPlans,omitempty"` + *Alias + }{ + WorkPlans: u.WorkPlans, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanpatternresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanreference.go b/platformclientv2/workplanreference.go index 03107b179..e829627d4 100644 --- a/platformclientv2/workplanreference.go +++ b/platformclientv2/workplanreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Workplanreference struct { } +func (u *Workplanreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ManagementUnit *Managementunitreference `json:"managementUnit,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + ManagementUnit: u.ManagementUnit, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanrotationagentresponse.go b/platformclientv2/workplanrotationagentresponse.go index fd102efb2..530985a41 100644 --- a/platformclientv2/workplanrotationagentresponse.go +++ b/platformclientv2/workplanrotationagentresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Workplanrotationagentresponse struct { } +func (u *Workplanrotationagentresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanrotationagentresponse + + + + return json.Marshal(&struct { + User *Userreference `json:"user,omitempty"` + + DateRange *Daterangewithoptionalend `json:"dateRange,omitempty"` + + Position *int `json:"position,omitempty"` + *Alias + }{ + User: u.User, + + DateRange: u.DateRange, + + Position: u.Position, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanrotationagentresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanrotationlistresponse.go b/platformclientv2/workplanrotationlistresponse.go index a8fa785d0..31881b038 100644 --- a/platformclientv2/workplanrotationlistresponse.go +++ b/platformclientv2/workplanrotationlistresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Workplanrotationlistresponse struct { } +func (u *Workplanrotationlistresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanrotationlistresponse + + + + return json.Marshal(&struct { + Entities *[]Workplanrotationresponse `json:"entities,omitempty"` + *Alias + }{ + Entities: u.Entities, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanrotationlistresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanrotationreference.go b/platformclientv2/workplanrotationreference.go index 86cb319c8..bf35feba4 100644 --- a/platformclientv2/workplanrotationreference.go +++ b/platformclientv2/workplanrotationreference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Workplanrotationreference struct { } +func (u *Workplanrotationreference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanrotationreference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanrotationreference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanrotationresponse.go b/platformclientv2/workplanrotationresponse.go index 8d0b5c027..2c51b2a87 100644 --- a/platformclientv2/workplanrotationresponse.go +++ b/platformclientv2/workplanrotationresponse.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Workplanrotationresponse struct { } +func (u *Workplanrotationresponse) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanrotationresponse + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + DateRange *Daterangewithoptionalend `json:"dateRange,omitempty"` + + Pattern *Workplanpatternresponse `json:"pattern,omitempty"` + + AgentCount *int `json:"agentCount,omitempty"` + + Agents *[]Workplanrotationagentresponse `json:"agents,omitempty"` + + Metadata *Wfmversionedentitymetadata `json:"metadata,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Enabled: u.Enabled, + + DateRange: u.DateRange, + + Pattern: u.Pattern, + + AgentCount: u.AgentCount, + + Agents: u.Agents, + + Metadata: u.Metadata, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanrotationresponse) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanshift.go b/platformclientv2/workplanshift.go index 7fea795b2..8243df50e 100644 --- a/platformclientv2/workplanshift.go +++ b/platformclientv2/workplanshift.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -100,6 +101,110 @@ type Workplanshift struct { } +func (u *Workplanshift) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanshift + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Days *Setwrapperdayofweek `json:"days,omitempty"` + + FlexibleStartTime *bool `json:"flexibleStartTime,omitempty"` + + ExactStartTimeMinutesFromMidnight *int `json:"exactStartTimeMinutesFromMidnight,omitempty"` + + EarliestStartTimeMinutesFromMidnight *int `json:"earliestStartTimeMinutesFromMidnight,omitempty"` + + LatestStartTimeMinutesFromMidnight *int `json:"latestStartTimeMinutesFromMidnight,omitempty"` + + ConstrainStopTime *bool `json:"constrainStopTime,omitempty"` + + ConstrainLatestStopTime *bool `json:"constrainLatestStopTime,omitempty"` + + LatestStopTimeMinutesFromMidnight *int `json:"latestStopTimeMinutesFromMidnight,omitempty"` + + ConstrainEarliestStopTime *bool `json:"constrainEarliestStopTime,omitempty"` + + EarliestStopTimeMinutesFromMidnight *int `json:"earliestStopTimeMinutesFromMidnight,omitempty"` + + StartIncrementMinutes *int `json:"startIncrementMinutes,omitempty"` + + FlexiblePaidTime *bool `json:"flexiblePaidTime,omitempty"` + + ExactPaidTimeMinutes *int `json:"exactPaidTimeMinutes,omitempty"` + + MinimumPaidTimeMinutes *int `json:"minimumPaidTimeMinutes,omitempty"` + + MaximumPaidTimeMinutes *int `json:"maximumPaidTimeMinutes,omitempty"` + + ConstrainContiguousWorkTime *bool `json:"constrainContiguousWorkTime,omitempty"` + + MinimumContiguousWorkTimeMinutes *int `json:"minimumContiguousWorkTimeMinutes,omitempty"` + + MaximumContiguousWorkTimeMinutes *int `json:"maximumContiguousWorkTimeMinutes,omitempty"` + + Activities *[]Workplanactivity `json:"activities,omitempty"` + + Id *string `json:"id,omitempty"` + + Delete *bool `json:"delete,omitempty"` + + ValidationId *string `json:"validationId,omitempty"` + *Alias + }{ + Name: u.Name, + + Days: u.Days, + + FlexibleStartTime: u.FlexibleStartTime, + + ExactStartTimeMinutesFromMidnight: u.ExactStartTimeMinutesFromMidnight, + + EarliestStartTimeMinutesFromMidnight: u.EarliestStartTimeMinutesFromMidnight, + + LatestStartTimeMinutesFromMidnight: u.LatestStartTimeMinutesFromMidnight, + + ConstrainStopTime: u.ConstrainStopTime, + + ConstrainLatestStopTime: u.ConstrainLatestStopTime, + + LatestStopTimeMinutesFromMidnight: u.LatestStopTimeMinutesFromMidnight, + + ConstrainEarliestStopTime: u.ConstrainEarliestStopTime, + + EarliestStopTimeMinutesFromMidnight: u.EarliestStopTimeMinutesFromMidnight, + + StartIncrementMinutes: u.StartIncrementMinutes, + + FlexiblePaidTime: u.FlexiblePaidTime, + + ExactPaidTimeMinutes: u.ExactPaidTimeMinutes, + + MinimumPaidTimeMinutes: u.MinimumPaidTimeMinutes, + + MaximumPaidTimeMinutes: u.MaximumPaidTimeMinutes, + + ConstrainContiguousWorkTime: u.ConstrainContiguousWorkTime, + + MinimumContiguousWorkTimeMinutes: u.MinimumContiguousWorkTimeMinutes, + + MaximumContiguousWorkTimeMinutes: u.MaximumContiguousWorkTimeMinutes, + + Activities: u.Activities, + + Id: u.Id, + + Delete: u.Delete, + + ValidationId: u.ValidationId, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanshift) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanvalidationmessageargument.go b/platformclientv2/workplanvalidationmessageargument.go index c8a39c018..82d6ddd3a 100644 --- a/platformclientv2/workplanvalidationmessageargument.go +++ b/platformclientv2/workplanvalidationmessageargument.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Workplanvalidationmessageargument struct { } +func (u *Workplanvalidationmessageargument) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanvalidationmessageargument + + + + return json.Marshal(&struct { + VarType *string `json:"type,omitempty"` + + Value *string `json:"value,omitempty"` + *Alias + }{ + VarType: u.VarType, + + Value: u.Value, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanvalidationmessageargument) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workplanvalidationrequest.go b/platformclientv2/workplanvalidationrequest.go index cb5e4863f..eb4fe8cdf 100644 --- a/platformclientv2/workplanvalidationrequest.go +++ b/platformclientv2/workplanvalidationrequest.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -136,6 +137,146 @@ type Workplanvalidationrequest struct { } +func (u *Workplanvalidationrequest) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workplanvalidationrequest + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Enabled *bool `json:"enabled,omitempty"` + + Valid *bool `json:"valid,omitempty"` + + ConstrainWeeklyPaidTime *bool `json:"constrainWeeklyPaidTime,omitempty"` + + FlexibleWeeklyPaidTime *bool `json:"flexibleWeeklyPaidTime,omitempty"` + + WeeklyExactPaidMinutes *int `json:"weeklyExactPaidMinutes,omitempty"` + + WeeklyMinimumPaidMinutes *int `json:"weeklyMinimumPaidMinutes,omitempty"` + + WeeklyMaximumPaidMinutes *int `json:"weeklyMaximumPaidMinutes,omitempty"` + + ConstrainPaidTimeGranularity *bool `json:"constrainPaidTimeGranularity,omitempty"` + + PaidTimeGranularityMinutes *int `json:"paidTimeGranularityMinutes,omitempty"` + + ConstrainMinimumTimeBetweenShifts *bool `json:"constrainMinimumTimeBetweenShifts,omitempty"` + + MinimumTimeBetweenShiftsMinutes *int `json:"minimumTimeBetweenShiftsMinutes,omitempty"` + + MaximumDays *int `json:"maximumDays,omitempty"` + + MinimumConsecutiveNonWorkingMinutesPerWeek *int `json:"minimumConsecutiveNonWorkingMinutesPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingWeekends *bool `json:"constrainMaximumConsecutiveWorkingWeekends,omitempty"` + + MaximumConsecutiveWorkingWeekends *int `json:"maximumConsecutiveWorkingWeekends,omitempty"` + + MinimumWorkingDaysPerWeek *int `json:"minimumWorkingDaysPerWeek,omitempty"` + + ConstrainMaximumConsecutiveWorkingDays *bool `json:"constrainMaximumConsecutiveWorkingDays,omitempty"` + + MaximumConsecutiveWorkingDays *int `json:"maximumConsecutiveWorkingDays,omitempty"` + + MinimumShiftStartDistanceMinutes *int `json:"minimumShiftStartDistanceMinutes,omitempty"` + + MinimumDaysOffPerPlanningPeriod *int `json:"minimumDaysOffPerPlanningPeriod,omitempty"` + + MaximumDaysOffPerPlanningPeriod *int `json:"maximumDaysOffPerPlanningPeriod,omitempty"` + + MinimumPaidMinutesPerPlanningPeriod *int `json:"minimumPaidMinutesPerPlanningPeriod,omitempty"` + + MaximumPaidMinutesPerPlanningPeriod *int `json:"maximumPaidMinutesPerPlanningPeriod,omitempty"` + + OptionalDays *Setwrapperdayofweek `json:"optionalDays,omitempty"` + + ShiftStartVarianceType *string `json:"shiftStartVarianceType,omitempty"` + + ShiftStartVariances *Listwrappershiftstartvariance `json:"shiftStartVariances,omitempty"` + + Shifts *[]Workplanshift `json:"shifts,omitempty"` + + Agents *[]Deletableuserreference `json:"agents,omitempty"` + + AgentCount *int `json:"agentCount,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Enabled: u.Enabled, + + Valid: u.Valid, + + ConstrainWeeklyPaidTime: u.ConstrainWeeklyPaidTime, + + FlexibleWeeklyPaidTime: u.FlexibleWeeklyPaidTime, + + WeeklyExactPaidMinutes: u.WeeklyExactPaidMinutes, + + WeeklyMinimumPaidMinutes: u.WeeklyMinimumPaidMinutes, + + WeeklyMaximumPaidMinutes: u.WeeklyMaximumPaidMinutes, + + ConstrainPaidTimeGranularity: u.ConstrainPaidTimeGranularity, + + PaidTimeGranularityMinutes: u.PaidTimeGranularityMinutes, + + ConstrainMinimumTimeBetweenShifts: u.ConstrainMinimumTimeBetweenShifts, + + MinimumTimeBetweenShiftsMinutes: u.MinimumTimeBetweenShiftsMinutes, + + MaximumDays: u.MaximumDays, + + MinimumConsecutiveNonWorkingMinutesPerWeek: u.MinimumConsecutiveNonWorkingMinutesPerWeek, + + ConstrainMaximumConsecutiveWorkingWeekends: u.ConstrainMaximumConsecutiveWorkingWeekends, + + MaximumConsecutiveWorkingWeekends: u.MaximumConsecutiveWorkingWeekends, + + MinimumWorkingDaysPerWeek: u.MinimumWorkingDaysPerWeek, + + ConstrainMaximumConsecutiveWorkingDays: u.ConstrainMaximumConsecutiveWorkingDays, + + MaximumConsecutiveWorkingDays: u.MaximumConsecutiveWorkingDays, + + MinimumShiftStartDistanceMinutes: u.MinimumShiftStartDistanceMinutes, + + MinimumDaysOffPerPlanningPeriod: u.MinimumDaysOffPerPlanningPeriod, + + MaximumDaysOffPerPlanningPeriod: u.MaximumDaysOffPerPlanningPeriod, + + MinimumPaidMinutesPerPlanningPeriod: u.MinimumPaidMinutesPerPlanningPeriod, + + MaximumPaidMinutesPerPlanningPeriod: u.MaximumPaidMinutesPerPlanningPeriod, + + OptionalDays: u.OptionalDays, + + ShiftStartVarianceType: u.ShiftStartVarianceType, + + ShiftStartVariances: u.ShiftStartVariances, + + Shifts: u.Shifts, + + Agents: u.Agents, + + AgentCount: u.AgentCount, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workplanvalidationrequest) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workspace.go b/platformclientv2/workspace.go index 8598e8eec..c09109855 100644 --- a/platformclientv2/workspace.go +++ b/platformclientv2/workspace.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -57,6 +58,82 @@ type Workspace struct { } +func (u *Workspace) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workspace + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + VarType *string `json:"type,omitempty"` + + IsCurrentUserWorkspace *bool `json:"isCurrentUserWorkspace,omitempty"` + + User *Domainentityref `json:"user,omitempty"` + + Bucket *string `json:"bucket,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Summary *Workspacesummary `json:"summary,omitempty"` + + Acl *[]string `json:"acl,omitempty"` + + Description *string `json:"description,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + VarType: u.VarType, + + IsCurrentUserWorkspace: u.IsCurrentUserWorkspace, + + User: u.User, + + Bucket: u.Bucket, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Summary: u.Summary, + + Acl: u.Acl, + + Description: u.Description, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workspace) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workspacecreate.go b/platformclientv2/workspacecreate.go index e5727fa5b..54e906389 100644 --- a/platformclientv2/workspacecreate.go +++ b/platformclientv2/workspacecreate.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Workspacecreate struct { } +func (u *Workspacecreate) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workspacecreate + + + + return json.Marshal(&struct { + Name *string `json:"name,omitempty"` + + Bucket *string `json:"bucket,omitempty"` + + Description *string `json:"description,omitempty"` + *Alias + }{ + Name: u.Name, + + Bucket: u.Bucket, + + Description: u.Description, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workspacecreate) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workspaceentitylisting.go b/platformclientv2/workspaceentitylisting.go index e94cd85cd..3e97bc790 100644 --- a/platformclientv2/workspaceentitylisting.go +++ b/platformclientv2/workspaceentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Workspaceentitylisting struct { } +func (u *Workspaceentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workspaceentitylisting + + + + return json.Marshal(&struct { + Entities *[]Workspace `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workspaceentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workspacemember.go b/platformclientv2/workspacemember.go index 6b5254528..884226f32 100644 --- a/platformclientv2/workspacemember.go +++ b/platformclientv2/workspacemember.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -44,6 +45,54 @@ type Workspacemember struct { } +func (u *Workspacemember) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workspacemember + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Workspace *Domainentityref `json:"workspace,omitempty"` + + MemberType *string `json:"memberType,omitempty"` + + Member *Domainentityref `json:"member,omitempty"` + + User *User `json:"user,omitempty"` + + Group *Group `json:"group,omitempty"` + + SecurityProfile *Securityprofile `json:"securityProfile,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + Workspace: u.Workspace, + + MemberType: u.MemberType, + + Member: u.Member, + + User: u.User, + + Group: u.Group, + + SecurityProfile: u.SecurityProfile, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workspacemember) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workspacememberentitylisting.go b/platformclientv2/workspacememberentitylisting.go index 1614a7ece..fce4c8ad7 100644 --- a/platformclientv2/workspacememberentitylisting.go +++ b/platformclientv2/workspacememberentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Workspacememberentitylisting struct { } +func (u *Workspacememberentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workspacememberentitylisting + + + + return json.Marshal(&struct { + Entities *[]Workspacemember `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workspacememberentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/workspacesummary.go b/platformclientv2/workspacesummary.go index def7357f6..45b6e27bb 100644 --- a/platformclientv2/workspacesummary.go +++ b/platformclientv2/workspacesummary.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -16,6 +17,26 @@ type Workspacesummary struct { } +func (u *Workspacesummary) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Workspacesummary + + + + return json.Marshal(&struct { + TotalDocumentCount *int `json:"totalDocumentCount,omitempty"` + + TotalDocumentByteCount *int `json:"totalDocumentByteCount,omitempty"` + *Alias + }{ + TotalDocumentCount: u.TotalDocumentCount, + + TotalDocumentByteCount: u.TotalDocumentByteCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Workspacesummary) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wrapup.go b/platformclientv2/wrapup.go index f3007b796..3d7c286b7 100644 --- a/platformclientv2/wrapup.go +++ b/platformclientv2/wrapup.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,54 @@ type Wrapup struct { } +func (u *Wrapup) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wrapup + + + EndTime := new(string) + if u.EndTime != nil { + + *EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + EndTime = nil + } + + + return json.Marshal(&struct { + Code *string `json:"code,omitempty"` + + Name *string `json:"name,omitempty"` + + Notes *string `json:"notes,omitempty"` + + Tags *[]string `json:"tags,omitempty"` + + DurationSeconds *int `json:"durationSeconds,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + + Provisional *bool `json:"provisional,omitempty"` + *Alias + }{ + Code: u.Code, + + Name: u.Name, + + Notes: u.Notes, + + Tags: u.Tags, + + DurationSeconds: u.DurationSeconds, + + EndTime: EndTime, + + Provisional: u.Provisional, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wrapup) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wrapupcode.go b/platformclientv2/wrapupcode.go index 79bae8cf1..020b60493 100644 --- a/platformclientv2/wrapupcode.go +++ b/platformclientv2/wrapupcode.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -37,6 +38,62 @@ type Wrapupcode struct { } +func (u *Wrapupcode) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wrapupcode + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + ModifiedBy *string `json:"modifiedBy,omitempty"` + + CreatedBy *string `json:"createdBy,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + ModifiedBy: u.ModifiedBy, + + CreatedBy: u.CreatedBy, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wrapupcode) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wrapupcodeentitylisting.go b/platformclientv2/wrapupcodeentitylisting.go index bdeeb0ee4..03ee6b7dc 100644 --- a/platformclientv2/wrapupcodeentitylisting.go +++ b/platformclientv2/wrapupcodeentitylisting.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -48,6 +49,58 @@ type Wrapupcodeentitylisting struct { } +func (u *Wrapupcodeentitylisting) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wrapupcodeentitylisting + + + + return json.Marshal(&struct { + Entities *[]Wrapupcode `json:"entities,omitempty"` + + PageSize *int `json:"pageSize,omitempty"` + + PageNumber *int `json:"pageNumber,omitempty"` + + Total *int `json:"total,omitempty"` + + FirstUri *string `json:"firstUri,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + + NextUri *string `json:"nextUri,omitempty"` + + PreviousUri *string `json:"previousUri,omitempty"` + + LastUri *string `json:"lastUri,omitempty"` + + PageCount *int `json:"pageCount,omitempty"` + *Alias + }{ + Entities: u.Entities, + + PageSize: u.PageSize, + + PageNumber: u.PageNumber, + + Total: u.Total, + + FirstUri: u.FirstUri, + + SelfUri: u.SelfUri, + + NextUri: u.NextUri, + + PreviousUri: u.PreviousUri, + + LastUri: u.LastUri, + + PageCount: u.PageCount, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wrapupcodeentitylisting) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wrapupcodemapping.go b/platformclientv2/wrapupcodemapping.go index adb090b55..49bea7b4e 100644 --- a/platformclientv2/wrapupcodemapping.go +++ b/platformclientv2/wrapupcodemapping.go @@ -1,6 +1,7 @@ package platformclientv2 import ( "time" + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -41,6 +42,66 @@ type Wrapupcodemapping struct { } +func (u *Wrapupcodemapping) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wrapupcodemapping + + + DateCreated := new(string) + if u.DateCreated != nil { + + *DateCreated = timeutil.Strftime(u.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateCreated = nil + } + + DateModified := new(string) + if u.DateModified != nil { + + *DateModified = timeutil.Strftime(u.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ") + } else { + DateModified = nil + } + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + DateCreated *string `json:"dateCreated,omitempty"` + + DateModified *string `json:"dateModified,omitempty"` + + Version *int `json:"version,omitempty"` + + DefaultSet *[]string `json:"defaultSet,omitempty"` + + Mapping *map[string][]string `json:"mapping,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + DateCreated: DateCreated, + + DateModified: DateModified, + + Version: u.Version, + + DefaultSet: u.DefaultSet, + + Mapping: u.Mapping, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wrapupcodemapping) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/wrapupcodereference.go b/platformclientv2/wrapupcodereference.go index f13e716b0..ef05fe104 100644 --- a/platformclientv2/wrapupcodereference.go +++ b/platformclientv2/wrapupcodereference.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Wrapupcodereference struct { } +func (u *Wrapupcodereference) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Wrapupcodereference + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Wrapupcodereference) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/writabledialercontact.go b/platformclientv2/writabledialercontact.go index b9b0baffe..505b45419 100644 --- a/platformclientv2/writabledialercontact.go +++ b/platformclientv2/writabledialercontact.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -28,6 +29,38 @@ type Writabledialercontact struct { } +func (u *Writabledialercontact) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Writabledialercontact + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + ContactListId *string `json:"contactListId,omitempty"` + + Data *map[string]interface{} `json:"data,omitempty"` + + Callable *bool `json:"callable,omitempty"` + + PhoneNumberStatus *map[string]Phonenumberstatus `json:"phoneNumberStatus,omitempty"` + *Alias + }{ + Id: u.Id, + + ContactListId: u.ContactListId, + + Data: u.Data, + + Callable: u.Callable, + + PhoneNumberStatus: u.PhoneNumberStatus, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Writabledialercontact) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/writabledivision.go b/platformclientv2/writabledivision.go index d0f3cdc1a..4f509b760 100644 --- a/platformclientv2/writabledivision.go +++ b/platformclientv2/writabledivision.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -20,6 +21,30 @@ type Writabledivision struct { } +func (u *Writabledivision) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Writabledivision + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + SelfUri *string `json:"selfUri,omitempty"` + *Alias + }{ + Id: u.Id, + + Name: u.Name, + + SelfUri: u.SelfUri, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Writabledivision) String() string { j, _ := json.Marshal(o) diff --git a/platformclientv2/writableentity.go b/platformclientv2/writableentity.go index f2552f228..f3ec10caf 100644 --- a/platformclientv2/writableentity.go +++ b/platformclientv2/writableentity.go @@ -1,5 +1,6 @@ package platformclientv2 import ( + "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" @@ -12,6 +13,22 @@ type Writableentity struct { } +func (u *Writableentity) MarshalJSON() ([]byte, error) { + // Redundant initialization to avoid unused import errors for models with no Time values + _ = timeutil.Timedelta{} + type Alias Writableentity + + + + return json.Marshal(&struct { + Id *string `json:"id,omitempty"` + *Alias + }{ + Id: u.Id, + Alias: (*Alias)(u), + }) +} + // String returns a JSON representation of the model func (o *Writableentity) String() string { j, _ := json.Marshal(o) diff --git a/releaseNotes.md b/releaseNotes.md index 20d0e3314..0fe0a9e11 100644 --- a/releaseNotes.md +++ b/releaseNotes.md @@ -1,283 +1,12 @@ Platform API version: 4893 -# Major Changes (14 changes) +Fixing date and date time handling in the Go SDK -**/uploads/v1/publicassets/{subResources}** (1 change) +# Major Changes (0 changes) -* Path /uploads/v1/publicassets/{subResources} was removed -**/webdeployments/v1/{subResources}** (1 change) - -* Path /webdeployments/v1/{subResources} was removed - -**/api/v2/quality/conversations/{conversationId}/audits** (1 change) - -* Path /api/v2/quality/conversations/{conversationId}/audits was removed - -**GET /api/v2/outbound/messagingcampaigns/divisionviews** (1 change) - -* Parameter type was added - -**GET /api/v2/learning/assignments** (3 changes) - -* Parameter pass was added -* Parameter minPercentageScore was added -* Parameter maxPercentageScore was added - -**GET /api/v2/learning/assignments/me** (3 changes) - -* Parameter pass was added -* Parameter minPercentageScore was added -* Parameter maxPercentageScore was added - -**GET /api/v2/learning/modules** (1 change) - -* Parameter isPublished was added - -**QualityAudit** (1 change) - -* Model QualityAudit was removed - -**QualityAuditPage** (1 change) - -* Model QualityAuditPage was removed - -**Edge** (1 change) - -* Enum value BYOH was removed from property edgeDeploymentType - - -# Minor Changes (85 changes) - -**/api/v2/gamification/profiles/{performanceProfileId}/activate** (2 changes) - -* Path was added -* Operation POST was added - -**/api/v2/gamification/profiles/{performanceProfileId}/deactivate** (2 changes) - -* Path was added -* Operation POST was added - -**/api/v2/recording/jobs/{jobId}/failedrecordings** (2 changes) - -* Path was added -* Operation GET was added - -**/api/v2/webdeployments/configurations/{configurationId}** (2 changes) - -* Path was added -* Operation DELETE was added - -**/api/v2/webdeployments/configurations** (3 changes) - -* Path was added -* Operation GET was added -* Operation POST was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions** (2 changes) - -* Path was added -* Operation GET was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions/{versionId}** (2 changes) - -* Path was added -* Operation GET was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions/draft** (3 changes) - -* Path was added -* Operation GET was added -* Operation PUT was added - -**/api/v2/webdeployments/configurations/{configurationId}/versions/draft/publish** (2 changes) - -* Path was added -* Operation POST was added - -**/api/v2/webdeployments/deployments/{deploymentId}** (4 changes) - -* Path was added -* Operation GET was added -* Operation PUT was added -* Operation DELETE was added - -**/api/v2/webdeployments/deployments** (3 changes) - -* Path was added -* Operation GET was added -* Operation POST was added - -**/api/v2/learning/assessments/scoring** (2 changes) - -* Path was added -* Operation POST was added - -**ViewFilter** (3 changes) - -* Optional property isRecorded was added -* Optional property hasEvaluation was added -* Optional property hasScoredEvaluation was added - -**AuditLogMessage** (1 change) - -* Enum value DynamicGroup was added to property entityType - -**AuditQueryEntity** (1 change) - -* Enum value DynamicGroup was added to property name - -**EventLog** (1 change) - -* Enum value MESSAGE_RESTRICTION was added to property category - -**EventMessage** (1 change) - -* Enum value INVALID_EMAIL_ADDRESS was added to property code - -**Recording** (1 change) - -* Optional property recordingErrorStatus was added - -**FailedRecordingsEntityListing** (1 change) - -* Model was added - -**RecordingJobFailedRecording** (1 change) - -* Model was added - -**RecordingJob** (1 change) - -* Optional property failedRecordings was added - -**Edge** (1 change) - -* Enum value CHS was added to property edgeDeploymentType - -**AuthenticationSettings** (1 change) - -* Model was added - -**FileUploadMode** (1 change) - -* Model was added - -**FileUploadSettings** (1 change) - -* Model was added - -**FormsTrackTrigger** (1 change) - -* Model was added - -**IdleEventTrigger** (1 change) - -* Model was added - -**JourneyEventsSettings** (1 change) - -* Model was added - -**LauncherButtonSettings** (1 change) - -* Model was added - -**MessengerSettings** (1 change) - -* Model was added - -**MessengerStyles** (1 change) - -* Model was added - -**ScrollPercentageEventTrigger** (1 change) - -* Model was added - -**SelectorEventTrigger** (1 change) - -* Model was added - -**WebDeploymentConfigurationVersion** (1 change) - -* Model was added - -**WebDeploymentConfigurationVersionEntityListing** (1 change) - -* Model was added - -**WebDeployment** (1 change) - -* Model was added - -**WebDeploymentConfigurationVersionEntityRef** (1 change) - -* Model was added - -**WebDeploymentEntityListing** (1 change) - -* Model was added - -**DevelopmentActivityAggregateQueryResponseMetric** (3 changes) - -* Enum value nPassedActivities was added to property metric -* Enum value nFailedActivities was added to property metric -* Enum value oActivityScore was added to property metric - -**DevelopmentActivityAggregateQueryResponseStatistics** (3 changes) - -* Optional property min was added -* Optional property max was added -* Optional property sum was added - -**DevelopmentActivityAggregateParam** (3 changes) - -* Enum value nPassedActivities was added to property metrics -* Enum value nFailedActivities was added to property metrics -* Enum value oActivityScore was added to property metrics - -**LearningAssessmentScoringRequest** (1 change) - -* Model was added - -**LearningAssignmentAggregateQueryResponseMetric** (3 changes) - -* Enum value nPassedActivities was added to property metric -* Enum value nFailedActivities was added to property metric -* Enum value oActivityScore was added to property metric - -**LearningAssignmentAggregateQueryResponseStats** (3 changes) - -* Optional property min was added -* Optional property max was added -* Optional property sum was added - -**LearningAssignmentAggregateParam** (3 changes) - -* Enum value nPassedActivities was added to property metrics -* Enum value nFailedActivities was added to property metrics -* Enum value oActivityScore was added to property metrics - -**LearningAssignment** (4 changes) - -* Optional property assessment was added -* Optional property percentageScore was added -* Optional property isPassed was added -* Optional property assessmentForm was added - -**LearningModule** (3 changes) - -* Optional property type was added -* Optional property assessmentForm was added -* Optional property summaryData was added - -**LearningModuleRequest** (2 changes) - -* Optional property type was added -* Optional property assessmentForm was added +# Minor Changes (0 changes) # Point Changes (0 changes) diff --git a/version.json b/version.json index 0282c54d4..247660a5b 100644 --- a/version.json +++ b/version.json @@ -1,9 +1,9 @@ { "major": 52, "minor": 0, - "point": 0, + "point": 1, "prerelease": "", "apiVersion": 0, - "display": "52.0.0", - "displayFull": "52.0.0" + "display": "52.0.1", + "displayFull": "52.0.1" } \ No newline at end of file