Skip to content

Commit

Permalink
Restore the functions
Browse files Browse the repository at this point in the history
Signed-off-by: Yogesh Deshpande <[email protected]>
  • Loading branch information
yogeshbdeshpande committed Apr 15, 2024
1 parent 88acea1 commit 1b286cd
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions comid/measurement.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,32 @@ func (o Mkey) Valid() error {
return nil
}

func (o Mkey) GetPSARefValID() (PSARefValID, error) {
if !o.IsSet() {
return PSARefValID{}, errors.New("MKey is not set")
}
switch t := o.Value.(type) {
case TaggedPSARefValID:
return PSARefValID(t), nil
default:
return PSARefValID{}, fmt.Errorf("measurement-key type is: %T", t)
}

}

func (o Mkey) GetCCAPlatformConfigID() (CCAPlatformConfigID, error) {
if !o.IsSet() {
return "", errors.New("MKey is not set")
}
switch t := o.Value.(type) {
case TaggedCCAPlatformConfigID:
return CCAPlatformConfigID(t), nil
default:
return "", fmt.Errorf("measurement-key type is: %T", t)
}

}

// UnmarshalJSON deserializes the supplied JSON object into the target MKey
// The key object must have the following shape:
//
Expand Down

0 comments on commit 1b286cd

Please sign in to comment.