github.com/enbility/spine-go@v0.7.0/model/bill.go (about)

     1  package model
     2  
     3  type BillIdType uint
     4  
     5  type BillTypeType string
     6  
     7  const (
     8  	BillTypeTypeChargingSummary BillTypeType = "chargingSummary"
     9  )
    10  
    11  type BillPositionIdType uint
    12  
    13  type BillPositionCountType BillPositionIdType
    14  
    15  type BillPositionTypeType string
    16  
    17  const (
    18  	BillPositionTypeTypeGridElectricEnergy         BillPositionTypeType = "gridElectricEnergy"
    19  	BillPositionTypeTypeSelfProducedElectricEnergy BillPositionTypeType = "selfProducedElectricEnergy"
    20  )
    21  
    22  type BillValueIdType uint
    23  
    24  type BillCostIdType uint
    25  
    26  type BillCostTypeType string
    27  
    28  const (
    29  	BillCostTypeTypeAbsolutePrice    BillCostTypeType = "absolutePrice"
    30  	BillCostTypeTypeRelativePrice    BillCostTypeType = "relativePrice"
    31  	BillCostTypeTypeCo2Emission      BillCostTypeType = "co2Emission"
    32  	BillCostTypeTypeRenewableEnergy  BillCostTypeType = "renewableEnergy"
    33  	BillCostTypeTypeRadioactiveWaste BillCostTypeType = "radioactiveWaste"
    34  )
    35  
    36  type BillValueType struct {
    37  	ValueId         *BillValueIdType       `json:"valueId,omitempty"`
    38  	Unit            *UnitOfMeasurementType `json:"unit,omitempty"`
    39  	Value           *ScaledNumberType      `json:"value,omitempty"`
    40  	ValuePercentage *ScaledNumberType      `json:"valuePercentage,omitempty"`
    41  }
    42  
    43  type BillValueElementsType struct {
    44  	ValueId         *ElementTagType `json:"valueId,omitempty"`
    45  	Unit            *ElementTagType `json:"unit,omitempty"`
    46  	Value           *ElementTagType `json:"value,omitempty"`
    47  	ValuePercentage *ElementTagType `json:"valuePercentage,omitempty"`
    48  }
    49  
    50  type BillCostType struct {
    51  	CostId         *BillCostIdType        `json:"costId,omitempty"`
    52  	CostType       *BillCostTypeType      `json:"costType,omitempty"`
    53  	ValueId        *BillValueIdType       `json:"valueId,omitempty"`
    54  	Unit           *UnitOfMeasurementType `json:"unit,omitempty"`
    55  	Currency       *CurrencyType          `json:"currency,omitempty"`
    56  	Cost           *ScaledNumberType      `json:"cost,omitempty"`
    57  	CostPercentage *ScaledNumberType      `json:"costPercentage,omitempty"`
    58  }
    59  
    60  type BillCostElementsType struct {
    61  	CostId         *ElementTagType           `json:"costId,omitempty"`
    62  	CostType       *ElementTagType           `json:"costType,omitempty"`
    63  	ValueId        *ElementTagType           `json:"valueId,omitempty"`
    64  	Unit           *ElementTagType           `json:"unit,omitempty"`
    65  	Currency       *ElementTagType           `json:"currency,omitempty"`
    66  	Cost           *ScaledNumberElementsType `json:"cost,omitempty"`
    67  	CostPercentage *ScaledNumberElementsType `json:"costPercentage,omitempty"`
    68  }
    69  
    70  type BillPositionType struct {
    71  	PositionId   *BillPositionIdType   `json:"positionId,omitempty"`
    72  	PositionType *BillPositionTypeType `json:"positionType,omitempty"`
    73  	TimePeriod   *TimePeriodType       `json:"timePeriod,omitempty"`
    74  	Value        *BillValueType        `json:"value,omitempty"`
    75  	Cost         *BillCostType         `json:"cost,omitempty"`
    76  	Label        *LabelType            `json:"label,omitempty"`
    77  	Description  *DescriptionType      `json:"description,omitempty"`
    78  }
    79  
    80  type BillPositionElementsType struct {
    81  	PositionId   *ElementTagType         `json:"positionId,omitempty"`
    82  	PositionType *ElementTagType         `json:"positionType,omitempty"`
    83  	TimePeriod   *TimePeriodElementsType `json:"timePeriod,omitempty"`
    84  	Value        *BillValueElementsType  `json:"value,omitempty"`
    85  	Cost         *BillCostElementsType   `json:"cost,omitempty"`
    86  	Label        *ElementTagType         `json:"label,omitempty"`
    87  	Description  *ElementTagType         `json:"description,omitempty"`
    88  }
    89  
    90  type BillDataType struct {
    91  	BillId    *BillIdType        `json:"billId,omitempty" eebus:"key"`
    92  	BillType  *BillTypeType      `json:"billType,omitempty"`
    93  	ScopeType *ScopeTypeType     `json:"scopeType,omitempty"`
    94  	Total     *BillPositionType  `json:"total,omitempty"`
    95  	Position  []BillPositionType `json:"position,omitempty"`
    96  }
    97  
    98  type BillDataElementsType struct {
    99  	BillId    *ElementTagType           `json:"billId,omitempty"`
   100  	BillType  *ElementTagType           `json:"billType,omitempty"`
   101  	ScopeType *ElementTagType           `json:"scopeType,omitempty"`
   102  	Total     *BillPositionElementsType `json:"total,omitempty"`
   103  	Position  *BillPositionElementsType `json:"position,omitempty"`
   104  }
   105  
   106  type BillListDataType struct {
   107  	BillData []BillDataType `json:"billData,omitempty"`
   108  }
   109  
   110  type BillListDataSelectorsType struct {
   111  	BillId    *BillIdType    `json:"billId,omitempty"`
   112  	ScopeType *ScopeTypeType `json:"scopeType,omitempty"`
   113  }
   114  
   115  type BillConstraintsDataType struct {
   116  	BillId           *BillIdType            `json:"billId,omitempty" eebus:"key"`
   117  	PositionCountMin *BillPositionCountType `json:"positionCountMin,omitempty"`
   118  	PositionCountMax *BillPositionCountType `json:"positionCountMax,omitempty"`
   119  }
   120  
   121  type BillConstraintsDataElementsType struct {
   122  	BillId           *ElementTagType `json:"billId,omitempty"`
   123  	PositionCountMin *ElementTagType `json:"positionCountMin,omitempty"`
   124  	PositionCountMax *ElementTagType `json:"positionCountMax,omitempty"`
   125  }
   126  
   127  type BillConstraintsListDataType struct {
   128  	BillConstraintsData []BillConstraintsDataType `json:"billConstraintsData,omitempty"`
   129  }
   130  
   131  type BillConstraintsListDataSelectorsType struct {
   132  	BillId *BillIdType `json:"billId,omitempty"`
   133  }
   134  
   135  type BillDescriptionDataType struct {
   136  	BillId            *BillIdType    `json:"billId,omitempty" eebus:"key"`
   137  	BillWriteable     *bool          `json:"billWriteable,omitempty"`
   138  	UpdateRequired    *bool          `json:"updateRequired,omitempty"`
   139  	SupportedBillType []BillTypeType `json:"supportedBillType,omitempty"`
   140  	SessionId         *SessionIdType `json:"sessionId,omitempty"`
   141  }
   142  
   143  type BillDescriptionDataElementsType struct {
   144  	BillId            *ElementTagType `json:"billId,omitempty"`
   145  	BillWriteable     *ElementTagType `json:"billWriteable,omitempty"`
   146  	UpdateRequired    *ElementTagType `json:"updateRequired,omitempty"`
   147  	SupportedBillType *ElementTagType `json:"supportedBillType,omitempty"`
   148  	SessionId         *ElementTagType `json:"sessionId,omitempty"`
   149  }
   150  
   151  type BillDescriptionListDataType struct {
   152  	BillDescriptionData []BillDescriptionDataType `json:"billDescriptionData,omitempty"`
   153  }
   154  
   155  type BillDescriptionListDataSelectorsType struct {
   156  	BillId *BillIdType `json:"billId,omitempty"`
   157  }