Class: Api::V2::TagLayoutResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::TagLayoutResource
- Defined in:
- app/resources/api/v2/tag_layout_resource.rb
Overview
Access this resource via the /api/v2/tag_layouts/
endpoint.
This resource cannot be modified after creation: its endpoint will not accept PATCH
requests.
Provides a JSON:API representation of the TagLayout resource.
TagLayout Lays out the tags in the specified tag group in a particular pattern. This resource is used for managing tag layouts for plates, which define how tags are applied or distributed across the plate. It supports creating a tag layout and retrieving its details.
For more information about JSON:API see the JSON:API Specifications or look at the JSONAPI::Resources package for Sequencescape's implementation of the JSON:API standard.
Instance Attribute Summary collapse
-
#direction ⇒ String
The name of the algorithm defining the direction of the tag layout.
-
#enforce_uniqueness ⇒ Object
writeonly
Not stored on the model.
-
#initial_tag ⇒ Integer
An offset for the tag set indicating which tag to start with in the layout.
-
#plate ⇒ Api::V2::PlateResource
This relationship defines the plate to which this tag layout is applied.
-
#plate_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
plate
relationship instead. -
#substitutions ⇒ Hash
A hash of substitutions to be applied during the layout creation, mapping placeholders to values.
-
#tag2_group ⇒ Api::V2::TagGroupResource
Defines a secondary tag group used in the tag layout, typically for dual indexing.
-
#tag2_group_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
tag2_group
relationship instead. -
#tag_group ⇒ Api::V2::TagGroupResource
Defines the primary tag group used in the tag layout.
-
#tag_group_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
tag_group
relationship instead. -
#tag_layout_template_uuid ⇒ Object
writeonly
Not stored on the model.
-
#tags_per_well ⇒ Integer
The number of tags per well in the layout.
-
#user ⇒ Api::V2::UserResource
Defines the user who initiated the creation of this tag layout.
-
#user_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
user
relationship instead. -
#uuid ⇒ String
readonly
The UUID of the tag layout.
-
#walking_by ⇒ String
Defines the algorithm that determines how the tag layout is walked through (e.g., by row, by column).
Method Summary
Methods inherited from BaseResource
apply_includes, creatable_fields, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields
Instance Attribute Details
#direction ⇒ String
This attribute is required and must be specified when creating a tag layout.
The name of the algorithm defining the direction of the tag layout.
58 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 58 attribute :direction |
#enforce_uniqueness=(value) ⇒ Object (writeonly)
Not stored on the model
199 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 199 attribute :enforce_uniqueness, writeonly: true |
#initial_tag ⇒ Integer
An offset for the tag set indicating which tag to start with in the layout.
63 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 63 attribute :initial_tag |
#plate ⇒ Api::V2::PlateResource
This relationship is required and must be set when creating the tag layout.
This relationship defines the plate to which this tag layout is applied. Setting this relationship alongside the plate_uuid
attribute will override the attribute value.
157 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 157 has_one :plate |
#plate_uuid=(value) ⇒ Void (writeonly)
Use the plate
relationship instead.
This is a convenience attribute for when the plate is not available as a relationship. Setting this alongside the plate
relationship will prefer the relationship value.
72 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 72 attribute :plate_uuid, writeonly: true |
#substitutions ⇒ Hash
A hash of substitutions to be applied during the layout creation, mapping placeholders to values.
81 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 81 attribute :substitutions |
#tag2_group ⇒ Api::V2::TagGroupResource
Defines a secondary tag group used in the tag layout, typically for dual indexing. Setting this relationship alongside the tag2_group_uuid
attribute will override the attribute value. This is used during dual indexing, but will not be found during single indexing.
171 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 171 has_one :tag2_group, class_name: 'TagGroup' |
#tag2_group_uuid=(value) ⇒ Void (writeonly)
Use the tag2_group
relationship instead.
This is a convenience attribute for when a second TagGroup is not available to set as a relationship. Setting this alongside the tag2_group
relationship will prefer the relationship value.
112 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 112 attribute :tag2_group_uuid, writeonly: true |
#tag_group ⇒ Api::V2::TagGroupResource
This relationship is required.
Defines the primary tag group used in the tag layout. Setting this relationship alongside the tag_group_uuid
attribute will override the attribute value.
164 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 164 has_one :tag_group |
#tag_group_uuid=(value) ⇒ Void (writeonly)
Use the tag_group
relationship instead.
This is a convenience attribute for when the TagGroup is not available to set as a relationship. Setting this alongside the tag_group
relationship will prefer the relationship value.
99 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 99 attribute :tag_group_uuid, writeonly: true |
#tag_layout_template_uuid=(value) ⇒ Object (writeonly)
Not stored on the model
192 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 192 attribute :tag_layout_template_uuid, writeonly: true |
#tags_per_well ⇒ Integer
The number of tags per well in the layout. Used for specific tag layout algorithms like #walking_by. When not used, this will be nil
.
123 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 123 attribute :tags_per_well |
#user ⇒ Api::V2::UserResource
This relationship is required.
Defines the user who initiated the creation of this tag layout. Setting this relationship alongside the user_uuid
attribute will override the attribute value.
178 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 178 has_one :user |
#user_uuid=(value) ⇒ Void (writeonly)
Use the user
relationship instead.
This is a convenience attribute for when the User is not available to set as a relationship. Setting this alongside the user
relationship will prefer the relationship value.
132 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 132 attribute :user_uuid, writeonly: true |
#uuid ⇒ String (readonly)
Returns The UUID of the tag layout.
140 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 140 attribute :uuid, readonly: true |
#walking_by ⇒ String
This attribute is required and must be specified when creating a tag layout.
Defines the algorithm that determines how the tag layout is walked through (e.g., by row, by column).
146 |
# File 'app/resources/api/v2/tag_layout_resource.rb', line 146 attribute :walking_by |