@@ -325,7 +325,7 @@ func (a *CloudCostManagementApi) DeleteBudget(ctx _context.Context, budgetId str
325325
326326// DeleteCostAWSCURConfig Delete Cloud Cost Management AWS CUR config.
327327// Archive a Cloud Cost Management Account.
328- func (a * CloudCostManagementApi ) DeleteCostAWSCURConfig (ctx _context.Context , cloudAccountId string ) (* _nethttp.Response , error ) {
328+ func (a * CloudCostManagementApi ) DeleteCostAWSCURConfig (ctx _context.Context , cloudAccountId int64 ) (* _nethttp.Response , error ) {
329329 var (
330330 localVarHTTPMethod = _nethttp .MethodDelete
331331 localVarPostBody interface {}
@@ -393,7 +393,7 @@ func (a *CloudCostManagementApi) DeleteCostAWSCURConfig(ctx _context.Context, cl
393393
394394// DeleteCostAzureUCConfig Delete Cloud Cost Management Azure config.
395395// Archive a Cloud Cost Management Account.
396- func (a * CloudCostManagementApi ) DeleteCostAzureUCConfig (ctx _context.Context , cloudAccountId string ) (* _nethttp.Response , error ) {
396+ func (a * CloudCostManagementApi ) DeleteCostAzureUCConfig (ctx _context.Context , cloudAccountId int64 ) (* _nethttp.Response , error ) {
397397 var (
398398 localVarHTTPMethod = _nethttp .MethodDelete
399399 localVarPostBody interface {}
@@ -461,7 +461,7 @@ func (a *CloudCostManagementApi) DeleteCostAzureUCConfig(ctx _context.Context, c
461461
462462// DeleteCostGCPUsageCostConfig Delete Cloud Cost Management GCP Usage Cost config.
463463// Archive a Cloud Cost Management account.
464- func (a * CloudCostManagementApi ) DeleteCostGCPUsageCostConfig (ctx _context.Context , cloudAccountId string ) (* _nethttp.Response , error ) {
464+ func (a * CloudCostManagementApi ) DeleteCostGCPUsageCostConfig (ctx _context.Context , cloudAccountId int64 ) (* _nethttp.Response , error ) {
465465 var (
466466 localVarHTTPMethod = _nethttp .MethodDelete
467467 localVarPostBody interface {}
@@ -581,7 +581,7 @@ func (a *CloudCostManagementApi) DeleteCustomCostsFile(ctx _context.Context, fil
581581 ErrorBody : localVarBody ,
582582 ErrorMessage : localVarHTTPResponse .Status ,
583583 }
584- if localVarHTTPResponse .StatusCode == 403 || localVarHTTPResponse .StatusCode == 429 {
584+ if localVarHTTPResponse .StatusCode == 403 || localVarHTTPResponse .StatusCode == 404 || localVarHTTPResponse . StatusCode == 429 {
585585 var v APIErrorResponse
586586 err = a .Client .Decode (& v , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
587587 if err != nil {
@@ -728,7 +728,7 @@ func (a *CloudCostManagementApi) GetCustomCostsFile(ctx _context.Context, fileId
728728 ErrorBody : localVarBody ,
729729 ErrorMessage : localVarHTTPResponse .Status ,
730730 }
731- if localVarHTTPResponse .StatusCode == 403 || localVarHTTPResponse .StatusCode == 429 {
731+ if localVarHTTPResponse .StatusCode == 403 || localVarHTTPResponse .StatusCode == 404 || localVarHTTPResponse . StatusCode == 429 {
732732 var v APIErrorResponse
733733 err = a .Client .Decode (& v , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
734734 if err != nil {
@@ -1059,15 +1059,61 @@ func (a *CloudCostManagementApi) ListCostGCPUsageCostConfigs(ctx _context.Contex
10591059 return localVarReturnValue , localVarHTTPResponse , nil
10601060}
10611061
1062+ // ListCustomCostsFilesOptionalParameters holds optional parameters for ListCustomCostsFiles.
1063+ type ListCustomCostsFilesOptionalParameters struct {
1064+ PageNumber * int64
1065+ PageSize * int64
1066+ FilterStatus * string
1067+ Sort * string
1068+ }
1069+
1070+ // NewListCustomCostsFilesOptionalParameters creates an empty struct for parameters.
1071+ func NewListCustomCostsFilesOptionalParameters () * ListCustomCostsFilesOptionalParameters {
1072+ this := ListCustomCostsFilesOptionalParameters {}
1073+ return & this
1074+ }
1075+
1076+ // WithPageNumber sets the corresponding parameter name and returns the struct.
1077+ func (r * ListCustomCostsFilesOptionalParameters ) WithPageNumber (pageNumber int64 ) * ListCustomCostsFilesOptionalParameters {
1078+ r .PageNumber = & pageNumber
1079+ return r
1080+ }
1081+
1082+ // WithPageSize sets the corresponding parameter name and returns the struct.
1083+ func (r * ListCustomCostsFilesOptionalParameters ) WithPageSize (pageSize int64 ) * ListCustomCostsFilesOptionalParameters {
1084+ r .PageSize = & pageSize
1085+ return r
1086+ }
1087+
1088+ // WithFilterStatus sets the corresponding parameter name and returns the struct.
1089+ func (r * ListCustomCostsFilesOptionalParameters ) WithFilterStatus (filterStatus string ) * ListCustomCostsFilesOptionalParameters {
1090+ r .FilterStatus = & filterStatus
1091+ return r
1092+ }
1093+
1094+ // WithSort sets the corresponding parameter name and returns the struct.
1095+ func (r * ListCustomCostsFilesOptionalParameters ) WithSort (sort string ) * ListCustomCostsFilesOptionalParameters {
1096+ r .Sort = & sort
1097+ return r
1098+ }
1099+
10621100// ListCustomCostsFiles List Custom Costs files.
10631101// List the Custom Costs files.
1064- func (a * CloudCostManagementApi ) ListCustomCostsFiles (ctx _context.Context ) (CustomCostsFileListResponse , * _nethttp.Response , error ) {
1102+ func (a * CloudCostManagementApi ) ListCustomCostsFiles (ctx _context.Context , o ... ListCustomCostsFilesOptionalParameters ) (CustomCostsFileListResponse , * _nethttp.Response , error ) {
10651103 var (
10661104 localVarHTTPMethod = _nethttp .MethodGet
10671105 localVarPostBody interface {}
10681106 localVarReturnValue CustomCostsFileListResponse
1107+ optionalParams ListCustomCostsFilesOptionalParameters
10691108 )
10701109
1110+ if len (o ) > 1 {
1111+ return localVarReturnValue , nil , datadog .ReportError ("only one argument of type ListCustomCostsFilesOptionalParameters is allowed" )
1112+ }
1113+ if len (o ) == 1 {
1114+ optionalParams = o [0 ]
1115+ }
1116+
10711117 localBasePath , err := a .Client .Cfg .ServerURLWithContext (ctx , "v2.CloudCostManagementApi.ListCustomCostsFiles" )
10721118 if err != nil {
10731119 return localVarReturnValue , nil , datadog.GenericOpenAPIError {ErrorMessage : err .Error ()}
@@ -1078,6 +1124,18 @@ func (a *CloudCostManagementApi) ListCustomCostsFiles(ctx _context.Context) (Cus
10781124 localVarHeaderParams := make (map [string ]string )
10791125 localVarQueryParams := _neturl.Values {}
10801126 localVarFormParams := _neturl.Values {}
1127+ if optionalParams .PageNumber != nil {
1128+ localVarQueryParams .Add ("page[number]" , datadog .ParameterToString (* optionalParams .PageNumber , "" ))
1129+ }
1130+ if optionalParams .PageSize != nil {
1131+ localVarQueryParams .Add ("page[size]" , datadog .ParameterToString (* optionalParams .PageSize , "" ))
1132+ }
1133+ if optionalParams .FilterStatus != nil {
1134+ localVarQueryParams .Add ("filter[status]" , datadog .ParameterToString (* optionalParams .FilterStatus , "" ))
1135+ }
1136+ if optionalParams .Sort != nil {
1137+ localVarQueryParams .Add ("sort" , datadog .ParameterToString (* optionalParams .Sort , "" ))
1138+ }
10811139 localVarHeaderParams ["Accept" ] = "application/json"
10821140
10831141 if a .Client .Cfg .DelegatedTokenConfig != nil {
@@ -1113,7 +1171,7 @@ func (a *CloudCostManagementApi) ListCustomCostsFiles(ctx _context.Context) (Cus
11131171 ErrorBody : localVarBody ,
11141172 ErrorMessage : localVarHTTPResponse .Status ,
11151173 }
1116- if localVarHTTPResponse .StatusCode == 403 || localVarHTTPResponse .StatusCode == 429 {
1174+ if localVarHTTPResponse .StatusCode == 400 || localVarHTTPResponse . StatusCode == 403 || localVarHTTPResponse .StatusCode == 429 {
11171175 var v APIErrorResponse
11181176 err = a .Client .Decode (& v , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
11191177 if err != nil {
@@ -1138,7 +1196,7 @@ func (a *CloudCostManagementApi) ListCustomCostsFiles(ctx _context.Context) (Cus
11381196
11391197// UpdateCostAWSCURConfig Update Cloud Cost Management AWS CUR config.
11401198// Update the status (active/archived) and/or account filtering configuration of an AWS CUR config.
1141- func (a * CloudCostManagementApi ) UpdateCostAWSCURConfig (ctx _context.Context , cloudAccountId string , body AwsCURConfigPatchRequest ) (AwsCURConfigsResponse , * _nethttp.Response , error ) {
1199+ func (a * CloudCostManagementApi ) UpdateCostAWSCURConfig (ctx _context.Context , cloudAccountId int64 , body AwsCURConfigPatchRequest ) (AwsCURConfigsResponse , * _nethttp.Response , error ) {
11421200 var (
11431201 localVarHTTPMethod = _nethttp .MethodPatch
11441202 localVarPostBody interface {}
@@ -1219,7 +1277,7 @@ func (a *CloudCostManagementApi) UpdateCostAWSCURConfig(ctx _context.Context, cl
12191277
12201278// UpdateCostAzureUCConfigs Update Cloud Cost Management Azure config.
12211279// Update the status of an Azure config (active/archived).
1222- func (a * CloudCostManagementApi ) UpdateCostAzureUCConfigs (ctx _context.Context , cloudAccountId string , body AzureUCConfigPatchRequest ) (AzureUCConfigPairsResponse , * _nethttp.Response , error ) {
1280+ func (a * CloudCostManagementApi ) UpdateCostAzureUCConfigs (ctx _context.Context , cloudAccountId int64 , body AzureUCConfigPatchRequest ) (AzureUCConfigPairsResponse , * _nethttp.Response , error ) {
12231281 var (
12241282 localVarHTTPMethod = _nethttp .MethodPatch
12251283 localVarPostBody interface {}
@@ -1300,7 +1358,7 @@ func (a *CloudCostManagementApi) UpdateCostAzureUCConfigs(ctx _context.Context,
13001358
13011359// UpdateCostGCPUsageCostConfig Update Cloud Cost Management GCP Usage Cost config.
13021360// Update the status of an GCP Usage Cost config (active/archived).
1303- func (a * CloudCostManagementApi ) UpdateCostGCPUsageCostConfig (ctx _context.Context , cloudAccountId string , body GCPUsageCostConfigPatchRequest ) (GCPUsageCostConfigResponse , * _nethttp.Response , error ) {
1361+ func (a * CloudCostManagementApi ) UpdateCostGCPUsageCostConfig (ctx _context.Context , cloudAccountId int64 , body GCPUsageCostConfigPatchRequest ) (GCPUsageCostConfigResponse , * _nethttp.Response , error ) {
13041362 var (
13051363 localVarHTTPMethod = _nethttp .MethodPatch
13061364 localVarPostBody interface {}
@@ -1436,7 +1494,7 @@ func (a *CloudCostManagementApi) UploadCustomCostsFile(ctx _context.Context, bod
14361494 ErrorBody : localVarBody ,
14371495 ErrorMessage : localVarHTTPResponse .Status ,
14381496 }
1439- if localVarHTTPResponse .StatusCode == 403 || localVarHTTPResponse .StatusCode == 429 {
1497+ if localVarHTTPResponse .StatusCode == 400 || localVarHTTPResponse . StatusCode == 403 || localVarHTTPResponse .StatusCode == 429 {
14401498 var v APIErrorResponse
14411499 err = a .Client .Decode (& v , localVarBody , localVarHTTPResponse .Header .Get ("Content-Type" ))
14421500 if err != nil {
0 commit comments