@@ -10,34 +10,34 @@ const (
10
10
)
11
11
12
12
const (
13
- SortTypeName string = "NAME"
14
- SortTypeLastEdit string = "LAST_EDIT"
13
+ SortTypeName string = "NAME"
14
+ SortTypeLastEdit string = "LAST_EDIT"
15
15
)
16
16
17
17
const (
18
- SortOrderAsc string = "ASCENDING"
19
- SortOrderDesc string = "DESCENDING"
18
+ SortOrderAsc string = "ASCENDING"
19
+ SortOrderDesc string = "DESCENDING"
20
20
)
21
21
22
22
// CCMBaseResponse represents a basic ccm response.
23
23
type CCMBaseResponse struct {
24
- Status string `json:"state,omitempty"`
25
- Message string `json:"message,omitempty"`
26
- CorrelationID string `json:"correlation_id,omitempty"`
27
- Error [] CCMError `json:"error,omitempty"`
24
+ Status string `json:"state,omitempty"`
25
+ Message string `json:"message,omitempty"`
26
+ CorrelationID string `json:"correlation_id,omitempty"`
27
+ Error [] CCMError `json:"error,omitempty"`
28
28
}
29
29
30
30
// Response error
31
31
type CCMError struct {
32
- FieldId string `json:"fieldId,omitempty"`
33
- Error string `json:"error,omitempty"`
32
+ FieldId string `json:"fieldId,omitempty"`
33
+ Error string `json:"error,omitempty"`
34
34
}
35
35
36
36
// CEView represents a basic Cost Overview response.
37
37
// The `data` field contains the response data.
38
38
type CEView struct {
39
39
CCMBaseResponse
40
- Data CCMOverview `json:"data,omitempty"`
40
+ Data CCMOverview `json:"data,omitempty"`
41
41
}
42
42
43
43
// CCMOverview represents the Overview data from a CCM Overview
@@ -74,8 +74,8 @@ type CCMReference struct {
74
74
// CcmCostCategoriesOptions represents options for listing cost categories
75
75
type CCMListCostCategoriesOptions struct {
76
76
AccountIdentifier string `json:"accountIdentifier,omitempty"`
77
- CostCategory string `json:"costCategory,omitempty"`
78
- SearchTerm string `json:"search,omitempty"`
77
+ CostCategory string `json:"costCategory,omitempty"`
78
+ SearchTerm string `json:"search,omitempty"`
79
79
}
80
80
81
81
// CcmCostCategoryList represents a list of cost categories in CCM
@@ -89,22 +89,22 @@ type CCMCostCategoryList struct {
89
89
// ***************************
90
90
91
91
type CCMPaginationOptions struct {
92
- Limit int32 `json:"limit,omitempty"`
93
- Offset int32 `json:"offset,omitempty"`
92
+ Limit int32 `json:"limit,omitempty"`
93
+ Offset int32 `json:"offset,omitempty"`
94
94
}
95
95
96
96
type CCMListCostCategoriesDetailOptions struct {
97
97
AccountIdentifier string `json:"accountIdentifier,omitempty"`
98
98
SearchKey string `json:"searchKey,omitempty"`
99
- SortType string `json:"sortType,omitempty"` // Enum: "NAME", "LAST_EDIT"
99
+ SortType string `json:"sortType,omitempty"` // Enum: "NAME", "LAST_EDIT"
100
100
SortOrder string `json:"sortOrder,omitempty"` // Enum: "ASCENDING", "DESCENDING"
101
101
CCMPaginationOptions
102
102
}
103
103
104
104
type CCMCostCategoryDetailList struct {
105
- MetaData map [string ]interface {} `json:"metaData"`
106
- Resource CCMCostCategoryResource `json:"resource"`
107
- ResponseMessages []CCMResponseMessage `json:"responseMessages"`
105
+ MetaData map [string ]interface {} `json:"metaData"`
106
+ Resource CCMCostCategoryResource `json:"resource"`
107
+ ResponseMessages []CCMResponseMessage `json:"responseMessages"`
108
108
}
109
109
110
110
type CCMCostCategoryResource struct {
@@ -113,29 +113,29 @@ type CCMCostCategoryResource struct {
113
113
}
114
114
115
115
type CCMBusinessMapping struct {
116
- UUID string `json:"uuid"`
117
- Name string `json:"name"`
118
- AccountID string `json:"accountId"`
119
- CostTargets []CCMCostTarget `json:"costTargets"`
120
- SharedCosts []CCMSharedCost `json:"sharedCosts"`
116
+ UUID string `json:"uuid"`
117
+ Name string `json:"name"`
118
+ AccountID string `json:"accountId"`
119
+ CostTargets []CCMCostTarget `json:"costTargets"`
120
+ SharedCosts []CCMSharedCost `json:"sharedCosts"`
121
121
UnallocatedCost CCMUnallocatedCost `json:"unallocatedCost"`
122
- DataSources []string `json:"dataSources"`
123
- CreatedAt int64 `json:"createdAt"`
124
- LastUpdatedAt int64 `json:"lastUpdatedAt"`
125
- CreatedBy CCMUser `json:"createdBy"`
126
- LastUpdatedBy CCMUser `json:"lastUpdatedBy"`
122
+ DataSources []string `json:"dataSources"`
123
+ CreatedAt int64 `json:"createdAt"`
124
+ LastUpdatedAt int64 `json:"lastUpdatedAt"`
125
+ CreatedBy CCMUser `json:"createdBy"`
126
+ LastUpdatedBy CCMUser `json:"lastUpdatedBy"`
127
127
}
128
128
129
129
type CCMCostTarget struct {
130
- Name string `json:"name"`
131
- Rules []CCMRule `json:"rules"`
130
+ Name string `json:"name"`
131
+ Rules []CCMRule `json:"rules"`
132
132
}
133
133
134
134
type CCMSharedCost struct {
135
- Name string `json:"name"`
136
- Rules []CCMRule `json:"rules"`
137
- Strategy string `json:"strategy"`
138
- Splits []CCMSplit `json:"splits"`
135
+ Name string `json:"name"`
136
+ Rules []CCMRule `json:"rules"`
137
+ Strategy string `json:"strategy"`
138
+ Splits []CCMSplit `json:"splits"`
139
139
}
140
140
141
141
type CCMUnallocatedCost struct {
@@ -146,7 +146,7 @@ type CCMUnallocatedCost struct {
146
146
}
147
147
148
148
type CCMSplit struct {
149
- CostTargetName * string `json:"costTargetName"`
149
+ CostTargetName * string `json:"costTargetName"`
150
150
PercentageContribution * float64 `json:"percentageContribution"`
151
151
}
152
152
@@ -162,12 +162,12 @@ type CCMUser struct {
162
162
}
163
163
164
164
type CCMResponseMessage struct {
165
- Code string `json:"code"`
166
- Level string `json:"level"`
167
- Message string `json:"message"`
168
- Exception * CCMException `json:"exception"`
169
- FailureTypes []string `json:"failureTypes"`
170
- AdditionalInfo map [string ]string `json:"additionalInfo"`
165
+ Code string `json:"code"`
166
+ Level string `json:"level"`
167
+ Message string `json:"message"`
168
+ Exception * CCMException `json:"exception"`
169
+ FailureTypes []string `json:"failureTypes"`
170
+ AdditionalInfo map [string ]string `json:"additionalInfo"`
171
171
}
172
172
173
173
type CCMException struct {
@@ -196,13 +196,13 @@ type CCMSuppressed struct {
196
196
197
197
// CCMCostCategory represents the details of a cost category in CCM
198
198
type CCMCostCategory struct {
199
- MetaData map [string ]interface {} `json:"metaData"`
200
- Resource CCMBusinessMapping `json:"resource"`
201
- ResponseMessages []CCMResponseMessage `json:"responseMessages"`
199
+ MetaData map [string ]interface {} `json:"metaData"`
200
+ Resource CCMBusinessMapping `json:"resource"`
201
+ ResponseMessages []CCMResponseMessage `json:"responseMessages"`
202
202
}
203
203
204
204
// CCMGetCostCategoryOptions represents options for listing cost categories
205
205
type CCMGetCostCategoryOptions struct {
206
206
AccountIdentifier string `json:"accountIdentifier,omitempty"`
207
- CostCategoryId string `json:"id,omitempty"`
207
+ CostCategoryId string `json:"id,omitempty"`
208
208
}
0 commit comments