fleetcostpb

package
v0.0.0-...-d996d1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package fleetcostpb is the generated protos for the fleet cost service.

Package fleetcostpb is the generated protos for the fleet cost service.

Index

Constants

This section is empty.

Variables

View Source
var (
	CostReportExpr_Operation_name = map[int32]string{
		0: "UNKNOWN",
		1: "IDENTITY",
		2: "SUM",
		3: "PRODUCT",
	}
	CostReportExpr_Operation_value = map[string]int32{
		"UNKNOWN":  0,
		"IDENTITY": 1,
		"SUM":      2,
		"PRODUCT":  3,
	}
)

Enum value maps for CostReportExpr_Operation.

View Source
var (
	IndicatorType_name = map[int32]string{
		0:  "INDICATOR_TYPE_UNKNOWN",
		1:  "INDICATOR_TYPE_DUT",
		2:  "INDICATOR_TYPE_SERVO",
		3:  "INDICATOR_TYPE_USBHUB",
		4:  "INDICATOR_TYPE_SERVER",
		5:  "INDICATOR_TYPE_USB_DRIVE",
		6:  "INDICATOR_TYPE_LABSTATION",
		7:  "INDICATOR_TYPE_SPACE",
		8:  "INDICATOR_TYPE_OPERATION",
		9:  "INDICATOR_TYPE_CLOUD",
		10: "INDICATOR_TYPE_POWER",
		11: "INDICATOR_TYPE_TESTBED",
	}
	IndicatorType_value = map[string]int32{
		"INDICATOR_TYPE_UNKNOWN":    0,
		"INDICATOR_TYPE_DUT":        1,
		"INDICATOR_TYPE_SERVO":      2,
		"INDICATOR_TYPE_USBHUB":     3,
		"INDICATOR_TYPE_SERVER":     4,
		"INDICATOR_TYPE_USB_DRIVE":  5,
		"INDICATOR_TYPE_LABSTATION": 6,
		"INDICATOR_TYPE_SPACE":      7,
		"INDICATOR_TYPE_OPERATION":  8,
		"INDICATOR_TYPE_CLOUD":      9,
		"INDICATOR_TYPE_POWER":      10,
		"INDICATOR_TYPE_TESTBED":    11,
	}
)

Enum value maps for IndicatorType.

View Source
var (
	Location_name = map[int32]string{
		0: "LOCATION_UNKNOWN",
		1: "LOCATION_ALL",
		2: "LOCATION_SFO36",
		3: "LOCATION_IAD65",
		4: "LOCATION_ACS",
	}
	Location_value = map[string]int32{
		"LOCATION_UNKNOWN": 0,
		"LOCATION_ALL":     1,
		"LOCATION_SFO36":   2,
		"LOCATION_IAD65":   3,
		"LOCATION_ACS":     4,
	}
)

Enum value maps for Location.

View Source
var (
	CostCadence_name = map[int32]string{
		0: "COST_CADENCE_UNKNOWN",
		1: "COST_CADENCE_ONE_TIME",
		2: "COST_CADENCE_ANNUALLY",
		3: "COST_CADENCE_MONTHLY",
		4: "COST_CADENCE_DAILY",
		5: "COST_CADENCE_HOURLY",
	}
	CostCadence_value = map[string]int32{
		"COST_CADENCE_UNKNOWN":  0,
		"COST_CADENCE_ONE_TIME": 1,
		"COST_CADENCE_ANNUALLY": 2,
		"COST_CADENCE_MONTHLY":  3,
		"COST_CADENCE_DAILY":    4,
		"COST_CADENCE_HOURLY":   5,
	}
)

Enum value maps for CostCadence.

View Source
var File_go_chromium_org_infra_cros_fleetcost_api_models_cost_report_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_infra_cros_fleetcost_api_models_indicator_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_infra_cros_fleetcost_api_models_result_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_infra_cros_fleetcost_api_models_variable_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CostCadence

type CostCadence int32
const (
	CostCadence_COST_CADENCE_UNKNOWN  CostCadence = 0
	CostCadence_COST_CADENCE_ONE_TIME CostCadence = 1
	CostCadence_COST_CADENCE_ANNUALLY CostCadence = 2
	CostCadence_COST_CADENCE_MONTHLY  CostCadence = 3
	CostCadence_COST_CADENCE_DAILY    CostCadence = 4
	CostCadence_COST_CADENCE_HOURLY   CostCadence = 5
)

func (CostCadence) Descriptor

func (CostCadence) Enum

func (x CostCadence) Enum() *CostCadence

func (CostCadence) EnumDescriptor deprecated

func (CostCadence) EnumDescriptor() ([]byte, []int)

Deprecated: Use CostCadence.Descriptor instead.

func (CostCadence) Number

func (x CostCadence) Number() protoreflect.EnumNumber

func (CostCadence) String

func (x CostCadence) String() string

func (CostCadence) Type

type CostIndicator

type CostIndicator struct {
	Name      string        `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type      IndicatorType `protobuf:"varint,2,opt,name=type,proto3,enum=fleetcost.api.models.IndicatorType" json:"type,omitempty"`
	Primary   string        `protobuf:"bytes,13,opt,name=primary,proto3" json:"primary,omitempty"`
	Secondary string        `protobuf:"bytes,14,opt,name=secondary,proto3" json:"secondary,omitempty"`
	Tertiary  string        `protobuf:"bytes,15,opt,name=tertiary,proto3" json:"tertiary,omitempty"`
	Cost      *money.Money  `protobuf:"bytes,6,opt,name=cost,proto3" json:"cost,omitempty"`
	// How frequently will the cost occur.
	CostCadence CostCadence `` /* 133-byte string literal not displayed */
	// Annual burnout rate, e.g. 0.1 meaning 10% of devices need to be replaced per
	// year, note this should apply to the cost associated with one time cadence.
	BurnoutRate float64  `protobuf:"fixed64,8,opt,name=burnout_rate,json=burnoutRate,proto3" json:"burnout_rate,omitempty"`
	Location    Location `protobuf:"varint,9,opt,name=location,proto3,enum=fleetcost.api.models.Location" json:"location,omitempty"`
	Description string   `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"`
	// Amortization is the time in years that we amortize COST_CADENCE_ONE_TIME expenses over.
	AmortizationInYears float64 `protobuf:"fixed64,12,opt,name=amortization_in_years,json=amortizationInYears,proto3" json:"amortization_in_years,omitempty"`
	// ContextURL is a link to information about the cost indicator.
	//
	// It can be a google doc or a g3 doc for example.
	ContextUrl []string `protobuf:"bytes,16,rep,name=context_url,json=contextUrl,proto3" json:"context_url,omitempty"`
	// contains filtered or unexported fields
}

Any combination of type/primary/secondary/tertiary/location will be unique.

func (*CostIndicator) Descriptor deprecated

func (*CostIndicator) Descriptor() ([]byte, []int)

Deprecated: Use CostIndicator.ProtoReflect.Descriptor instead.

func (*CostIndicator) GetAmortizationInYears

func (x *CostIndicator) GetAmortizationInYears() float64

func (*CostIndicator) GetBurnoutRate

func (x *CostIndicator) GetBurnoutRate() float64

func (*CostIndicator) GetContextUrl

func (x *CostIndicator) GetContextUrl() []string

func (*CostIndicator) GetCost

func (x *CostIndicator) GetCost() *money.Money

func (*CostIndicator) GetCostCadence

func (x *CostIndicator) GetCostCadence() CostCadence

func (*CostIndicator) GetDescription

func (x *CostIndicator) GetDescription() string

func (*CostIndicator) GetLocation

func (x *CostIndicator) GetLocation() Location

func (*CostIndicator) GetName

func (x *CostIndicator) GetName() string

func (*CostIndicator) GetPrimary

func (x *CostIndicator) GetPrimary() string

func (*CostIndicator) GetSecondary

func (x *CostIndicator) GetSecondary() string

func (*CostIndicator) GetTertiary

func (x *CostIndicator) GetTertiary() string

func (*CostIndicator) GetType

func (x *CostIndicator) GetType() IndicatorType

func (*CostIndicator) ProtoMessage

func (*CostIndicator) ProtoMessage()

func (*CostIndicator) ProtoReflect

func (x *CostIndicator) ProtoReflect() protoreflect.Message

func (*CostIndicator) Reset

func (x *CostIndicator) Reset()

func (*CostIndicator) String

func (x *CostIndicator) String() string

type CostReport

type CostReport struct {

	// Total is the total value of the report.
	Total float64 `protobuf:"fixed64,2,opt,name=total,proto3" json:"total,omitempty"`
	// Expression the expression that evaluates to the total.
	Expr *CostReportExpr `protobuf:"bytes,3,opt,name=expr,proto3" json:"expr,omitempty"`
	// contains filtered or unexported fields
}

CostReport is a breakdown of the subtotals of cost.

func (*CostReport) Descriptor deprecated

func (*CostReport) Descriptor() ([]byte, []int)

Deprecated: Use CostReport.ProtoReflect.Descriptor instead.

func (*CostReport) GetExpr

func (x *CostReport) GetExpr() *CostReportExpr

func (*CostReport) GetTotal

func (x *CostReport) GetTotal() float64

func (*CostReport) ProtoMessage

func (*CostReport) ProtoMessage()

func (*CostReport) ProtoReflect

func (x *CostReport) ProtoReflect() protoreflect.Message

func (*CostReport) Reset

func (x *CostReport) Reset()

func (*CostReport) String

func (x *CostReport) String() string

type CostReportExpr

type CostReportExpr struct {
	Label *CostReportLabel `protobuf:"bytes,1000,opt,name=label,proto3" json:"label,omitempty"`
	// Operation must be populated with a value other than UNKNOWN to be valid.
	Operation CostReportExpr_Operation `` /* 126-byte string literal not displayed */
	// These are all the arguments to the expression, in order.
	// In order to put a "lighter" argument after a "heavier" one,
	// You must quote the argument using the IDENTITY operation and
	// put it in its own expression.
	//
	// This is defined in order to support operations in the future like
	// Divide.
	// In such a scenario, to express `(Item * Item) / 20.1` the expression
	// would be:
	//
	//	expr {
	//	  operation: DIVIDE
	//	  expr {
	//	    operation: PRODUCT
	//	    item { ... }
	//	    item { ... }
	//	  }
	//	  number { value: 20.1 }
	//	}
	Number []*CostReportScalar `protobuf:"bytes,3000,rep,name=number,proto3" json:"number,omitempty"`
	Item   []*CostReportItem   `protobuf:"bytes,4000,rep,name=item,proto3" json:"item,omitempty"`
	Expr   []*CostReportExpr   `protobuf:"bytes,5000,rep,name=expr,proto3" json:"expr,omitempty"`
	// contains filtered or unexported fields
}

CostReportExpr is an expression that could be a sum, a product or an identity.

The order of the repeated fields is semantically relevant, so use a multiple of 1000 if you can, and adjust it otherwise. This should be future-proof enough.

func (*CostReportExpr) Descriptor deprecated

func (*CostReportExpr) Descriptor() ([]byte, []int)

Deprecated: Use CostReportExpr.ProtoReflect.Descriptor instead.

func (*CostReportExpr) GetExpr

func (x *CostReportExpr) GetExpr() []*CostReportExpr

func (*CostReportExpr) GetItem

func (x *CostReportExpr) GetItem() []*CostReportItem

func (*CostReportExpr) GetLabel

func (x *CostReportExpr) GetLabel() *CostReportLabel

func (*CostReportExpr) GetNumber

func (x *CostReportExpr) GetNumber() []*CostReportScalar

func (*CostReportExpr) GetOperation

func (x *CostReportExpr) GetOperation() CostReportExpr_Operation

func (*CostReportExpr) ProtoMessage

func (*CostReportExpr) ProtoMessage()

func (*CostReportExpr) ProtoReflect

func (x *CostReportExpr) ProtoReflect() protoreflect.Message

func (*CostReportExpr) Reset

func (x *CostReportExpr) Reset()

func (*CostReportExpr) String

func (x *CostReportExpr) String() string

type CostReportExpr_Operation

type CostReportExpr_Operation int32
const (
	CostReportExpr_UNKNOWN CostReportExpr_Operation = 0
	// IDENTITY returns the leftmost value.
	// It is an error to have multiple arguments within an identity expression.
	CostReportExpr_IDENTITY CostReportExpr_Operation = 1
	// SUM returns the sum of all the arguments
	CostReportExpr_SUM CostReportExpr_Operation = 2
	// PRODUCT returns the product of all the argument.
	CostReportExpr_PRODUCT CostReportExpr_Operation = 3
)

func (CostReportExpr_Operation) Descriptor

func (CostReportExpr_Operation) Enum

func (CostReportExpr_Operation) EnumDescriptor deprecated

func (CostReportExpr_Operation) EnumDescriptor() ([]byte, []int)

Deprecated: Use CostReportExpr_Operation.Descriptor instead.

func (CostReportExpr_Operation) Number

func (CostReportExpr_Operation) String

func (x CostReportExpr_Operation) String() string

func (CostReportExpr_Operation) Type

type CostReportItem

type CostReportItem struct {
	SubtotalName    string  `protobuf:"bytes,1,opt,name=subtotal_name,json=subtotalName,proto3" json:"subtotal_name,omitempty"`
	RawFigure       float64 `protobuf:"fixed64,2,opt,name=raw_figure,json=rawFigure,proto3" json:"raw_figure,omitempty"`
	PerDeviceFigure float64 `protobuf:"fixed64,3,opt,name=per_device_figure,json=perDeviceFigure,proto3" json:"per_device_figure,omitempty"`
	// indicator name is the friendly name of the indicator used to
	// construct a cost report item.
	//
	// E.g.
	//
	//	"type=INDICATOR_TYPE_CLOUD primary= secondary= tertiary= loc="
	IndicatorName string `protobuf:"bytes,5,opt,name=indicator_name,json=indicatorName,proto3" json:"indicator_name,omitempty"`
	// categories are:
	// - "dedicated"
	// - "shared"
	// - "cloud"
	Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// contains filtered or unexported fields
}

CostReportItem is a line item within the ultimate CostResult.

An item is always a unit of currency and the prototypical item is the result of a database lookup within the cost service.

func (*CostReportItem) Descriptor deprecated

func (*CostReportItem) Descriptor() ([]byte, []int)

Deprecated: Use CostReportItem.ProtoReflect.Descriptor instead.

func (*CostReportItem) GetCategory

func (x *CostReportItem) GetCategory() string

func (*CostReportItem) GetIndicatorName

func (x *CostReportItem) GetIndicatorName() string

func (*CostReportItem) GetPerDeviceFigure

func (x *CostReportItem) GetPerDeviceFigure() float64

func (*CostReportItem) GetRawFigure

func (x *CostReportItem) GetRawFigure() float64

func (*CostReportItem) GetSubtotalName

func (x *CostReportItem) GetSubtotalName() string

func (*CostReportItem) ProtoMessage

func (*CostReportItem) ProtoMessage()

func (*CostReportItem) ProtoReflect

func (x *CostReportItem) ProtoReflect() protoreflect.Message

func (*CostReportItem) Reset

func (x *CostReportItem) Reset()

func (*CostReportItem) String

func (x *CostReportItem) String() string

type CostReportLabel

type CostReportLabel struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

CostReportLabel is semantic information about an intermediate expression, so far just a name.

func (*CostReportLabel) Descriptor deprecated

func (*CostReportLabel) Descriptor() ([]byte, []int)

Deprecated: Use CostReportLabel.ProtoReflect.Descriptor instead.

func (*CostReportLabel) GetName

func (x *CostReportLabel) GetName() string

func (*CostReportLabel) ProtoMessage

func (*CostReportLabel) ProtoMessage()

func (*CostReportLabel) ProtoReflect

func (x *CostReportLabel) ProtoReflect() protoreflect.Message

func (*CostReportLabel) Reset

func (x *CostReportLabel) Reset()

func (*CostReportLabel) String

func (x *CostReportLabel) String() string

type CostReportScalar

type CostReportScalar struct {
	ReportLabel *CostReportLabel `protobuf:"bytes,3,opt,name=report_label,json=reportLabel,proto3" json:"report_label,omitempty"`
	Value       float64          `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

CostReportScalar a scalar is just a number.

It is a double. Nothing fancy like a matrix or a quaternion.

func (*CostReportScalar) Descriptor deprecated

func (*CostReportScalar) Descriptor() ([]byte, []int)

Deprecated: Use CostReportScalar.ProtoReflect.Descriptor instead.

func (*CostReportScalar) GetReportLabel

func (x *CostReportScalar) GetReportLabel() *CostReportLabel

func (*CostReportScalar) GetValue

func (x *CostReportScalar) GetValue() float64

func (*CostReportScalar) ProtoMessage

func (*CostReportScalar) ProtoMessage()

func (*CostReportScalar) ProtoReflect

func (x *CostReportScalar) ProtoReflect() protoreflect.Message

func (*CostReportScalar) Reset

func (x *CostReportScalar) Reset()

func (*CostReportScalar) String

func (x *CostReportScalar) String() string

type CostResult

type CostResult struct {

	// Dedicated cost is the cost for just this device.
	DedicatedCost float64 `protobuf:"fixed64,1,opt,name=dedicated_cost,json=dedicatedCost,proto3" json:"dedicated_cost,omitempty"`
	// Shared cost is the pro-rated share of fixed costs.
	SharedCost float64 `protobuf:"fixed64,2,opt,name=shared_cost,json=sharedCost,proto3" json:"shared_cost,omitempty"`
	// Cloud service cost is the pro-rated share of cloud-service-related costs for the device in question.
	CloudServiceCost float64 `protobuf:"fixed64,3,opt,name=cloud_service_cost,json=cloudServiceCost,proto3" json:"cloud_service_cost,omitempty"`
	// CostReport is an output-only field
	Report *CostReport `protobuf:"bytes,4,opt,name=report,proto3" json:"report,omitempty"`
	// contains filtered or unexported fields
}

CostResult is a breakdown of cost for a given device.

func (*CostResult) Descriptor deprecated

func (*CostResult) Descriptor() ([]byte, []int)

Deprecated: Use CostResult.ProtoReflect.Descriptor instead.

func (*CostResult) GetCloudServiceCost

func (x *CostResult) GetCloudServiceCost() float64

func (*CostResult) GetDedicatedCost

func (x *CostResult) GetDedicatedCost() float64

func (*CostResult) GetReport

func (x *CostResult) GetReport() *CostReport

func (*CostResult) GetSharedCost

func (x *CostResult) GetSharedCost() float64

func (*CostResult) ProtoMessage

func (*CostResult) ProtoMessage()

func (*CostResult) ProtoReflect

func (x *CostResult) ProtoReflect() protoreflect.Message

func (*CostResult) Reset

func (x *CostResult) Reset()

func (*CostResult) String

func (x *CostResult) String() string

type IndicatorType

type IndicatorType int32

Each Indicator refers to cost from a particular item, e.g. DUT, servo, servers, operation, space.

const (
	IndicatorType_INDICATOR_TYPE_UNKNOWN    IndicatorType = 0
	IndicatorType_INDICATOR_TYPE_DUT        IndicatorType = 1
	IndicatorType_INDICATOR_TYPE_SERVO      IndicatorType = 2
	IndicatorType_INDICATOR_TYPE_USBHUB     IndicatorType = 3
	IndicatorType_INDICATOR_TYPE_SERVER     IndicatorType = 4
	IndicatorType_INDICATOR_TYPE_USB_DRIVE  IndicatorType = 5
	IndicatorType_INDICATOR_TYPE_LABSTATION IndicatorType = 6
	IndicatorType_INDICATOR_TYPE_SPACE      IndicatorType = 7
	IndicatorType_INDICATOR_TYPE_OPERATION  IndicatorType = 8
	IndicatorType_INDICATOR_TYPE_CLOUD      IndicatorType = 9
	IndicatorType_INDICATOR_TYPE_POWER      IndicatorType = 10
	// TESTBED is the total cost of a per-device testbed, for example in a connectivity pool.
	IndicatorType_INDICATOR_TYPE_TESTBED IndicatorType = 11
)

func (IndicatorType) Descriptor

func (IndicatorType) Enum

func (x IndicatorType) Enum() *IndicatorType

func (IndicatorType) EnumDescriptor deprecated

func (IndicatorType) EnumDescriptor() ([]byte, []int)

Deprecated: Use IndicatorType.Descriptor instead.

func (IndicatorType) Number

func (IndicatorType) String

func (x IndicatorType) String() string

func (IndicatorType) Type

type Location

type Location int32

Location indicates location scope for costs that may vary in different sites.

const (
	Location_LOCATION_UNKNOWN Location = 0
	Location_LOCATION_ALL     Location = 1
	Location_LOCATION_SFO36   Location = 2
	Location_LOCATION_IAD65   Location = 3
	Location_LOCATION_ACS     Location = 4
)

func (Location) Descriptor

func (Location) Descriptor() protoreflect.EnumDescriptor

func (Location) Enum

func (x Location) Enum() *Location

func (Location) EnumDescriptor deprecated

func (Location) EnumDescriptor() ([]byte, []int)

Deprecated: Use Location.Descriptor instead.

func (Location) Number

func (x Location) Number() protoreflect.EnumNumber

func (Location) String

func (x Location) String() string

func (Location) Type

type Variable

type Variable struct {
	Name  string  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Variable is a global variable stored in the cost database.

func (*Variable) Descriptor deprecated

func (*Variable) Descriptor() ([]byte, []int)

Deprecated: Use Variable.ProtoReflect.Descriptor instead.

func (*Variable) GetName

func (x *Variable) GetName() string

func (*Variable) GetValue

func (x *Variable) GetValue() float64

func (*Variable) ProtoMessage

func (*Variable) ProtoMessage()

func (*Variable) ProtoReflect

func (x *Variable) ProtoReflect() protoreflect.Message

func (*Variable) Reset

func (x *Variable) Reset()

func (*Variable) String

func (x *Variable) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL