@@ -607,32 +607,7 @@ func (r *MetadataExifThumbnail) UnmarshalJSON(data []byte) error {
607607 return apijson .UnmarshalRoot (data , r )
608608}
609609
610- // Only one field can be non-zero.
611- //
612- // Use [param.IsOmitted] to confirm if a field is set.
613- type UpdateFileDetailsRequestUnionParam struct {
614- OfUpdateFileDetails * UpdateFileDetailsRequestUpdateFileDetailsParam `json:",omitzero,inline"`
615- OfChangePublicationStatus * UpdateFileDetailsRequestChangePublicationStatusParam `json:",omitzero,inline"`
616- paramUnion
617- }
618-
619- func (u UpdateFileDetailsRequestUnionParam ) MarshalJSON () ([]byte , error ) {
620- return param .MarshalUnion (u , u .OfUpdateFileDetails , u .OfChangePublicationStatus )
621- }
622- func (u * UpdateFileDetailsRequestUnionParam ) UnmarshalJSON (data []byte ) error {
623- return apijson .UnmarshalRoot (data , u )
624- }
625-
626- func (u * UpdateFileDetailsRequestUnionParam ) asAny () any {
627- if ! param .IsOmitted (u .OfUpdateFileDetails ) {
628- return u .OfUpdateFileDetails
629- } else if ! param .IsOmitted (u .OfChangePublicationStatus ) {
630- return u .OfChangePublicationStatus
631- }
632- return nil
633- }
634-
635- type UpdateFileDetailsRequestUpdateFileDetailsParam struct {
610+ type UpdateFileRequestParam struct {
636611 // Define an important area in the image in the format `x,y,width,height` e.g.
637612 // `10,10,100,100`. Send `null` to unset this value.
638613 CustomCoordinates param.Opt [string ] `json:"customCoordinates,omitzero"`
@@ -661,36 +636,36 @@ type UpdateFileDetailsRequestUpdateFileDetailsParam struct {
661636 //
662637 // Note: The remove operation for `AITags` executes before any of the `extensions`
663638 // are processed.
664- RemoveAITags UpdateFileDetailsRequestUpdateFileDetailsRemoveAITagsUnionParam `json:"removeAITags,omitzero"`
639+ RemoveAITags UpdateFileRequestRemoveAITagsUnionParam `json:"removeAITags,omitzero"`
665640 paramObj
666641}
667642
668- func (r UpdateFileDetailsRequestUpdateFileDetailsParam ) MarshalJSON () (data []byte , err error ) {
669- type shadow UpdateFileDetailsRequestUpdateFileDetailsParam
643+ func (r UpdateFileRequestParam ) MarshalJSON () (data []byte , err error ) {
644+ type shadow UpdateFileRequestParam
670645 return param .MarshalObject (r , (* shadow )(& r ))
671646}
672- func (r * UpdateFileDetailsRequestUpdateFileDetailsParam ) UnmarshalJSON (data []byte ) error {
647+ func (r * UpdateFileRequestParam ) UnmarshalJSON (data []byte ) error {
673648 return apijson .UnmarshalRoot (data , r )
674649}
675650
676651// Only one field can be non-zero.
677652//
678653// Use [param.IsOmitted] to confirm if a field is set.
679- type UpdateFileDetailsRequestUpdateFileDetailsRemoveAITagsUnionParam struct {
654+ type UpdateFileRequestRemoveAITagsUnionParam struct {
680655 OfStringArray []string `json:",omitzero,inline"`
681656 // Construct this variant with constant.ValueOf[constant.All]()
682657 OfAll constant.All `json:",omitzero,inline"`
683658 paramUnion
684659}
685660
686- func (u UpdateFileDetailsRequestUpdateFileDetailsRemoveAITagsUnionParam ) MarshalJSON () ([]byte , error ) {
661+ func (u UpdateFileRequestRemoveAITagsUnionParam ) MarshalJSON () ([]byte , error ) {
687662 return param .MarshalUnion (u , u .OfStringArray , u .OfAll )
688663}
689- func (u * UpdateFileDetailsRequestUpdateFileDetailsRemoveAITagsUnionParam ) UnmarshalJSON (data []byte ) error {
664+ func (u * UpdateFileRequestRemoveAITagsUnionParam ) UnmarshalJSON (data []byte ) error {
690665 return apijson .UnmarshalRoot (data , u )
691666}
692667
693- func (u * UpdateFileDetailsRequestUpdateFileDetailsRemoveAITagsUnionParam ) asAny () any {
668+ func (u * UpdateFileRequestRemoveAITagsUnionParam ) asAny () any {
694669 if ! param .IsOmitted (u .OfStringArray ) {
695670 return & u .OfStringArray
696671 } else if ! param .IsOmitted (u .OfAll ) {
@@ -699,40 +674,6 @@ func (u *UpdateFileDetailsRequestUpdateFileDetailsRemoveAITagsUnionParam) asAny(
699674 return nil
700675}
701676
702- type UpdateFileDetailsRequestChangePublicationStatusParam struct {
703- // Configure the publication status of a file and its versions.
704- Publish UpdateFileDetailsRequestChangePublicationStatusPublishParam `json:"publish,omitzero"`
705- paramObj
706- }
707-
708- func (r UpdateFileDetailsRequestChangePublicationStatusParam ) MarshalJSON () (data []byte , err error ) {
709- type shadow UpdateFileDetailsRequestChangePublicationStatusParam
710- return param .MarshalObject (r , (* shadow )(& r ))
711- }
712- func (r * UpdateFileDetailsRequestChangePublicationStatusParam ) UnmarshalJSON (data []byte ) error {
713- return apijson .UnmarshalRoot (data , r )
714- }
715-
716- // Configure the publication status of a file and its versions.
717- //
718- // The property IsPublished is required.
719- type UpdateFileDetailsRequestChangePublicationStatusPublishParam struct {
720- // Set to `true` to publish the file. Set to `false` to unpublish the file.
721- IsPublished bool `json:"isPublished,required"`
722- // Set to `true` to publish/unpublish all versions of the file. Set to `false` to
723- // publish/unpublish only the current version of the file.
724- IncludeFileVersions param.Opt [bool ] `json:"includeFileVersions,omitzero"`
725- paramObj
726- }
727-
728- func (r UpdateFileDetailsRequestChangePublicationStatusPublishParam ) MarshalJSON () (data []byte , err error ) {
729- type shadow UpdateFileDetailsRequestChangePublicationStatusPublishParam
730- return param .MarshalObject (r , (* shadow )(& r ))
731- }
732- func (r * UpdateFileDetailsRequestChangePublicationStatusPublishParam ) UnmarshalJSON (data []byte ) error {
733- return apijson .UnmarshalRoot (data , r )
734- }
735-
736677// Object containing details of a file or file version.
737678type FileUpdateResponse struct {
738679 ExtensionStatus FileUpdateResponseExtensionStatus `json:"extensionStatus"`
@@ -1019,15 +960,16 @@ func (r *FileUploadResponseVersionInfo) UnmarshalJSON(data []byte) error {
1019960}
1020961
1021962type FileUpdateParams struct {
1022- UpdateFileDetailsRequest UpdateFileDetailsRequestUnionParam
963+ // Schema for update file update request.
964+ UpdateFileRequest UpdateFileRequestParam
1023965 paramObj
1024966}
1025967
1026968func (r FileUpdateParams ) MarshalJSON () (data []byte , err error ) {
1027- return shimjson .Marshal (r .UpdateFileDetailsRequest )
969+ return shimjson .Marshal (r .UpdateFileRequest )
1028970}
1029971func (r * FileUpdateParams ) UnmarshalJSON (data []byte ) error {
1030- return json .Unmarshal (data , & r .UpdateFileDetailsRequest )
972+ return json .Unmarshal (data , & r .UpdateFileRequest )
1031973}
1032974
1033975type FileCopyParams struct {
0 commit comments