github.com/enbility/spine-go@v0.7.0/model/supplyconditions.go (about) 1 package model 2 3 type ConditionIdType uint 4 5 type SupplyConditionEventTypeType string 6 7 const ( 8 SupplyConditionEventTypeTypeThesholdExceeded SupplyConditionEventTypeType = "thesholdExceeded" 9 SupplyConditionEventTypeTypeFallenBelowThreshold SupplyConditionEventTypeType = "fallenBelowThreshold" 10 SupplyConditionEventTypeTypeSupplyInterrupt SupplyConditionEventTypeType = "supplyInterrupt" 11 SupplyConditionEventTypeTypeReleaseOfLimitations SupplyConditionEventTypeType = "releaseOfLimitations" 12 SupplyConditionEventTypeTypeOtherProblem SupplyConditionEventTypeType = "otherProblem" 13 SupplyConditionEventTypeTypeGridConditionUpdate SupplyConditionEventTypeType = "gridConditionUpdate" 14 ) 15 16 type SupplyConditionOriginatorType string 17 18 const ( 19 SupplyConditionOriginatorTypeExternDSO SupplyConditionOriginatorType = "externDSO" 20 SupplyConditionOriginatorTypeExternSupplier SupplyConditionOriginatorType = "externSupplier" 21 SupplyConditionOriginatorTypeInternalLimit SupplyConditionOriginatorType = "internalLimit" 22 SupplyConditionOriginatorTypeInternalService SupplyConditionOriginatorType = "internalService" 23 SupplyConditionOriginatorTypeInternalUser SupplyConditionOriginatorType = "internalUser" 24 ) 25 26 type GridConditionType string 27 28 const ( 29 GridConditionTypeConsumptionRed GridConditionType = "consumptionRed" 30 GridConditionTypeConsumptionYellow GridConditionType = "consumptionYellow" 31 GridConditionTypeGood GridConditionType = "good" 32 GridConditionTypeProductionRed GridConditionType = "productionRed" 33 GridConditionTypeProductionYellow GridConditionType = "productionYellow" 34 ) 35 36 type SupplyConditionDataType struct { 37 ConditionId *ConditionIdType `json:"conditionId,omitempty" eebus:"key"` 38 Timestamp *AbsoluteOrRelativeTimeType `json:"timestamp,omitempty"` 39 EventType *SupplyConditionEventTypeType `json:"eventType,omitempty"` 40 Originator *SupplyConditionOriginatorType `json:"originator,omitempty"` 41 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty"` 42 ThresholdPercentage *ScaledNumberType `json:"thresholdPercentage,omitempty"` 43 RelevantPeriod *TimePeriodType `json:"relevantPeriod,omitempty"` 44 Description *DescriptionType `json:"description,omitempty"` 45 GridCondition *GridConditionType `json:"gridCondition,omitempty"` 46 } 47 48 type SupplyConditionDataElementsType struct { 49 ConditionId *ElementTagType `json:"conditionId,omitempty"` 50 Timestamp *ElementTagType `json:"timestamp,omitempty"` 51 EventType *ElementTagType `json:"eventType,omitempty"` 52 Originator *ElementTagType `json:"originator,omitempty"` 53 ThresholdId *ElementTagType `json:"thresholdId,omitempty"` 54 ThresholdPercentage *ScaledNumberElementsType `json:"thresholdPercentage,omitempty"` 55 RelevantPeriod *TimePeriodElementsType `json:"relevantPeriod,omitempty"` 56 Description *ElementTagType `json:"description,omitempty"` 57 GridCondition *ElementTagType `json:"gridCondition,omitempty"` 58 } 59 60 type SupplyConditionListDataType struct { 61 SupplyConditionData []SupplyConditionDataType `json:"supplyConditionData,omitempty"` 62 } 63 64 type SupplyConditionListDataSelectorsType struct { 65 ConditionId *ConditionIdType `json:"conditionId,omitempty"` 66 TimestampInterval *TimestampIntervalType `json:"timestampInterval,omitempty"` 67 EventType *SupplyConditionEventTypeType `json:"eventType,omitempty"` 68 Originator *SupplyConditionOriginatorType `json:"originator,omitempty"` 69 } 70 71 type SupplyConditionDescriptionDataType struct { 72 ConditionId *ConditionIdType `json:"conditionId,omitempty" eebus:"key"` 73 CommodityType *CommodityTypeType `json:"commodityType,omitempty"` 74 PositiveEnergyDirection *EnergyDirectionType `json:"positiveEnergyDirection,omitempty"` 75 Label *LabelType `json:"label,omitempty"` 76 Description *DescriptionType `json:"description,omitempty"` 77 } 78 79 type SupplyConditionDescriptionDataElementsType struct { 80 ConditionId *ElementTagType `json:"conditionId,omitempty"` 81 CommodityType *ElementTagType `json:"commodityType,omitempty"` 82 PositiveEnergyDirection *ElementTagType `json:"positiveEnergyDirection,omitempty"` 83 Label *ElementTagType `json:"label,omitempty"` 84 Description *ElementTagType `json:"description,omitempty"` 85 } 86 87 type SupplyConditionDescriptionListDataType struct { 88 SupplyConditionDescriptionData []SupplyConditionDescriptionDataType `json:"supplyConditionDescriptionData,omitempty"` 89 } 90 91 type SupplyConditionDescriptionListDataSelectorsType struct { 92 ConditionId *ConditionIdType `json:"conditionId,omitempty"` 93 } 94 95 type SupplyConditionThresholdRelationDataType struct { 96 ConditionId *ConditionIdType `json:"conditionId,omitempty" eebus:"key"` 97 ThresholdId []ThresholdIdType `json:"thresholdId,omitempty"` 98 } 99 100 type SupplyConditionThresholdRelationDataElementsType struct { 101 ConditionId *ElementTagType `json:"conditionId,omitempty"` 102 ThresholdId *ElementTagType `json:"thresholdId,omitempty"` 103 } 104 105 type SupplyConditionThresholdRelationListDataType struct { 106 SupplyConditionThresholdRelationData []SupplyConditionThresholdRelationDataType `json:"SupplyConditionThresholdRelationDataType,omitempty"` 107 } 108 109 type SupplyConditionThresholdRelationListDataSelectorsType struct { 110 ConditionId *ConditionIdType `json:"conditionId,omitempty"` 111 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty"` 112 }