messages.pb.go 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.9
  4. // protoc v6.32.1
  5. // source: customcost/messages.proto
  6. package pb
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. durationpb "google.golang.org/protobuf/types/known/durationpb"
  11. timestamppb "google.golang.org/protobuf/types/known/timestamppb"
  12. reflect "reflect"
  13. sync "sync"
  14. unsafe "unsafe"
  15. )
  16. const (
  17. // Verify that this generated code is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  19. // Verify that runtime/protoimpl is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  21. )
  22. type CustomCostRequest struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. // the window of the returned objects
  25. Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
  26. End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
  27. // resolution of steps to return
  28. Resolution *durationpb.Duration `protobuf:"bytes,3,opt,name=resolution,proto3" json:"resolution,omitempty"`
  29. unknownFields protoimpl.UnknownFields
  30. sizeCache protoimpl.SizeCache
  31. }
  32. func (x *CustomCostRequest) Reset() {
  33. *x = CustomCostRequest{}
  34. mi := &file_customcost_messages_proto_msgTypes[0]
  35. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  36. ms.StoreMessageInfo(mi)
  37. }
  38. func (x *CustomCostRequest) String() string {
  39. return protoimpl.X.MessageStringOf(x)
  40. }
  41. func (*CustomCostRequest) ProtoMessage() {}
  42. func (x *CustomCostRequest) ProtoReflect() protoreflect.Message {
  43. mi := &file_customcost_messages_proto_msgTypes[0]
  44. if x != nil {
  45. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  46. if ms.LoadMessageInfo() == nil {
  47. ms.StoreMessageInfo(mi)
  48. }
  49. return ms
  50. }
  51. return mi.MessageOf(x)
  52. }
  53. // Deprecated: Use CustomCostRequest.ProtoReflect.Descriptor instead.
  54. func (*CustomCostRequest) Descriptor() ([]byte, []int) {
  55. return file_customcost_messages_proto_rawDescGZIP(), []int{0}
  56. }
  57. func (x *CustomCostRequest) GetStart() *timestamppb.Timestamp {
  58. if x != nil {
  59. return x.Start
  60. }
  61. return nil
  62. }
  63. func (x *CustomCostRequest) GetEnd() *timestamppb.Timestamp {
  64. if x != nil {
  65. return x.End
  66. }
  67. return nil
  68. }
  69. func (x *CustomCostRequest) GetResolution() *durationpb.Duration {
  70. if x != nil {
  71. return x.Resolution
  72. }
  73. return nil
  74. }
  75. type CustomCostResponseSet struct {
  76. state protoimpl.MessageState `protogen:"open.v1"`
  77. Resps []*CustomCostResponse `protobuf:"bytes,1,rep,name=resps,proto3" json:"resps,omitempty"`
  78. unknownFields protoimpl.UnknownFields
  79. sizeCache protoimpl.SizeCache
  80. }
  81. func (x *CustomCostResponseSet) Reset() {
  82. *x = CustomCostResponseSet{}
  83. mi := &file_customcost_messages_proto_msgTypes[1]
  84. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  85. ms.StoreMessageInfo(mi)
  86. }
  87. func (x *CustomCostResponseSet) String() string {
  88. return protoimpl.X.MessageStringOf(x)
  89. }
  90. func (*CustomCostResponseSet) ProtoMessage() {}
  91. func (x *CustomCostResponseSet) ProtoReflect() protoreflect.Message {
  92. mi := &file_customcost_messages_proto_msgTypes[1]
  93. if x != nil {
  94. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  95. if ms.LoadMessageInfo() == nil {
  96. ms.StoreMessageInfo(mi)
  97. }
  98. return ms
  99. }
  100. return mi.MessageOf(x)
  101. }
  102. // Deprecated: Use CustomCostResponseSet.ProtoReflect.Descriptor instead.
  103. func (*CustomCostResponseSet) Descriptor() ([]byte, []int) {
  104. return file_customcost_messages_proto_rawDescGZIP(), []int{1}
  105. }
  106. func (x *CustomCostResponseSet) GetResps() []*CustomCostResponse {
  107. if x != nil {
  108. return x.Resps
  109. }
  110. return nil
  111. }
  112. type CustomCostResponse struct {
  113. state protoimpl.MessageState `protogen:"open.v1"`
  114. // provides metadata on the Custom CostResponse
  115. // deliberately left unstructured
  116. Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  117. // declared by plugin
  118. // eg snowflake == "data management",
  119. // datadog == "observability" etc
  120. // intended for top level agg
  121. CostSource string `protobuf:"bytes,2,opt,name=cost_source,json=costSource,proto3" json:"cost_source,omitempty"`
  122. // the name of the custom cost source
  123. // e.g., "datadog"
  124. Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
  125. // the version of the Custom Cost response
  126. // is set by the plugin, will vary between
  127. // different plugins
  128. Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
  129. // FOCUS billing currency
  130. Currency string `protobuf:"bytes,5,opt,name=currency,proto3" json:"currency,omitempty"`
  131. // the window of the returned objects
  132. Start *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=start,proto3" json:"start,omitempty"`
  133. End *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=end,proto3" json:"end,omitempty"`
  134. // array of CustomCosts
  135. Costs []*CustomCost `protobuf:"bytes,8,rep,name=costs,proto3" json:"costs,omitempty"`
  136. // any errors in processing
  137. Errors []string `protobuf:"bytes,9,rep,name=errors,proto3" json:"errors,omitempty"`
  138. unknownFields protoimpl.UnknownFields
  139. sizeCache protoimpl.SizeCache
  140. }
  141. func (x *CustomCostResponse) Reset() {
  142. *x = CustomCostResponse{}
  143. mi := &file_customcost_messages_proto_msgTypes[2]
  144. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  145. ms.StoreMessageInfo(mi)
  146. }
  147. func (x *CustomCostResponse) String() string {
  148. return protoimpl.X.MessageStringOf(x)
  149. }
  150. func (*CustomCostResponse) ProtoMessage() {}
  151. func (x *CustomCostResponse) ProtoReflect() protoreflect.Message {
  152. mi := &file_customcost_messages_proto_msgTypes[2]
  153. if x != nil {
  154. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  155. if ms.LoadMessageInfo() == nil {
  156. ms.StoreMessageInfo(mi)
  157. }
  158. return ms
  159. }
  160. return mi.MessageOf(x)
  161. }
  162. // Deprecated: Use CustomCostResponse.ProtoReflect.Descriptor instead.
  163. func (*CustomCostResponse) Descriptor() ([]byte, []int) {
  164. return file_customcost_messages_proto_rawDescGZIP(), []int{2}
  165. }
  166. func (x *CustomCostResponse) GetMetadata() map[string]string {
  167. if x != nil {
  168. return x.Metadata
  169. }
  170. return nil
  171. }
  172. func (x *CustomCostResponse) GetCostSource() string {
  173. if x != nil {
  174. return x.CostSource
  175. }
  176. return ""
  177. }
  178. func (x *CustomCostResponse) GetDomain() string {
  179. if x != nil {
  180. return x.Domain
  181. }
  182. return ""
  183. }
  184. func (x *CustomCostResponse) GetVersion() string {
  185. if x != nil {
  186. return x.Version
  187. }
  188. return ""
  189. }
  190. func (x *CustomCostResponse) GetCurrency() string {
  191. if x != nil {
  192. return x.Currency
  193. }
  194. return ""
  195. }
  196. func (x *CustomCostResponse) GetStart() *timestamppb.Timestamp {
  197. if x != nil {
  198. return x.Start
  199. }
  200. return nil
  201. }
  202. func (x *CustomCostResponse) GetEnd() *timestamppb.Timestamp {
  203. if x != nil {
  204. return x.End
  205. }
  206. return nil
  207. }
  208. func (x *CustomCostResponse) GetCosts() []*CustomCost {
  209. if x != nil {
  210. return x.Costs
  211. }
  212. return nil
  213. }
  214. func (x *CustomCostResponse) GetErrors() []string {
  215. if x != nil {
  216. return x.Errors
  217. }
  218. return nil
  219. }
  220. type CustomCost struct {
  221. state protoimpl.MessageState `protogen:"open.v1"`
  222. // provides metadata on the Custom CostResponse
  223. // deliberately left unstructured
  224. Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  225. // the region that the resource was incurred
  226. // corresponds to 'availability zone' of FOCUS
  227. Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"`
  228. // FOCUS billing account name
  229. AccountName string `protobuf:"bytes,3,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
  230. // FOCUS charge category
  231. ChargeCategory string `protobuf:"bytes,4,opt,name=charge_category,json=chargeCategory,proto3" json:"charge_category,omitempty"`
  232. // FOCUS charge description
  233. Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
  234. // FOCUS Resource Name
  235. ResourceName string `protobuf:"bytes,6,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
  236. // FOCUS Resource type
  237. // if not set, assumed to be domain
  238. ResourceType string `protobuf:"bytes,7,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
  239. // ID of the individual cost. should be globally
  240. // unique. Assigned by plugin on read
  241. Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"`
  242. // the provider's ID for the cost, if
  243. // available
  244. // FOCUS resource ID
  245. ProviderId string `protobuf:"bytes,9,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
  246. // FOCUS billed Cost
  247. BilledCost float32 `protobuf:"fixed32,10,opt,name=billed_cost,json=billedCost,proto3" json:"billed_cost,omitempty"`
  248. // FOCUS List Cost
  249. ListCost float32 `protobuf:"fixed32,11,opt,name=list_cost,json=listCost,proto3" json:"list_cost,omitempty"`
  250. // FOCUS List Unit Price
  251. ListUnitPrice float32 `protobuf:"fixed32,12,opt,name=list_unit_price,json=listUnitPrice,proto3" json:"list_unit_price,omitempty"`
  252. // FOCUS usage quantity
  253. UsageQuantity float32 `protobuf:"fixed32,13,opt,name=usage_quantity,json=usageQuantity,proto3" json:"usage_quantity,omitempty"`
  254. // FOCUS usage Unit
  255. UsageUnit string `protobuf:"bytes,14,opt,name=usage_unit,json=usageUnit,proto3" json:"usage_unit,omitempty"`
  256. // Returns key/value sets of labels
  257. // equivalent to Tags in focus spec
  258. Labels map[string]string `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  259. // Optional struct to implement other focus
  260. // spec attributes
  261. ExtendedAttributes *CustomCostExtendedAttributes `protobuf:"bytes,16,opt,name=extended_attributes,json=extendedAttributes,proto3,oneof" json:"extended_attributes,omitempty"`
  262. unknownFields protoimpl.UnknownFields
  263. sizeCache protoimpl.SizeCache
  264. }
  265. func (x *CustomCost) Reset() {
  266. *x = CustomCost{}
  267. mi := &file_customcost_messages_proto_msgTypes[3]
  268. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  269. ms.StoreMessageInfo(mi)
  270. }
  271. func (x *CustomCost) String() string {
  272. return protoimpl.X.MessageStringOf(x)
  273. }
  274. func (*CustomCost) ProtoMessage() {}
  275. func (x *CustomCost) ProtoReflect() protoreflect.Message {
  276. mi := &file_customcost_messages_proto_msgTypes[3]
  277. if x != nil {
  278. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  279. if ms.LoadMessageInfo() == nil {
  280. ms.StoreMessageInfo(mi)
  281. }
  282. return ms
  283. }
  284. return mi.MessageOf(x)
  285. }
  286. // Deprecated: Use CustomCost.ProtoReflect.Descriptor instead.
  287. func (*CustomCost) Descriptor() ([]byte, []int) {
  288. return file_customcost_messages_proto_rawDescGZIP(), []int{3}
  289. }
  290. func (x *CustomCost) GetMetadata() map[string]string {
  291. if x != nil {
  292. return x.Metadata
  293. }
  294. return nil
  295. }
  296. func (x *CustomCost) GetZone() string {
  297. if x != nil {
  298. return x.Zone
  299. }
  300. return ""
  301. }
  302. func (x *CustomCost) GetAccountName() string {
  303. if x != nil {
  304. return x.AccountName
  305. }
  306. return ""
  307. }
  308. func (x *CustomCost) GetChargeCategory() string {
  309. if x != nil {
  310. return x.ChargeCategory
  311. }
  312. return ""
  313. }
  314. func (x *CustomCost) GetDescription() string {
  315. if x != nil {
  316. return x.Description
  317. }
  318. return ""
  319. }
  320. func (x *CustomCost) GetResourceName() string {
  321. if x != nil {
  322. return x.ResourceName
  323. }
  324. return ""
  325. }
  326. func (x *CustomCost) GetResourceType() string {
  327. if x != nil {
  328. return x.ResourceType
  329. }
  330. return ""
  331. }
  332. func (x *CustomCost) GetId() string {
  333. if x != nil {
  334. return x.Id
  335. }
  336. return ""
  337. }
  338. func (x *CustomCost) GetProviderId() string {
  339. if x != nil {
  340. return x.ProviderId
  341. }
  342. return ""
  343. }
  344. func (x *CustomCost) GetBilledCost() float32 {
  345. if x != nil {
  346. return x.BilledCost
  347. }
  348. return 0
  349. }
  350. func (x *CustomCost) GetListCost() float32 {
  351. if x != nil {
  352. return x.ListCost
  353. }
  354. return 0
  355. }
  356. func (x *CustomCost) GetListUnitPrice() float32 {
  357. if x != nil {
  358. return x.ListUnitPrice
  359. }
  360. return 0
  361. }
  362. func (x *CustomCost) GetUsageQuantity() float32 {
  363. if x != nil {
  364. return x.UsageQuantity
  365. }
  366. return 0
  367. }
  368. func (x *CustomCost) GetUsageUnit() string {
  369. if x != nil {
  370. return x.UsageUnit
  371. }
  372. return ""
  373. }
  374. func (x *CustomCost) GetLabels() map[string]string {
  375. if x != nil {
  376. return x.Labels
  377. }
  378. return nil
  379. }
  380. func (x *CustomCost) GetExtendedAttributes() *CustomCostExtendedAttributes {
  381. if x != nil {
  382. return x.ExtendedAttributes
  383. }
  384. return nil
  385. }
  386. type CustomCostExtendedAttributes struct {
  387. state protoimpl.MessageState `protogen:"open.v1"`
  388. // FOCUS billing period start
  389. BillingPeriodStart *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=billing_period_start,json=billingPeriodStart,proto3,oneof" json:"billing_period_start,omitempty"`
  390. // FOCUS billing period end
  391. BillingPeriodEnd *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=billing_period_end,json=billingPeriodEnd,proto3,oneof" json:"billing_period_end,omitempty"`
  392. // FOCUS Billing Account ID
  393. AccountId *string `protobuf:"bytes,3,opt,name=account_id,json=accountId,proto3,oneof" json:"account_id,omitempty"`
  394. // FOCUS Charge Frequency
  395. ChargeFrequency *string `protobuf:"bytes,4,opt,name=charge_frequency,json=chargeFrequency,proto3,oneof" json:"charge_frequency,omitempty"`
  396. // FOCUS Charge Subcategory
  397. Subcategory *string `protobuf:"bytes,5,opt,name=subcategory,proto3,oneof" json:"subcategory,omitempty"`
  398. // FOCUS Commitment Discount Category
  399. CommitmentDiscountCategory *string `protobuf:"bytes,6,opt,name=commitment_discount_category,json=commitmentDiscountCategory,proto3,oneof" json:"commitment_discount_category,omitempty"`
  400. // FOCUS Commitment Discount ID
  401. CommitmentDiscountId *string `protobuf:"bytes,7,opt,name=commitment_discount_id,json=commitmentDiscountId,proto3,oneof" json:"commitment_discount_id,omitempty"`
  402. // FOCUS Commitment Discount Name
  403. CommitmentDiscountName *string `protobuf:"bytes,8,opt,name=commitment_discount_name,json=commitmentDiscountName,proto3,oneof" json:"commitment_discount_name,omitempty"`
  404. // FOCUS Commitment Discount Type
  405. CommitmentDiscountType *string `protobuf:"bytes,9,opt,name=commitment_discount_type,json=commitmentDiscountType,proto3,oneof" json:"commitment_discount_type,omitempty"`
  406. // FOCUS Effective Cost
  407. EffectiveCost *float32 `protobuf:"fixed32,10,opt,name=effective_cost,json=effectiveCost,proto3,oneof" json:"effective_cost,omitempty"`
  408. // FOCUS Invoice Issuer
  409. InvoiceIssuer *string `protobuf:"bytes,11,opt,name=invoice_issuer,json=invoiceIssuer,proto3,oneof" json:"invoice_issuer,omitempty"`
  410. // FOCUS Provider
  411. // if unset, assumed to be domain
  412. Provider *string `protobuf:"bytes,12,opt,name=provider,proto3,oneof" json:"provider,omitempty"`
  413. // FOCUS Publisher
  414. // if unset, assumed to be domain
  415. Publisher *string `protobuf:"bytes,13,opt,name=publisher,proto3,oneof" json:"publisher,omitempty"`
  416. // FOCUS Service Category
  417. // if unset, assumed to be cost source
  418. ServiceCategory *string `protobuf:"bytes,14,opt,name=service_category,json=serviceCategory,proto3,oneof" json:"service_category,omitempty"`
  419. // FOCUS Service Name
  420. // if unset, assumed to be cost source
  421. ServiceName *string `protobuf:"bytes,15,opt,name=service_name,json=serviceName,proto3,oneof" json:"service_name,omitempty"`
  422. // FOCUS SKU ID
  423. SkuId *string `protobuf:"bytes,16,opt,name=sku_id,json=skuId,proto3,oneof" json:"sku_id,omitempty"`
  424. // FOCUS SKU Price ID
  425. SkuPriceId *string `protobuf:"bytes,17,opt,name=sku_price_id,json=skuPriceId,proto3,oneof" json:"sku_price_id,omitempty"`
  426. // FOCUS Sub Account ID
  427. SubAccountId *string `protobuf:"bytes,18,opt,name=sub_account_id,json=subAccountId,proto3,oneof" json:"sub_account_id,omitempty"`
  428. // FOCUS Sub Account Name
  429. SubAccountName *string `protobuf:"bytes,19,opt,name=sub_account_name,json=subAccountName,proto3,oneof" json:"sub_account_name,omitempty"`
  430. // FOCUS Pricing Quantity
  431. PricingQuantity *float32 `protobuf:"fixed32,20,opt,name=pricing_quantity,json=pricingQuantity,proto3,oneof" json:"pricing_quantity,omitempty"`
  432. // FOCUS Pricing Unit
  433. PricingUnit *string `protobuf:"bytes,21,opt,name=pricing_unit,json=pricingUnit,proto3,oneof" json:"pricing_unit,omitempty"`
  434. // FOCUS Pricing Category
  435. PricingCategory *string `protobuf:"bytes,22,opt,name=pricing_category,json=pricingCategory,proto3,oneof" json:"pricing_category,omitempty"`
  436. unknownFields protoimpl.UnknownFields
  437. sizeCache protoimpl.SizeCache
  438. }
  439. func (x *CustomCostExtendedAttributes) Reset() {
  440. *x = CustomCostExtendedAttributes{}
  441. mi := &file_customcost_messages_proto_msgTypes[4]
  442. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  443. ms.StoreMessageInfo(mi)
  444. }
  445. func (x *CustomCostExtendedAttributes) String() string {
  446. return protoimpl.X.MessageStringOf(x)
  447. }
  448. func (*CustomCostExtendedAttributes) ProtoMessage() {}
  449. func (x *CustomCostExtendedAttributes) ProtoReflect() protoreflect.Message {
  450. mi := &file_customcost_messages_proto_msgTypes[4]
  451. if x != nil {
  452. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  453. if ms.LoadMessageInfo() == nil {
  454. ms.StoreMessageInfo(mi)
  455. }
  456. return ms
  457. }
  458. return mi.MessageOf(x)
  459. }
  460. // Deprecated: Use CustomCostExtendedAttributes.ProtoReflect.Descriptor instead.
  461. func (*CustomCostExtendedAttributes) Descriptor() ([]byte, []int) {
  462. return file_customcost_messages_proto_rawDescGZIP(), []int{4}
  463. }
  464. func (x *CustomCostExtendedAttributes) GetBillingPeriodStart() *timestamppb.Timestamp {
  465. if x != nil {
  466. return x.BillingPeriodStart
  467. }
  468. return nil
  469. }
  470. func (x *CustomCostExtendedAttributes) GetBillingPeriodEnd() *timestamppb.Timestamp {
  471. if x != nil {
  472. return x.BillingPeriodEnd
  473. }
  474. return nil
  475. }
  476. func (x *CustomCostExtendedAttributes) GetAccountId() string {
  477. if x != nil && x.AccountId != nil {
  478. return *x.AccountId
  479. }
  480. return ""
  481. }
  482. func (x *CustomCostExtendedAttributes) GetChargeFrequency() string {
  483. if x != nil && x.ChargeFrequency != nil {
  484. return *x.ChargeFrequency
  485. }
  486. return ""
  487. }
  488. func (x *CustomCostExtendedAttributes) GetSubcategory() string {
  489. if x != nil && x.Subcategory != nil {
  490. return *x.Subcategory
  491. }
  492. return ""
  493. }
  494. func (x *CustomCostExtendedAttributes) GetCommitmentDiscountCategory() string {
  495. if x != nil && x.CommitmentDiscountCategory != nil {
  496. return *x.CommitmentDiscountCategory
  497. }
  498. return ""
  499. }
  500. func (x *CustomCostExtendedAttributes) GetCommitmentDiscountId() string {
  501. if x != nil && x.CommitmentDiscountId != nil {
  502. return *x.CommitmentDiscountId
  503. }
  504. return ""
  505. }
  506. func (x *CustomCostExtendedAttributes) GetCommitmentDiscountName() string {
  507. if x != nil && x.CommitmentDiscountName != nil {
  508. return *x.CommitmentDiscountName
  509. }
  510. return ""
  511. }
  512. func (x *CustomCostExtendedAttributes) GetCommitmentDiscountType() string {
  513. if x != nil && x.CommitmentDiscountType != nil {
  514. return *x.CommitmentDiscountType
  515. }
  516. return ""
  517. }
  518. func (x *CustomCostExtendedAttributes) GetEffectiveCost() float32 {
  519. if x != nil && x.EffectiveCost != nil {
  520. return *x.EffectiveCost
  521. }
  522. return 0
  523. }
  524. func (x *CustomCostExtendedAttributes) GetInvoiceIssuer() string {
  525. if x != nil && x.InvoiceIssuer != nil {
  526. return *x.InvoiceIssuer
  527. }
  528. return ""
  529. }
  530. func (x *CustomCostExtendedAttributes) GetProvider() string {
  531. if x != nil && x.Provider != nil {
  532. return *x.Provider
  533. }
  534. return ""
  535. }
  536. func (x *CustomCostExtendedAttributes) GetPublisher() string {
  537. if x != nil && x.Publisher != nil {
  538. return *x.Publisher
  539. }
  540. return ""
  541. }
  542. func (x *CustomCostExtendedAttributes) GetServiceCategory() string {
  543. if x != nil && x.ServiceCategory != nil {
  544. return *x.ServiceCategory
  545. }
  546. return ""
  547. }
  548. func (x *CustomCostExtendedAttributes) GetServiceName() string {
  549. if x != nil && x.ServiceName != nil {
  550. return *x.ServiceName
  551. }
  552. return ""
  553. }
  554. func (x *CustomCostExtendedAttributes) GetSkuId() string {
  555. if x != nil && x.SkuId != nil {
  556. return *x.SkuId
  557. }
  558. return ""
  559. }
  560. func (x *CustomCostExtendedAttributes) GetSkuPriceId() string {
  561. if x != nil && x.SkuPriceId != nil {
  562. return *x.SkuPriceId
  563. }
  564. return ""
  565. }
  566. func (x *CustomCostExtendedAttributes) GetSubAccountId() string {
  567. if x != nil && x.SubAccountId != nil {
  568. return *x.SubAccountId
  569. }
  570. return ""
  571. }
  572. func (x *CustomCostExtendedAttributes) GetSubAccountName() string {
  573. if x != nil && x.SubAccountName != nil {
  574. return *x.SubAccountName
  575. }
  576. return ""
  577. }
  578. func (x *CustomCostExtendedAttributes) GetPricingQuantity() float32 {
  579. if x != nil && x.PricingQuantity != nil {
  580. return *x.PricingQuantity
  581. }
  582. return 0
  583. }
  584. func (x *CustomCostExtendedAttributes) GetPricingUnit() string {
  585. if x != nil && x.PricingUnit != nil {
  586. return *x.PricingUnit
  587. }
  588. return ""
  589. }
  590. func (x *CustomCostExtendedAttributes) GetPricingCategory() string {
  591. if x != nil && x.PricingCategory != nil {
  592. return *x.PricingCategory
  593. }
  594. return ""
  595. }
  596. var File_customcost_messages_proto protoreflect.FileDescriptor
  597. const file_customcost_messages_proto_rawDesc = "" +
  598. "\n" +
  599. "\x19customcost/messages.proto\x12\x13customcost.messages\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\xae\x01\n" +
  600. "\x11CustomCostRequest\x120\n" +
  601. "\x05start\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x05start\x12,\n" +
  602. "\x03end\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x03end\x129\n" +
  603. "\n" +
  604. "resolution\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\n" +
  605. "resolution\"V\n" +
  606. "\x15CustomCostResponseSet\x12=\n" +
  607. "\x05resps\x18\x01 \x03(\v2'.customcost.messages.CustomCostResponseR\x05resps\"\xc2\x03\n" +
  608. "\x12CustomCostResponse\x12Q\n" +
  609. "\bmetadata\x18\x01 \x03(\v25.customcost.messages.CustomCostResponse.MetadataEntryR\bmetadata\x12\x1f\n" +
  610. "\vcost_source\x18\x02 \x01(\tR\n" +
  611. "costSource\x12\x16\n" +
  612. "\x06domain\x18\x03 \x01(\tR\x06domain\x12\x18\n" +
  613. "\aversion\x18\x04 \x01(\tR\aversion\x12\x1a\n" +
  614. "\bcurrency\x18\x05 \x01(\tR\bcurrency\x120\n" +
  615. "\x05start\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x05start\x12,\n" +
  616. "\x03end\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x03end\x125\n" +
  617. "\x05costs\x18\b \x03(\v2\x1f.customcost.messages.CustomCostR\x05costs\x12\x16\n" +
  618. "\x06errors\x18\t \x03(\tR\x06errors\x1a;\n" +
  619. "\rMetadataEntry\x12\x10\n" +
  620. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  621. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbe\x06\n" +
  622. "\n" +
  623. "CustomCost\x12I\n" +
  624. "\bmetadata\x18\x01 \x03(\v2-.customcost.messages.CustomCost.MetadataEntryR\bmetadata\x12\x12\n" +
  625. "\x04zone\x18\x02 \x01(\tR\x04zone\x12!\n" +
  626. "\faccount_name\x18\x03 \x01(\tR\vaccountName\x12'\n" +
  627. "\x0fcharge_category\x18\x04 \x01(\tR\x0echargeCategory\x12 \n" +
  628. "\vdescription\x18\x05 \x01(\tR\vdescription\x12#\n" +
  629. "\rresource_name\x18\x06 \x01(\tR\fresourceName\x12#\n" +
  630. "\rresource_type\x18\a \x01(\tR\fresourceType\x12\x0e\n" +
  631. "\x02id\x18\b \x01(\tR\x02id\x12\x1f\n" +
  632. "\vprovider_id\x18\t \x01(\tR\n" +
  633. "providerId\x12\x1f\n" +
  634. "\vbilled_cost\x18\n" +
  635. " \x01(\x02R\n" +
  636. "billedCost\x12\x1b\n" +
  637. "\tlist_cost\x18\v \x01(\x02R\blistCost\x12&\n" +
  638. "\x0flist_unit_price\x18\f \x01(\x02R\rlistUnitPrice\x12%\n" +
  639. "\x0eusage_quantity\x18\r \x01(\x02R\rusageQuantity\x12\x1d\n" +
  640. "\n" +
  641. "usage_unit\x18\x0e \x01(\tR\tusageUnit\x12C\n" +
  642. "\x06labels\x18\x0f \x03(\v2+.customcost.messages.CustomCost.LabelsEntryR\x06labels\x12g\n" +
  643. "\x13extended_attributes\x18\x10 \x01(\v21.customcost.messages.CustomCostExtendedAttributesH\x00R\x12extendedAttributes\x88\x01\x01\x1a;\n" +
  644. "\rMetadataEntry\x12\x10\n" +
  645. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  646. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a9\n" +
  647. "\vLabelsEntry\x12\x10\n" +
  648. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  649. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x16\n" +
  650. "\x14_extended_attributes\"\x94\f\n" +
  651. "\x1cCustomCostExtendedAttributes\x12Q\n" +
  652. "\x14billing_period_start\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x12billingPeriodStart\x88\x01\x01\x12M\n" +
  653. "\x12billing_period_end\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampH\x01R\x10billingPeriodEnd\x88\x01\x01\x12\"\n" +
  654. "\n" +
  655. "account_id\x18\x03 \x01(\tH\x02R\taccountId\x88\x01\x01\x12.\n" +
  656. "\x10charge_frequency\x18\x04 \x01(\tH\x03R\x0fchargeFrequency\x88\x01\x01\x12%\n" +
  657. "\vsubcategory\x18\x05 \x01(\tH\x04R\vsubcategory\x88\x01\x01\x12E\n" +
  658. "\x1ccommitment_discount_category\x18\x06 \x01(\tH\x05R\x1acommitmentDiscountCategory\x88\x01\x01\x129\n" +
  659. "\x16commitment_discount_id\x18\a \x01(\tH\x06R\x14commitmentDiscountId\x88\x01\x01\x12=\n" +
  660. "\x18commitment_discount_name\x18\b \x01(\tH\aR\x16commitmentDiscountName\x88\x01\x01\x12=\n" +
  661. "\x18commitment_discount_type\x18\t \x01(\tH\bR\x16commitmentDiscountType\x88\x01\x01\x12*\n" +
  662. "\x0eeffective_cost\x18\n" +
  663. " \x01(\x02H\tR\reffectiveCost\x88\x01\x01\x12*\n" +
  664. "\x0einvoice_issuer\x18\v \x01(\tH\n" +
  665. "R\rinvoiceIssuer\x88\x01\x01\x12\x1f\n" +
  666. "\bprovider\x18\f \x01(\tH\vR\bprovider\x88\x01\x01\x12!\n" +
  667. "\tpublisher\x18\r \x01(\tH\fR\tpublisher\x88\x01\x01\x12.\n" +
  668. "\x10service_category\x18\x0e \x01(\tH\rR\x0fserviceCategory\x88\x01\x01\x12&\n" +
  669. "\fservice_name\x18\x0f \x01(\tH\x0eR\vserviceName\x88\x01\x01\x12\x1a\n" +
  670. "\x06sku_id\x18\x10 \x01(\tH\x0fR\x05skuId\x88\x01\x01\x12%\n" +
  671. "\fsku_price_id\x18\x11 \x01(\tH\x10R\n" +
  672. "skuPriceId\x88\x01\x01\x12)\n" +
  673. "\x0esub_account_id\x18\x12 \x01(\tH\x11R\fsubAccountId\x88\x01\x01\x12-\n" +
  674. "\x10sub_account_name\x18\x13 \x01(\tH\x12R\x0esubAccountName\x88\x01\x01\x12.\n" +
  675. "\x10pricing_quantity\x18\x14 \x01(\x02H\x13R\x0fpricingQuantity\x88\x01\x01\x12&\n" +
  676. "\fpricing_unit\x18\x15 \x01(\tH\x14R\vpricingUnit\x88\x01\x01\x12.\n" +
  677. "\x10pricing_category\x18\x16 \x01(\tH\x15R\x0fpricingCategory\x88\x01\x01B\x17\n" +
  678. "\x15_billing_period_startB\x15\n" +
  679. "\x13_billing_period_endB\r\n" +
  680. "\v_account_idB\x13\n" +
  681. "\x11_charge_frequencyB\x0e\n" +
  682. "\f_subcategoryB\x1f\n" +
  683. "\x1d_commitment_discount_categoryB\x19\n" +
  684. "\x17_commitment_discount_idB\x1b\n" +
  685. "\x19_commitment_discount_nameB\x1b\n" +
  686. "\x19_commitment_discount_typeB\x11\n" +
  687. "\x0f_effective_costB\x11\n" +
  688. "\x0f_invoice_issuerB\v\n" +
  689. "\t_providerB\f\n" +
  690. "\n" +
  691. "_publisherB\x13\n" +
  692. "\x11_service_categoryB\x0f\n" +
  693. "\r_service_nameB\t\n" +
  694. "\a_sku_idB\x0f\n" +
  695. "\r_sku_price_idB\x11\n" +
  696. "\x0f_sub_account_idB\x13\n" +
  697. "\x11_sub_account_nameB\x13\n" +
  698. "\x11_pricing_quantityB\x0f\n" +
  699. "\r_pricing_unitB\x13\n" +
  700. "\x11_pricing_category2y\n" +
  701. "\x11CustomCostsSource\x12d\n" +
  702. "\x0eGetCustomCosts\x12&.customcost.messages.CustomCostRequest\x1a*.customcost.messages.CustomCostResponseSetB0Z.github.com/opencost/opencost/core/pkg/model/pbb\x06proto3"
  703. var (
  704. file_customcost_messages_proto_rawDescOnce sync.Once
  705. file_customcost_messages_proto_rawDescData []byte
  706. )
  707. func file_customcost_messages_proto_rawDescGZIP() []byte {
  708. file_customcost_messages_proto_rawDescOnce.Do(func() {
  709. file_customcost_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_customcost_messages_proto_rawDesc), len(file_customcost_messages_proto_rawDesc)))
  710. })
  711. return file_customcost_messages_proto_rawDescData
  712. }
  713. var file_customcost_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
  714. var file_customcost_messages_proto_goTypes = []any{
  715. (*CustomCostRequest)(nil), // 0: customcost.messages.CustomCostRequest
  716. (*CustomCostResponseSet)(nil), // 1: customcost.messages.CustomCostResponseSet
  717. (*CustomCostResponse)(nil), // 2: customcost.messages.CustomCostResponse
  718. (*CustomCost)(nil), // 3: customcost.messages.CustomCost
  719. (*CustomCostExtendedAttributes)(nil), // 4: customcost.messages.CustomCostExtendedAttributes
  720. nil, // 5: customcost.messages.CustomCostResponse.MetadataEntry
  721. nil, // 6: customcost.messages.CustomCost.MetadataEntry
  722. nil, // 7: customcost.messages.CustomCost.LabelsEntry
  723. (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
  724. (*durationpb.Duration)(nil), // 9: google.protobuf.Duration
  725. }
  726. var file_customcost_messages_proto_depIdxs = []int32{
  727. 8, // 0: customcost.messages.CustomCostRequest.start:type_name -> google.protobuf.Timestamp
  728. 8, // 1: customcost.messages.CustomCostRequest.end:type_name -> google.protobuf.Timestamp
  729. 9, // 2: customcost.messages.CustomCostRequest.resolution:type_name -> google.protobuf.Duration
  730. 2, // 3: customcost.messages.CustomCostResponseSet.resps:type_name -> customcost.messages.CustomCostResponse
  731. 5, // 4: customcost.messages.CustomCostResponse.metadata:type_name -> customcost.messages.CustomCostResponse.MetadataEntry
  732. 8, // 5: customcost.messages.CustomCostResponse.start:type_name -> google.protobuf.Timestamp
  733. 8, // 6: customcost.messages.CustomCostResponse.end:type_name -> google.protobuf.Timestamp
  734. 3, // 7: customcost.messages.CustomCostResponse.costs:type_name -> customcost.messages.CustomCost
  735. 6, // 8: customcost.messages.CustomCost.metadata:type_name -> customcost.messages.CustomCost.MetadataEntry
  736. 7, // 9: customcost.messages.CustomCost.labels:type_name -> customcost.messages.CustomCost.LabelsEntry
  737. 4, // 10: customcost.messages.CustomCost.extended_attributes:type_name -> customcost.messages.CustomCostExtendedAttributes
  738. 8, // 11: customcost.messages.CustomCostExtendedAttributes.billing_period_start:type_name -> google.protobuf.Timestamp
  739. 8, // 12: customcost.messages.CustomCostExtendedAttributes.billing_period_end:type_name -> google.protobuf.Timestamp
  740. 0, // 13: customcost.messages.CustomCostsSource.GetCustomCosts:input_type -> customcost.messages.CustomCostRequest
  741. 1, // 14: customcost.messages.CustomCostsSource.GetCustomCosts:output_type -> customcost.messages.CustomCostResponseSet
  742. 14, // [14:15] is the sub-list for method output_type
  743. 13, // [13:14] is the sub-list for method input_type
  744. 13, // [13:13] is the sub-list for extension type_name
  745. 13, // [13:13] is the sub-list for extension extendee
  746. 0, // [0:13] is the sub-list for field type_name
  747. }
  748. func init() { file_customcost_messages_proto_init() }
  749. func file_customcost_messages_proto_init() {
  750. if File_customcost_messages_proto != nil {
  751. return
  752. }
  753. file_customcost_messages_proto_msgTypes[3].OneofWrappers = []any{}
  754. file_customcost_messages_proto_msgTypes[4].OneofWrappers = []any{}
  755. type x struct{}
  756. out := protoimpl.TypeBuilder{
  757. File: protoimpl.DescBuilder{
  758. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  759. RawDescriptor: unsafe.Slice(unsafe.StringData(file_customcost_messages_proto_rawDesc), len(file_customcost_messages_proto_rawDesc)),
  760. NumEnums: 0,
  761. NumMessages: 8,
  762. NumExtensions: 0,
  763. NumServices: 1,
  764. },
  765. GoTypes: file_customcost_messages_proto_goTypes,
  766. DependencyIndexes: file_customcost_messages_proto_depIdxs,
  767. MessageInfos: file_customcost_messages_proto_msgTypes,
  768. }.Build()
  769. File_customcost_messages_proto = out.File
  770. file_customcost_messages_proto_goTypes = nil
  771. file_customcost_messages_proto_depIdxs = nil
  772. }