static fromModel: FunctionUtility.Dual<
[options?: ProfileSkillRecordFromModelOptions],
[self: ProfileSkill],
Effect.Effect<ProfileSkillRecord, InternalServerException | SchemaParseException>
> = Function.dual(
2,
(
self: ProfileSkill,
options?: ProfileSkillRecordFromModelOptions
): Effect.Effect<ProfileSkillRecord, InternalServerException | SchemaParseException> => {
return Effect.gen(function* () {
const data = yield* ProfileSkillRecord.modelToSchemaEncodedData(options)(self)
return yield* Effect.suspend(() =>
Schema.decode(ProfileSkillRecord)(data).pipe(
parseErrorToSchemaParseException('Unexpected error while decoding the profile skill record.', { data })
)
).pipe(
withTelemetrySpan('decode_profile_skill_record', {
attributes: {
profile_skill_uid: self.uid,
},
})
)
}).pipe(
withTelemetrySpan('make_profile_skill_record', {
attributes: {
profile_skill_uid: self.uid,
},
})
)
}
)
static fromModel: FunctionUtility.Dual<
[options?: ProfileSkillRecordFromModelOptions],
[self: ProfileSkill],
Effect.Effect<ProfileSkillRecord, InternalServerException | SchemaParseException>
> = Function.dual(
2,
(
self: ProfileSkill,
options?: ProfileSkillRecordFromModelOptions
): Effect.Effect<ProfileSkillRecord, InternalServerException | SchemaParseException> => {
return Effect.gen(function* () {
const data = yield* ProfileSkillRecord.modelToSchemaEncodedData(options)(self)
return yield* Effect.suspend(() =>
Schema.decode(ProfileSkillRecord)(data).pipe(
parseErrorToSchemaParseException('Unexpected error while decoding the profile skill record.', { data })
)
).pipe(
withTelemetrySpan('decode_profile_skill_record', {
attributes: {
profile_skill_uid: self.uid,
},
})
)
}).pipe(
withTelemetrySpan('make_profile_skill_record', {
attributes: {
profile_skill_uid: self.uid,
},
})
)
}
)