@@ -66,11 +66,11 @@ func NewThreatEventService(opts ...option.RequestOption) (r *ThreatEventService)
6666// endpoint.
6767func (r * ThreatEventService ) New (ctx context.Context , params ThreatEventNewParams , opts ... option.RequestOption ) (res * ThreatEventNewResponse , err error ) {
6868 opts = append (r .Options [:], opts ... )
69- if ! params .PathAccountID .Present {
69+ if params .PathAccountID .Value == "" {
7070 err = errors .New ("missing required account_id parameter" )
7171 return
7272 }
73- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events/create" , params .PathAccountID )
73+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events/create" , params .PathAccountID )
7474 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
7575 return
7676}
@@ -81,11 +81,11 @@ func (r *ThreatEventService) New(ctx context.Context, params ThreatEventNewParam
8181// endpoint). Also, must provide query parameters.
8282func (r * ThreatEventService ) List (ctx context.Context , params ThreatEventListParams , opts ... option.RequestOption ) (res * []ThreatEventListResponse , err error ) {
8383 opts = append (r .Options [:], opts ... )
84- if ! params .AccountID .Present {
84+ if params .AccountID .Value == "" {
8585 err = errors .New ("missing required account_id parameter" )
8686 return
8787 }
88- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events" , params .AccountID )
88+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events" , params .AccountID )
8989 err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , params , & res , opts ... )
9090 return
9191}
@@ -96,15 +96,15 @@ func (r *ThreatEventService) List(ctx context.Context, params ThreatEventListPar
9696// endpoint.
9797func (r * ThreatEventService ) Delete (ctx context.Context , eventID string , body ThreatEventDeleteParams , opts ... option.RequestOption ) (res * ThreatEventDeleteResponse , err error ) {
9898 opts = append (r .Options [:], opts ... )
99- if ! body .AccountID .Present {
99+ if body .AccountID .Value == "" {
100100 err = errors .New ("missing required account_id parameter" )
101101 return
102102 }
103103 if eventID == "" {
104104 err = errors .New ("missing required event_id parameter" )
105105 return
106106 }
107- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events/%s" , body .AccountID , eventID )
107+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events/%s" , body .AccountID , eventID )
108108 err = requestconfig .ExecuteNewRequest (ctx , http .MethodDelete , path , nil , & res , opts ... )
109109 return
110110}
@@ -115,43 +115,43 @@ func (r *ThreatEventService) Delete(ctx context.Context, eventID string, body Th
115115// endpoint.
116116func (r * ThreatEventService ) BulkNew (ctx context.Context , params ThreatEventBulkNewParams , opts ... option.RequestOption ) (res * []ThreatEventBulkNewResponse , err error ) {
117117 opts = append (r .Options [:], opts ... )
118- if ! params .AccountID .Present {
118+ if params .AccountID .Value == "" {
119119 err = errors .New ("missing required account_id parameter" )
120120 return
121121 }
122- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events/create/bulk" , params .AccountID )
122+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events/create/bulk" , params .AccountID )
123123 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
124124 return
125125}
126126
127127// Updates an event
128128func (r * ThreatEventService ) Edit (ctx context.Context , eventID string , params ThreatEventEditParams , opts ... option.RequestOption ) (res * ThreatEventEditResponse , err error ) {
129129 opts = append (r .Options [:], opts ... )
130- if ! params .AccountID .Present {
130+ if params .AccountID .Value == "" {
131131 err = errors .New ("missing required account_id parameter" )
132132 return
133133 }
134134 if eventID == "" {
135135 err = errors .New ("missing required event_id parameter" )
136136 return
137137 }
138- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events/%s" , params .AccountID , eventID )
138+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events/%s" , params .AccountID , eventID )
139139 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPatch , path , params , & res , opts ... )
140140 return
141141}
142142
143143// Reads an event
144144func (r * ThreatEventService ) Get (ctx context.Context , eventID string , query ThreatEventGetParams , opts ... option.RequestOption ) (res * ThreatEventGetResponse , err error ) {
145145 opts = append (r .Options [:], opts ... )
146- if ! query .AccountID .Present {
146+ if query .AccountID .Value == "" {
147147 err = errors .New ("missing required account_id parameter" )
148148 return
149149 }
150150 if eventID == "" {
151151 err = errors .New ("missing required event_id parameter" )
152152 return
153153 }
154- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events/%s" , query .AccountID , eventID )
154+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events/%s" , query .AccountID , eventID )
155155 err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , nil , & res , opts ... )
156156 return
157157}
@@ -544,7 +544,7 @@ func (r threatEventGetResponseJSON) RawJSON() string {
544544
545545type ThreatEventNewParams struct {
546546 // Account ID.
547- PathAccountID param.Field [float64 ] `path:"account_id,required"`
547+ PathAccountID param.Field [string ] `path:"account_id,required"`
548548 Attacker param.Field [string ] `json:"attacker,required"`
549549 AttackerCountry param.Field [string ] `json:"attackerCountry,required"`
550550 Category param.Field [string ] `json:"category,required"`
@@ -577,7 +577,7 @@ func (r ThreatEventNewParamsRaw) MarshalJSON() (data []byte, err error) {
577577
578578type ThreatEventListParams struct {
579579 // Account ID.
580- AccountID param.Field [float64 ] `path:"account_id,required"`
580+ AccountID param.Field [string ] `path:"account_id,required"`
581581 DatasetID param.Field [[]string ] `query:"datasetId"`
582582 ForceRefresh param.Field [bool ] `query:"forceRefresh"`
583583 Order param.Field [ThreatEventListParamsOrder ] `query:"order"`
@@ -667,12 +667,12 @@ type ThreatEventListParamsSearchValueArrayItemUnion interface {
667667
668668type ThreatEventDeleteParams struct {
669669 // Account ID.
670- AccountID param.Field [float64 ] `path:"account_id,required"`
670+ AccountID param.Field [string ] `path:"account_id,required"`
671671}
672672
673673type ThreatEventBulkNewParams struct {
674674 // Account ID.
675- AccountID param.Field [float64 ] `path:"account_id,required"`
675+ AccountID param.Field [string ] `path:"account_id,required"`
676676 Data param.Field [[]ThreatEventBulkNewParamsData ] `json:"data,required"`
677677 DatasetID param.Field [string ] `json:"datasetId,required"`
678678}
@@ -714,7 +714,7 @@ func (r ThreatEventBulkNewParamsDataRaw) MarshalJSON() (data []byte, err error)
714714
715715type ThreatEventEditParams struct {
716716 // Account ID.
717- AccountID param.Field [float64 ] `path:"account_id,required"`
717+ AccountID param.Field [string ] `path:"account_id,required"`
718718 Attacker param.Field [string ] `json:"attacker"`
719719 AttackerCountry param.Field [string ] `json:"attackerCountry"`
720720 Category param.Field [string ] `json:"category"`
@@ -733,5 +733,5 @@ func (r ThreatEventEditParams) MarshalJSON() (data []byte, err error) {
733733
734734type ThreatEventGetParams struct {
735735 // Account ID.
736- AccountID param.Field [float64 ] `path:"account_id,required"`
736+ AccountID param.Field [string ] `path:"account_id,required"`
737737}
0 commit comments