#[allow(unused_imports)]
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::CowStr;
#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::types::collection::{Collection, RecordError};
use jacquard_common::types::string::{AtUri, Cid, Datetime};
use jacquard_common::types::uri::{RecordUri, UriError};
use jacquard_common::xrpc::XrpcResp;
use jacquard_derive::{IntoStatic, lexicon};
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;
#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Serialize, Deserialize};
use crate::science_alt::dataset::programming_language::ProgrammingLanguage;
use crate::science_alt::dataset::lens;
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct CodeReference<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub branch: Option<CowStr<'a>>,
#[serde(borrow)]
pub commit: CowStr<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub language: Option<ProgrammingLanguage<'a>>,
#[serde(borrow)]
pub path: CowStr<'a>,
#[serde(borrow)]
pub repository: CowStr<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct LensMetadata<'a> {}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", rename = "science.alt.dataset.lens", tag = "$type")]
pub struct Lens<'a> {
pub created_at: Datetime,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub description: Option<CowStr<'a>>,
#[serde(borrow)]
pub getter_code: lens::CodeReference<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub language: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub metadata: Option<lens::LensMetadata<'a>>,
#[serde(borrow)]
pub name: CowStr<'a>,
#[serde(borrow)]
pub putter_code: lens::CodeReference<'a>,
#[serde(borrow)]
pub source_schema: AtUri<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub source_schema_version: Option<CowStr<'a>>,
#[serde(borrow)]
pub target_schema: AtUri<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub target_schema_version: Option<CowStr<'a>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct LensGetRecordOutput<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub cid: Option<Cid<'a>>,
#[serde(borrow)]
pub uri: AtUri<'a>,
#[serde(borrow)]
pub value: Lens<'a>,
}
impl<'a> Lens<'a> {
pub fn uri(
uri: impl Into<CowStr<'a>>,
) -> Result<RecordUri<'a, LensRecord>, UriError> {
RecordUri::try_from_uri(AtUri::new_cow(uri.into())?)
}
}
impl<'a> LexiconSchema for CodeReference<'a> {
fn nsid() -> &'static str {
"science.alt.dataset.lens"
}
fn def_name() -> &'static str {
"codeReference"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_science_alt_dataset_lens()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.branch {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("branch"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.commit;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 40usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("commit"),
max: 40usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.path;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 500usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("path"),
max: 500usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.repository;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 500usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("repository"),
max: 500usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<'a> LexiconSchema for LensMetadata<'a> {
fn nsid() -> &'static str {
"science.alt.dataset.lens"
}
fn def_name() -> &'static str {
"lensMetadata"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_science_alt_dataset_lens()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct LensRecord;
impl XrpcResp for LensRecord {
const NSID: &'static str = "science.alt.dataset.lens";
const ENCODING: &'static str = "application/json";
type Output<'de> = LensGetRecordOutput<'de>;
type Err<'de> = RecordError<'de>;
}
impl From<LensGetRecordOutput<'_>> for Lens<'_> {
fn from(output: LensGetRecordOutput<'_>) -> Self {
use jacquard_common::IntoStatic;
output.value.into_static()
}
}
impl Collection for Lens<'_> {
const NSID: &'static str = "science.alt.dataset.lens";
type Record = LensRecord;
}
impl Collection for LensRecord {
const NSID: &'static str = "science.alt.dataset.lens";
type Record = LensRecord;
}
impl<'a> LexiconSchema for Lens<'a> {
fn nsid() -> &'static str {
"science.alt.dataset.lens"
}
fn def_name() -> &'static str {
"main"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_science_alt_dataset_lens()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.description {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 1000usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("description"),
max: 1000usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.language {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 50usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("language"),
max: 50usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.name;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("name"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.source_schema;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 500usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("source_schema"),
max: 500usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.source_schema_version {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("source_schema_version"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.target_schema;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 500usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("target_schema"),
max: 500usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.target_schema_version {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("target_schema_version"),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
fn lexicon_doc_science_alt_dataset_lens() -> LexiconDoc<'static> {
#[allow(unused_imports)]
use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
use jacquard_lexicon::lexicon::*;
use alloc::collections::BTreeMap;
LexiconDoc {
lexicon: Lexicon::Lexicon1,
id: CowStr::new_static("science.alt.dataset.lens"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("codeReference"),
LexUserType::Object(LexObject {
description: Some(
CowStr::new_static(
"Reference to code in an external repository (GitHub, tangled.org, etc.)",
),
),
required: Some(
vec![
SmolStr::new_static("repository"),
SmolStr::new_static("commit"), SmolStr::new_static("path")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("branch"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Optional branch name (for reference, commit hash is authoritative)",
),
),
max_length: Some(100usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("commit"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Git commit hash (ensures immutability)"),
),
max_length: Some(40usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("language"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"science.alt.dataset.programmingLanguage",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("path"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Path to function within repository (e.g., 'lenses/vision.py:rgb_to_grayscale')",
),
),
max_length: Some(500usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("repository"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Repository URL (e.g., 'https://github.com/user/repo' or 'at://did/tangled.repo/...')",
),
),
max_length: Some(500usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("lensMetadata"),
LexUserType::Object(LexObject {
description: Some(
CowStr::new_static(
"Open metadata object for lens records. Applications may extend with additional fields (author, performance notes, etc.).",
),
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("main"),
LexUserType::Record(LexRecord {
description: Some(
CowStr::new_static(
"Bidirectional transformation (Lens) between two sample types, with code stored in external repositories",
),
),
key: Some(CowStr::new_static("tid")),
record: LexRecordRecord::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("name"),
SmolStr::new_static("sourceSchema"),
SmolStr::new_static("targetSchema"),
SmolStr::new_static("getterCode"),
SmolStr::new_static("putterCode"),
SmolStr::new_static("createdAt")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("createdAt"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Timestamp when this lens was created"),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("description"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("What this transformation does"),
),
max_length: Some(1000usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("getterCode"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#codeReference"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("language"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"(Deprecated: use codeReference.language instead.) Programming language of the lens implementation (e.g., 'python', 'typescript')",
),
),
max_length: Some(50usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("metadata"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#lensMetadata"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Human-readable lens name"),
),
max_length: Some(100usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("putterCode"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#codeReference"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("sourceSchema"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("AT-URI reference to source schema"),
),
format: Some(LexStringFormat::AtUri),
max_length: Some(500usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("sourceSchemaVersion"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Semver version or range for source schema compatibility (e.g., '1.0.0', '>=1.0.0 <2.0.0')",
),
),
max_length: Some(100usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("targetSchema"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("AT-URI reference to target schema"),
),
format: Some(LexStringFormat::AtUri),
max_length: Some(500usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("targetSchemaVersion"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"Semver version or range for target schema compatibility (e.g., '1.0.0', '>=1.0.0 <2.0.0')",
),
),
max_length: Some(100usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
..Default::default()
}),
);
map
},
..Default::default()
}
}
pub mod lens_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type SourceSchema;
type TargetSchema;
type PutterCode;
type CreatedAt;
type Name;
type GetterCode;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type SourceSchema = Unset;
type TargetSchema = Unset;
type PutterCode = Unset;
type CreatedAt = Unset;
type Name = Unset;
type GetterCode = Unset;
}
pub struct SetSourceSchema<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetSourceSchema<S> {}
impl<S: State> State for SetSourceSchema<S> {
type SourceSchema = Set<members::source_schema>;
type TargetSchema = S::TargetSchema;
type PutterCode = S::PutterCode;
type CreatedAt = S::CreatedAt;
type Name = S::Name;
type GetterCode = S::GetterCode;
}
pub struct SetTargetSchema<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetTargetSchema<S> {}
impl<S: State> State for SetTargetSchema<S> {
type SourceSchema = S::SourceSchema;
type TargetSchema = Set<members::target_schema>;
type PutterCode = S::PutterCode;
type CreatedAt = S::CreatedAt;
type Name = S::Name;
type GetterCode = S::GetterCode;
}
pub struct SetPutterCode<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetPutterCode<S> {}
impl<S: State> State for SetPutterCode<S> {
type SourceSchema = S::SourceSchema;
type TargetSchema = S::TargetSchema;
type PutterCode = Set<members::putter_code>;
type CreatedAt = S::CreatedAt;
type Name = S::Name;
type GetterCode = S::GetterCode;
}
pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
impl<S: State> State for SetCreatedAt<S> {
type SourceSchema = S::SourceSchema;
type TargetSchema = S::TargetSchema;
type PutterCode = S::PutterCode;
type CreatedAt = Set<members::created_at>;
type Name = S::Name;
type GetterCode = S::GetterCode;
}
pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type SourceSchema = S::SourceSchema;
type TargetSchema = S::TargetSchema;
type PutterCode = S::PutterCode;
type CreatedAt = S::CreatedAt;
type Name = Set<members::name>;
type GetterCode = S::GetterCode;
}
pub struct SetGetterCode<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetGetterCode<S> {}
impl<S: State> State for SetGetterCode<S> {
type SourceSchema = S::SourceSchema;
type TargetSchema = S::TargetSchema;
type PutterCode = S::PutterCode;
type CreatedAt = S::CreatedAt;
type Name = S::Name;
type GetterCode = Set<members::getter_code>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct source_schema(());
pub struct target_schema(());
pub struct putter_code(());
pub struct created_at(());
pub struct name(());
pub struct getter_code(());
}
}
pub struct LensBuilder<'a, S: lens_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (
Option<Datetime>,
Option<CowStr<'a>>,
Option<lens::CodeReference<'a>>,
Option<CowStr<'a>>,
Option<lens::LensMetadata<'a>>,
Option<CowStr<'a>>,
Option<lens::CodeReference<'a>>,
Option<AtUri<'a>>,
Option<CowStr<'a>>,
Option<AtUri<'a>>,
Option<CowStr<'a>>,
),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> Lens<'a> {
pub fn new() -> LensBuilder<'a, lens_state::Empty> {
LensBuilder::new()
}
}
impl<'a> LensBuilder<'a, lens_state::Empty> {
pub fn new() -> Self {
LensBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None, None, None, None, None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> LensBuilder<'a, S>
where
S: lens_state::State,
S::CreatedAt: lens_state::IsUnset,
{
pub fn created_at(
mut self,
value: impl Into<Datetime>,
) -> LensBuilder<'a, lens_state::SetCreatedAt<S>> {
self._fields.0 = Option::Some(value.into());
LensBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: lens_state::State> LensBuilder<'a, S> {
pub fn description(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_description(mut self, value: Option<CowStr<'a>>) -> Self {
self._fields.1 = value;
self
}
}
impl<'a, S> LensBuilder<'a, S>
where
S: lens_state::State,
S::GetterCode: lens_state::IsUnset,
{
pub fn getter_code(
mut self,
value: impl Into<lens::CodeReference<'a>>,
) -> LensBuilder<'a, lens_state::SetGetterCode<S>> {
self._fields.2 = Option::Some(value.into());
LensBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: lens_state::State> LensBuilder<'a, S> {
pub fn language(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_language(mut self, value: Option<CowStr<'a>>) -> Self {
self._fields.3 = value;
self
}
}
impl<'a, S: lens_state::State> LensBuilder<'a, S> {
pub fn metadata(mut self, value: impl Into<Option<lens::LensMetadata<'a>>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_metadata(mut self, value: Option<lens::LensMetadata<'a>>) -> Self {
self._fields.4 = value;
self
}
}
impl<'a, S> LensBuilder<'a, S>
where
S: lens_state::State,
S::Name: lens_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<CowStr<'a>>,
) -> LensBuilder<'a, lens_state::SetName<S>> {
self._fields.5 = Option::Some(value.into());
LensBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LensBuilder<'a, S>
where
S: lens_state::State,
S::PutterCode: lens_state::IsUnset,
{
pub fn putter_code(
mut self,
value: impl Into<lens::CodeReference<'a>>,
) -> LensBuilder<'a, lens_state::SetPutterCode<S>> {
self._fields.6 = Option::Some(value.into());
LensBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LensBuilder<'a, S>
where
S: lens_state::State,
S::SourceSchema: lens_state::IsUnset,
{
pub fn source_schema(
mut self,
value: impl Into<AtUri<'a>>,
) -> LensBuilder<'a, lens_state::SetSourceSchema<S>> {
self._fields.7 = Option::Some(value.into());
LensBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: lens_state::State> LensBuilder<'a, S> {
pub fn source_schema_version(
mut self,
value: impl Into<Option<CowStr<'a>>>,
) -> Self {
self._fields.8 = value.into();
self
}
pub fn maybe_source_schema_version(mut self, value: Option<CowStr<'a>>) -> Self {
self._fields.8 = value;
self
}
}
impl<'a, S> LensBuilder<'a, S>
where
S: lens_state::State,
S::TargetSchema: lens_state::IsUnset,
{
pub fn target_schema(
mut self,
value: impl Into<AtUri<'a>>,
) -> LensBuilder<'a, lens_state::SetTargetSchema<S>> {
self._fields.9 = Option::Some(value.into());
LensBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: lens_state::State> LensBuilder<'a, S> {
pub fn target_schema_version(
mut self,
value: impl Into<Option<CowStr<'a>>>,
) -> Self {
self._fields.10 = value.into();
self
}
pub fn maybe_target_schema_version(mut self, value: Option<CowStr<'a>>) -> Self {
self._fields.10 = value;
self
}
}
impl<'a, S> LensBuilder<'a, S>
where
S: lens_state::State,
S::SourceSchema: lens_state::IsSet,
S::TargetSchema: lens_state::IsSet,
S::PutterCode: lens_state::IsSet,
S::CreatedAt: lens_state::IsSet,
S::Name: lens_state::IsSet,
S::GetterCode: lens_state::IsSet,
{
pub fn build(self) -> Lens<'a> {
Lens {
created_at: self._fields.0.unwrap(),
description: self._fields.1,
getter_code: self._fields.2.unwrap(),
language: self._fields.3,
metadata: self._fields.4,
name: self._fields.5.unwrap(),
putter_code: self._fields.6.unwrap(),
source_schema: self._fields.7.unwrap(),
source_schema_version: self._fields.8,
target_schema: self._fields.9.unwrap(),
target_schema_version: self._fields.10,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> Lens<'a> {
Lens {
created_at: self._fields.0.unwrap(),
description: self._fields.1,
getter_code: self._fields.2.unwrap(),
language: self._fields.3,
metadata: self._fields.4,
name: self._fields.5.unwrap(),
putter_code: self._fields.6.unwrap(),
source_schema: self._fields.7.unwrap(),
source_schema_version: self._fields.8,
target_schema: self._fields.9.unwrap(),
target_schema_version: self._fields.10,
extra_data: Some(extra_data),
}
}
}