@@ -66,11 +66,11 @@ func NewThreatEventService(opts ...option.RequestOption) (r *ThreatEventService)
66
66
// endpoint.
67
67
func (r * ThreatEventService ) New (ctx context.Context , params ThreatEventNewParams , opts ... option.RequestOption ) (res * ThreatEventNewResponse , err error ) {
68
68
opts = append (r .Options [:], opts ... )
69
- if ! params .PathAccountID .Present {
69
+ if params .PathAccountID .Value == "" {
70
70
err = errors .New ("missing required account_id parameter" )
71
71
return
72
72
}
73
- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events/create" , params .PathAccountID )
73
+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events/create" , params .PathAccountID )
74
74
err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
75
75
return
76
76
}
@@ -81,11 +81,11 @@ func (r *ThreatEventService) New(ctx context.Context, params ThreatEventNewParam
81
81
// endpoint). Also, must provide query parameters.
82
82
func (r * ThreatEventService ) List (ctx context.Context , params ThreatEventListParams , opts ... option.RequestOption ) (res * []ThreatEventListResponse , err error ) {
83
83
opts = append (r .Options [:], opts ... )
84
- if ! params .AccountID .Present {
84
+ if params .AccountID .Value == "" {
85
85
err = errors .New ("missing required account_id parameter" )
86
86
return
87
87
}
88
- path := fmt .Sprintf ("accounts/%v /cloudforce-one/events" , params .AccountID )
88
+ path := fmt .Sprintf ("accounts/%s /cloudforce-one/events" , params .AccountID )
89
89
err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , params , & res , opts ... )
90
90
return
91
91
}
@@ -96,15 +96,15 @@ func (r *ThreatEventService) List(ctx context.Context, params ThreatEventListPar
96
96
// endpoint.
97
97
func (r * ThreatEventService ) Delete (ctx context.Context , eventID string , body ThreatEventDeleteParams , opts ... option.RequestOption ) (res * ThreatEventDeleteResponse , err error ) {
98
98
opts = append (r .Options [:], opts ... )
99
- if ! body .AccountID .Present {
99
+ if body .AccountID .Value == "" {
100
100
err = errors .New ("missing required account_id parameter" )
101
101
return
102
102
}
103
103
if eventID == "" {
104
104
err = errors .New ("missing required event_id parameter" )
105
105
return
106
106
}
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 )
108
108
err = requestconfig .ExecuteNewRequest (ctx , http .MethodDelete , path , nil , & res , opts ... )
109
109
return
110
110
}
@@ -115,43 +115,43 @@ func (r *ThreatEventService) Delete(ctx context.Context, eventID string, body Th
115
115
// endpoint.
116
116
func (r * ThreatEventService ) BulkNew (ctx context.Context , params ThreatEventBulkNewParams , opts ... option.RequestOption ) (res * []ThreatEventBulkNewResponse , err error ) {
117
117
opts = append (r .Options [:], opts ... )
118
- if ! params .AccountID .Present {
118
+ if params .AccountID .Value == "" {
119
119
err = errors .New ("missing required account_id parameter" )
120
120
return
121
121
}
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 )
123
123
err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
124
124
return
125
125
}
126
126
127
127
// Updates an event
128
128
func (r * ThreatEventService ) Edit (ctx context.Context , eventID string , params ThreatEventEditParams , opts ... option.RequestOption ) (res * ThreatEventEditResponse , err error ) {
129
129
opts = append (r .Options [:], opts ... )
130
- if ! params .AccountID .Present {
130
+ if params .AccountID .Value == "" {
131
131
err = errors .New ("missing required account_id parameter" )
132
132
return
133
133
}
134
134
if eventID == "" {
135
135
err = errors .New ("missing required event_id parameter" )
136
136
return
137
137
}
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 )
139
139
err = requestconfig .ExecuteNewRequest (ctx , http .MethodPatch , path , params , & res , opts ... )
140
140
return
141
141
}
142
142
143
143
// Reads an event
144
144
func (r * ThreatEventService ) Get (ctx context.Context , eventID string , query ThreatEventGetParams , opts ... option.RequestOption ) (res * ThreatEventGetResponse , err error ) {
145
145
opts = append (r .Options [:], opts ... )
146
- if ! query .AccountID .Present {
146
+ if query .AccountID .Value == "" {
147
147
err = errors .New ("missing required account_id parameter" )
148
148
return
149
149
}
150
150
if eventID == "" {
151
151
err = errors .New ("missing required event_id parameter" )
152
152
return
153
153
}
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 )
155
155
err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , nil , & res , opts ... )
156
156
return
157
157
}
@@ -544,7 +544,7 @@ func (r threatEventGetResponseJSON) RawJSON() string {
544
544
545
545
type ThreatEventNewParams struct {
546
546
// Account ID.
547
- PathAccountID param.Field [float64 ] `path:"account_id,required"`
547
+ PathAccountID param.Field [string ] `path:"account_id,required"`
548
548
Attacker param.Field [string ] `json:"attacker,required"`
549
549
AttackerCountry param.Field [string ] `json:"attackerCountry,required"`
550
550
Category param.Field [string ] `json:"category,required"`
@@ -577,7 +577,7 @@ func (r ThreatEventNewParamsRaw) MarshalJSON() (data []byte, err error) {
577
577
578
578
type ThreatEventListParams struct {
579
579
// Account ID.
580
- AccountID param.Field [float64 ] `path:"account_id,required"`
580
+ AccountID param.Field [string ] `path:"account_id,required"`
581
581
DatasetID param.Field [[]string ] `query:"datasetId"`
582
582
ForceRefresh param.Field [bool ] `query:"forceRefresh"`
583
583
Order param.Field [ThreatEventListParamsOrder ] `query:"order"`
@@ -667,12 +667,12 @@ type ThreatEventListParamsSearchValueArrayItemUnion interface {
667
667
668
668
type ThreatEventDeleteParams struct {
669
669
// Account ID.
670
- AccountID param.Field [float64 ] `path:"account_id,required"`
670
+ AccountID param.Field [string ] `path:"account_id,required"`
671
671
}
672
672
673
673
type ThreatEventBulkNewParams struct {
674
674
// Account ID.
675
- AccountID param.Field [float64 ] `path:"account_id,required"`
675
+ AccountID param.Field [string ] `path:"account_id,required"`
676
676
Data param.Field [[]ThreatEventBulkNewParamsData ] `json:"data,required"`
677
677
DatasetID param.Field [string ] `json:"datasetId,required"`
678
678
}
@@ -714,7 +714,7 @@ func (r ThreatEventBulkNewParamsDataRaw) MarshalJSON() (data []byte, err error)
714
714
715
715
type ThreatEventEditParams struct {
716
716
// Account ID.
717
- AccountID param.Field [float64 ] `path:"account_id,required"`
717
+ AccountID param.Field [string ] `path:"account_id,required"`
718
718
Attacker param.Field [string ] `json:"attacker"`
719
719
AttackerCountry param.Field [string ] `json:"attackerCountry"`
720
720
Category param.Field [string ] `json:"category"`
@@ -733,5 +733,5 @@ func (r ThreatEventEditParams) MarshalJSON() (data []byte, err error) {
733
733
734
734
type ThreatEventGetParams struct {
735
735
// Account ID.
736
- AccountID param.Field [float64 ] `path:"account_id,required"`
736
+ AccountID param.Field [string ] `path:"account_id,required"`
737
737
}
0 commit comments