@@ -39,6 +39,40 @@ func NewContentScanningService(opts ...option.RequestOption) (r *ContentScanning
3939 return
4040}
4141
42+ // Update the Content Scanning status.
43+ func (r * ContentScanningService ) New (ctx context.Context , params ContentScanningNewParams , opts ... option.RequestOption ) (res * ContentScanningNewResponse , err error ) {
44+ var env ContentScanningNewResponseEnvelope
45+ opts = slices .Concat (r .Options , opts )
46+ if params .ZoneID .Value == "" {
47+ err = errors .New ("missing required zone_id parameter" )
48+ return
49+ }
50+ path := fmt .Sprintf ("zones/%s/content-upload-scan/settings" , params .ZoneID )
51+ err = requestconfig .ExecuteNewRequest (ctx , http .MethodPut , path , params , & env , opts ... )
52+ if err != nil {
53+ return
54+ }
55+ res = & env .Result
56+ return
57+ }
58+
59+ // Update the Content Scanning status.
60+ func (r * ContentScanningService ) Update (ctx context.Context , params ContentScanningUpdateParams , opts ... option.RequestOption ) (res * ContentScanningUpdateResponse , err error ) {
61+ var env ContentScanningUpdateResponseEnvelope
62+ opts = slices .Concat (r .Options , opts )
63+ if params .ZoneID .Value == "" {
64+ err = errors .New ("missing required zone_id parameter" )
65+ return
66+ }
67+ path := fmt .Sprintf ("zones/%s/content-upload-scan/settings" , params .ZoneID )
68+ err = requestconfig .ExecuteNewRequest (ctx , http .MethodPut , path , params , & env , opts ... )
69+ if err != nil {
70+ return
71+ }
72+ res = & env .Result
73+ return
74+ }
75+
4276// Disable Content Scanning.
4377func (r * ContentScanningService ) Disable (ctx context.Context , body ContentScanningDisableParams , opts ... option.RequestOption ) (res * ContentScanningDisableResponse , err error ) {
4478 var env ContentScanningDisableResponseEnvelope
@@ -73,10 +107,247 @@ func (r *ContentScanningService) Enable(ctx context.Context, body ContentScannin
73107 return
74108}
75109
110+ // Retrieve the current status of Content Scanning.
111+ func (r * ContentScanningService ) Get (ctx context.Context , query ContentScanningGetParams , opts ... option.RequestOption ) (res * ContentScanningGetResponse , err error ) {
112+ var env ContentScanningGetResponseEnvelope
113+ opts = slices .Concat (r .Options , opts )
114+ if query .ZoneID .Value == "" {
115+ err = errors .New ("missing required zone_id parameter" )
116+ return
117+ }
118+ path := fmt .Sprintf ("zones/%s/content-upload-scan/settings" , query .ZoneID )
119+ err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , nil , & env , opts ... )
120+ if err != nil {
121+ return
122+ }
123+ res = & env .Result
124+ return
125+ }
126+
127+ // Defines the status for Content Scanning.
128+ type ContentScanningNewResponse struct {
129+ // Defines the last modification date (ISO 8601) of the Content Scanning status.
130+ Modified string `json:"modified"`
131+ // Defines the status of Content Scanning.
132+ Value string `json:"value"`
133+ JSON contentScanningNewResponseJSON `json:"-"`
134+ }
135+
136+ // contentScanningNewResponseJSON contains the JSON metadata for the struct
137+ // [ContentScanningNewResponse]
138+ type contentScanningNewResponseJSON struct {
139+ Modified apijson.Field
140+ Value apijson.Field
141+ raw string
142+ ExtraFields map [string ]apijson.Field
143+ }
144+
145+ func (r * ContentScanningNewResponse ) UnmarshalJSON (data []byte ) (err error ) {
146+ return apijson .UnmarshalRoot (data , r )
147+ }
148+
149+ func (r contentScanningNewResponseJSON ) RawJSON () string {
150+ return r .raw
151+ }
152+
153+ // Defines the status for Content Scanning.
154+ type ContentScanningUpdateResponse struct {
155+ // Defines the last modification date (ISO 8601) of the Content Scanning status.
156+ Modified string `json:"modified"`
157+ // Defines the status of Content Scanning.
158+ Value string `json:"value"`
159+ JSON contentScanningUpdateResponseJSON `json:"-"`
160+ }
161+
162+ // contentScanningUpdateResponseJSON contains the JSON metadata for the struct
163+ // [ContentScanningUpdateResponse]
164+ type contentScanningUpdateResponseJSON struct {
165+ Modified apijson.Field
166+ Value apijson.Field
167+ raw string
168+ ExtraFields map [string ]apijson.Field
169+ }
170+
171+ func (r * ContentScanningUpdateResponse ) UnmarshalJSON (data []byte ) (err error ) {
172+ return apijson .UnmarshalRoot (data , r )
173+ }
174+
175+ func (r contentScanningUpdateResponseJSON ) RawJSON () string {
176+ return r .raw
177+ }
178+
76179type ContentScanningDisableResponse = interface {}
77180
78181type ContentScanningEnableResponse = interface {}
79182
183+ // Defines the status for Content Scanning.
184+ type ContentScanningGetResponse struct {
185+ // Defines the last modification date (ISO 8601) of the Content Scanning status.
186+ Modified string `json:"modified"`
187+ // Defines the status of Content Scanning.
188+ Value string `json:"value"`
189+ JSON contentScanningGetResponseJSON `json:"-"`
190+ }
191+
192+ // contentScanningGetResponseJSON contains the JSON metadata for the struct
193+ // [ContentScanningGetResponse]
194+ type contentScanningGetResponseJSON struct {
195+ Modified apijson.Field
196+ Value apijson.Field
197+ raw string
198+ ExtraFields map [string ]apijson.Field
199+ }
200+
201+ func (r * ContentScanningGetResponse ) UnmarshalJSON (data []byte ) (err error ) {
202+ return apijson .UnmarshalRoot (data , r )
203+ }
204+
205+ func (r contentScanningGetResponseJSON ) RawJSON () string {
206+ return r .raw
207+ }
208+
209+ type ContentScanningNewParams struct {
210+ // Defines an identifier.
211+ ZoneID param.Field [string ] `path:"zone_id,required"`
212+ // The status value for Content Scanning.
213+ Value param.Field [ContentScanningNewParamsValue ] `json:"value,required"`
214+ }
215+
216+ func (r ContentScanningNewParams ) MarshalJSON () (data []byte , err error ) {
217+ return apijson .MarshalRoot (r )
218+ }
219+
220+ // The status value for Content Scanning.
221+ type ContentScanningNewParamsValue string
222+
223+ const (
224+ ContentScanningNewParamsValueEnabled ContentScanningNewParamsValue = "enabled"
225+ ContentScanningNewParamsValueDisabled ContentScanningNewParamsValue = "disabled"
226+ )
227+
228+ func (r ContentScanningNewParamsValue ) IsKnown () bool {
229+ switch r {
230+ case ContentScanningNewParamsValueEnabled , ContentScanningNewParamsValueDisabled :
231+ return true
232+ }
233+ return false
234+ }
235+
236+ type ContentScanningNewResponseEnvelope struct {
237+ Errors []shared.ResponseInfo `json:"errors,required"`
238+ Messages []shared.ResponseInfo `json:"messages,required"`
239+ // Defines the status for Content Scanning.
240+ Result ContentScanningNewResponse `json:"result,required"`
241+ // Whether the API call was successful.
242+ Success ContentScanningNewResponseEnvelopeSuccess `json:"success,required"`
243+ JSON contentScanningNewResponseEnvelopeJSON `json:"-"`
244+ }
245+
246+ // contentScanningNewResponseEnvelopeJSON contains the JSON metadata for the struct
247+ // [ContentScanningNewResponseEnvelope]
248+ type contentScanningNewResponseEnvelopeJSON struct {
249+ Errors apijson.Field
250+ Messages apijson.Field
251+ Result apijson.Field
252+ Success apijson.Field
253+ raw string
254+ ExtraFields map [string ]apijson.Field
255+ }
256+
257+ func (r * ContentScanningNewResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
258+ return apijson .UnmarshalRoot (data , r )
259+ }
260+
261+ func (r contentScanningNewResponseEnvelopeJSON ) RawJSON () string {
262+ return r .raw
263+ }
264+
265+ // Whether the API call was successful.
266+ type ContentScanningNewResponseEnvelopeSuccess bool
267+
268+ const (
269+ ContentScanningNewResponseEnvelopeSuccessTrue ContentScanningNewResponseEnvelopeSuccess = true
270+ )
271+
272+ func (r ContentScanningNewResponseEnvelopeSuccess ) IsKnown () bool {
273+ switch r {
274+ case ContentScanningNewResponseEnvelopeSuccessTrue :
275+ return true
276+ }
277+ return false
278+ }
279+
280+ type ContentScanningUpdateParams struct {
281+ // Defines an identifier.
282+ ZoneID param.Field [string ] `path:"zone_id,required"`
283+ // The status value for Content Scanning.
284+ Value param.Field [ContentScanningUpdateParamsValue ] `json:"value,required"`
285+ }
286+
287+ func (r ContentScanningUpdateParams ) MarshalJSON () (data []byte , err error ) {
288+ return apijson .MarshalRoot (r )
289+ }
290+
291+ // The status value for Content Scanning.
292+ type ContentScanningUpdateParamsValue string
293+
294+ const (
295+ ContentScanningUpdateParamsValueEnabled ContentScanningUpdateParamsValue = "enabled"
296+ ContentScanningUpdateParamsValueDisabled ContentScanningUpdateParamsValue = "disabled"
297+ )
298+
299+ func (r ContentScanningUpdateParamsValue ) IsKnown () bool {
300+ switch r {
301+ case ContentScanningUpdateParamsValueEnabled , ContentScanningUpdateParamsValueDisabled :
302+ return true
303+ }
304+ return false
305+ }
306+
307+ type ContentScanningUpdateResponseEnvelope struct {
308+ Errors []shared.ResponseInfo `json:"errors,required"`
309+ Messages []shared.ResponseInfo `json:"messages,required"`
310+ // Defines the status for Content Scanning.
311+ Result ContentScanningUpdateResponse `json:"result,required"`
312+ // Whether the API call was successful.
313+ Success ContentScanningUpdateResponseEnvelopeSuccess `json:"success,required"`
314+ JSON contentScanningUpdateResponseEnvelopeJSON `json:"-"`
315+ }
316+
317+ // contentScanningUpdateResponseEnvelopeJSON contains the JSON metadata for the
318+ // struct [ContentScanningUpdateResponseEnvelope]
319+ type contentScanningUpdateResponseEnvelopeJSON struct {
320+ Errors apijson.Field
321+ Messages apijson.Field
322+ Result apijson.Field
323+ Success apijson.Field
324+ raw string
325+ ExtraFields map [string ]apijson.Field
326+ }
327+
328+ func (r * ContentScanningUpdateResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
329+ return apijson .UnmarshalRoot (data , r )
330+ }
331+
332+ func (r contentScanningUpdateResponseEnvelopeJSON ) RawJSON () string {
333+ return r .raw
334+ }
335+
336+ // Whether the API call was successful.
337+ type ContentScanningUpdateResponseEnvelopeSuccess bool
338+
339+ const (
340+ ContentScanningUpdateResponseEnvelopeSuccessTrue ContentScanningUpdateResponseEnvelopeSuccess = true
341+ )
342+
343+ func (r ContentScanningUpdateResponseEnvelopeSuccess ) IsKnown () bool {
344+ switch r {
345+ case ContentScanningUpdateResponseEnvelopeSuccessTrue :
346+ return true
347+ }
348+ return false
349+ }
350+
80351type ContentScanningDisableParams struct {
81352 // Defines an identifier.
82353 ZoneID param.Field [string ] `path:"zone_id,required"`
@@ -172,3 +443,52 @@ func (r ContentScanningEnableResponseEnvelopeSuccess) IsKnown() bool {
172443 }
173444 return false
174445}
446+
447+ type ContentScanningGetParams struct {
448+ // Defines an identifier.
449+ ZoneID param.Field [string ] `path:"zone_id,required"`
450+ }
451+
452+ type ContentScanningGetResponseEnvelope struct {
453+ Errors []shared.ResponseInfo `json:"errors,required"`
454+ Messages []shared.ResponseInfo `json:"messages,required"`
455+ // Defines the status for Content Scanning.
456+ Result ContentScanningGetResponse `json:"result,required"`
457+ // Whether the API call was successful.
458+ Success ContentScanningGetResponseEnvelopeSuccess `json:"success,required"`
459+ JSON contentScanningGetResponseEnvelopeJSON `json:"-"`
460+ }
461+
462+ // contentScanningGetResponseEnvelopeJSON contains the JSON metadata for the struct
463+ // [ContentScanningGetResponseEnvelope]
464+ type contentScanningGetResponseEnvelopeJSON struct {
465+ Errors apijson.Field
466+ Messages apijson.Field
467+ Result apijson.Field
468+ Success apijson.Field
469+ raw string
470+ ExtraFields map [string ]apijson.Field
471+ }
472+
473+ func (r * ContentScanningGetResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
474+ return apijson .UnmarshalRoot (data , r )
475+ }
476+
477+ func (r contentScanningGetResponseEnvelopeJSON ) RawJSON () string {
478+ return r .raw
479+ }
480+
481+ // Whether the API call was successful.
482+ type ContentScanningGetResponseEnvelopeSuccess bool
483+
484+ const (
485+ ContentScanningGetResponseEnvelopeSuccessTrue ContentScanningGetResponseEnvelopeSuccess = true
486+ )
487+
488+ func (r ContentScanningGetResponseEnvelopeSuccess ) IsKnown () bool {
489+ switch r {
490+ case ContentScanningGetResponseEnvelopeSuccessTrue :
491+ return true
492+ }
493+ return false
494+ }
0 commit comments