Class: Api::V2::PlateCreationResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Api::V2::PlateCreationResource
- Defined in:
- app/resources/api/v2/plate_creation_resource.rb
Overview
This resource cannot be modified after creation: its endpoint will not accept PATCH
requests.
Access this resource via the /api/v2/plate_creations/
endpoint.
Provides a JSON:API representation of PlateCreation for creation of a child plate with a given purpose which is linked to a parent plate as one of its children. Creation of this resource via a POST
request will initiate the child plate creation. The child plate is returned by this endpoint under the #child relationship.
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
-
#child ⇒ Api::V2::PlateResource
readonly
The child plate created by this resource.
-
#child_purpose ⇒ Api::V2::PlatePurposeResource
Setting this relationship alongside the
child_purpose_uuid
attribute will override the attribute value. -
#child_purpose_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
child_purpose
relationship instead. -
#parent ⇒ Api::V2::PlateResource
Setting this relationship alongside the
parent_uuid
attribute will override the attribute value. -
#parent_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
parent
relationship instead. -
#user ⇒ Api::V2::UserResource
Setting this relationship alongside the
user_uuid
attribute will override the attribute value. -
#user_uuid ⇒ Void
writeonly
deprecated
Deprecated.
Use the
user
relationship instead. -
#uuid ⇒ String
readonly
The UUID of the plate creation.
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
#child ⇒ Api::V2::PlateResource (readonly)
Returns The child plate created by this resource.
109 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 109 has_one :child, class_name: 'Plate', readonly: true |
#child_purpose ⇒ Api::V2::PlatePurposeResource
This relationship is required.
Setting this relationship alongside the child_purpose_uuid
attribute will override the attribute value. The purpose which the child plate should be created with.
116 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 116 has_one :child_purpose, class_name: 'PlatePurpose' |
#child_purpose_uuid=(value) ⇒ Void (writeonly)
Use the child_purpose
relationship instead.
This is declared for convenience where the PlatePurpose is not available to set as a relationship. Setting this attribute alongside the child_purpose
relationship will prefer the relationship value.
67 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 67 attribute :child_purpose_uuid, writeonly: true |
#parent ⇒ Api::V2::PlateResource
Setting this relationship alongside the parent_uuid
attribute will override the attribute value.
121 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 121 has_one :parent, class_name: 'Plate' |
#parent_uuid=(value) ⇒ Void (writeonly)
Use the parent
relationship instead.
This is declared for convenience where the parent Plate is not available to set as a relationship. Setting this attribute alongside the parent
relationship will prefer the relationship value.
80 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 80 attribute :parent_uuid, writeonly: true |
#user ⇒ Api::V2::UserResource
This relationship is required.
Setting this relationship alongside the user_uuid
attribute will override the attribute value.
127 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 127 has_one :user |
#user_uuid=(value) ⇒ Void (writeonly)
Use the user
relationship instead.
This is declared for convenience where the User is not available to set as a relationship. Setting this attribute alongside the user
relationship will prefer the relationship value.
93 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 93 attribute :user_uuid, writeonly: true |
#uuid ⇒ String (readonly)
Returns The UUID of the plate creation.
101 |
# File 'app/resources/api/v2/plate_creation_resource.rb', line 101 attribute :uuid, readonly: true |