Class PackagedProductDefinition.Package.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.model.builder.AbstractBuilder<Element>
-
- org.linuxforhealth.fhir.model.type.Element.Builder
-
- org.linuxforhealth.fhir.model.type.BackboneElement.Builder
-
- org.linuxforhealth.fhir.model.resource.PackagedProductDefinition.Package.Builder
-
- Enclosing class:
- PackagedProductDefinition.Package
public static class PackagedProductDefinition.Package.Builder extends BackboneElement.Builder
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
modifierExtension
-
Fields inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
extension, id
-
Fields inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PackagedProductDefinition.Package.Builder
_package(java.util.Collection<PackagedProductDefinition.Package> _package)
Allows containers (and parts of containers) parwithin containers, still a single packaged product.PackagedProductDefinition.Package.Builder
_package(PackagedProductDefinition.Package... _package)
Allows containers (and parts of containers) parwithin containers, still a single packaged product.PackagedProductDefinition.Package.Builder
alternateMaterial(java.util.Collection<CodeableConcept> alternateMaterial)
A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g.PackagedProductDefinition.Package.Builder
alternateMaterial(CodeableConcept... alternateMaterial)
A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g.PackagedProductDefinition.Package
build()
Build thePackagedProductDefinition.Package
PackagedProductDefinition.Package.Builder
containedItem(java.util.Collection<PackagedProductDefinition.Package.ContainedItem> containedItem)
The item(s) within the packaging.PackagedProductDefinition.Package.Builder
containedItem(PackagedProductDefinition.Package.ContainedItem... containedItem)
The item(s) within the packaging.PackagedProductDefinition.Package.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element.PackagedProductDefinition.Package.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element.protected PackagedProductDefinition.Package.Builder
from(PackagedProductDefinition.Package _package)
PackagedProductDefinition.Package.Builder
id(java.lang.String id)
Unique id for the element within a resource (for internal references).PackagedProductDefinition.Package.Builder
identifier(java.util.Collection<Identifier> identifier)
An identifier that is specific to this particular part of the packaging.PackagedProductDefinition.Package.Builder
identifier(Identifier... identifier)
An identifier that is specific to this particular part of the packaging.PackagedProductDefinition.Package.Builder
manufacturer(java.util.Collection<Reference> manufacturer)
Manufacturer of this package Item.PackagedProductDefinition.Package.Builder
manufacturer(Reference... manufacturer)
Manufacturer of this package Item.PackagedProductDefinition.Package.Builder
material(java.util.Collection<CodeableConcept> material)
Material type of the package item.PackagedProductDefinition.Package.Builder
material(CodeableConcept... material)
Material type of the package item.PackagedProductDefinition.Package.Builder
modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.PackagedProductDefinition.Package.Builder
modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.PackagedProductDefinition.Package.Builder
property(java.util.Collection<PackagedProductDefinition.Package.Property> property)
General characteristics of this item.PackagedProductDefinition.Package.Builder
property(PackagedProductDefinition.Package.Property... property)
General characteristics of this item.PackagedProductDefinition.Package.Builder
quantity(java.lang.Integer quantity)
Convenience method for settingquantity
.PackagedProductDefinition.Package.Builder
quantity(Integer quantity)
The quantity of this level of packaging in the package that contains it.PackagedProductDefinition.Package.Builder
shelfLifeStorage(java.util.Collection<PackagedProductDefinition.Package.ShelfLifeStorage> shelfLifeStorage)
Shelf Life and storage information.PackagedProductDefinition.Package.Builder
shelfLifeStorage(PackagedProductDefinition.Package.ShelfLifeStorage... shelfLifeStorage)
Shelf Life and storage information.PackagedProductDefinition.Package.Builder
type(CodeableConcept type)
The physical type of the container of the items.protected void
validate(PackagedProductDefinition.Package _package)
-
Methods inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public PackagedProductDefinition.Package.Builder id(java.lang.String id)
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.- Overrides:
id
in classBackboneElement.Builder
- Parameters:
id
- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public PackagedProductDefinition.Package.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public PackagedProductDefinition.Package.Builder extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
modifierExtension
public PackagedProductDefinition.Package.Builder modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
-
modifierExtension
public PackagedProductDefinition.Package.Builder modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
identifier
public PackagedProductDefinition.Package.Builder identifier(Identifier... identifier)
An identifier that is specific to this particular part of the packaging. Including possibly Data Carrier Identifier (a GS1 barcode).Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
identifier
- An identifier that is specific to this particular part of the packaging. Including possibly a Data Carrier Identifier- Returns:
- A reference to this Builder instance
-
identifier
public PackagedProductDefinition.Package.Builder identifier(java.util.Collection<Identifier> identifier)
An identifier that is specific to this particular part of the packaging. Including possibly Data Carrier Identifier (a GS1 barcode).Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
identifier
- An identifier that is specific to this particular part of the packaging. Including possibly a Data Carrier Identifier- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
type
public PackagedProductDefinition.Package.Builder type(CodeableConcept type)
The physical type of the container of the items.- Parameters:
type
- The physical type of the container of the items- Returns:
- A reference to this Builder instance
-
quantity
public PackagedProductDefinition.Package.Builder quantity(java.lang.Integer quantity)
Convenience method for settingquantity
.- Parameters:
quantity
- The quantity of this level of packaging in the package that contains it (with the outermost level being 1)- Returns:
- A reference to this Builder instance
- See Also:
quantity(org.linuxforhealth.fhir.model.type.Integer)
-
quantity
public PackagedProductDefinition.Package.Builder quantity(Integer quantity)
The quantity of this level of packaging in the package that contains it. If specified, the outermost level is always 1.- Parameters:
quantity
- The quantity of this level of packaging in the package that contains it (with the outermost level being 1)- Returns:
- A reference to this Builder instance
-
material
public PackagedProductDefinition.Package.Builder material(CodeableConcept... material)
Material type of the package item.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
material
- Material type of the package item- Returns:
- A reference to this Builder instance
-
material
public PackagedProductDefinition.Package.Builder material(java.util.Collection<CodeableConcept> material)
Material type of the package item.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
material
- Material type of the package item- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
alternateMaterial
public PackagedProductDefinition.Package.Builder alternateMaterial(CodeableConcept... alternateMaterial)
A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve).Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
alternateMaterial
- A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material- Returns:
- A reference to this Builder instance
-
alternateMaterial
public PackagedProductDefinition.Package.Builder alternateMaterial(java.util.Collection<CodeableConcept> alternateMaterial)
A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve).Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
alternateMaterial
- A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
shelfLifeStorage
public PackagedProductDefinition.Package.Builder shelfLifeStorage(PackagedProductDefinition.Package.ShelfLifeStorage... shelfLifeStorage)
Shelf Life and storage information.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
shelfLifeStorage
- Shelf Life and storage information- Returns:
- A reference to this Builder instance
-
shelfLifeStorage
public PackagedProductDefinition.Package.Builder shelfLifeStorage(java.util.Collection<PackagedProductDefinition.Package.ShelfLifeStorage> shelfLifeStorage)
Shelf Life and storage information.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
shelfLifeStorage
- Shelf Life and storage information- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
manufacturer
public PackagedProductDefinition.Package.Builder manufacturer(Reference... manufacturer)
Manufacturer of this package Item. When there are multiple it means these are all possible manufacturers.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
manufacturer
- Manufacturer of this package Item (multiple means these are all possible manufacturers)- Returns:
- A reference to this Builder instance
-
manufacturer
public PackagedProductDefinition.Package.Builder manufacturer(java.util.Collection<Reference> manufacturer)
Manufacturer of this package Item. When there are multiple it means these are all possible manufacturers.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
manufacturer
- Manufacturer of this package Item (multiple means these are all possible manufacturers)- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
property
public PackagedProductDefinition.Package.Builder property(PackagedProductDefinition.Package.Property... property)
General characteristics of this item.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
property
- General characteristics of this item- Returns:
- A reference to this Builder instance
-
property
public PackagedProductDefinition.Package.Builder property(java.util.Collection<PackagedProductDefinition.Package.Property> property)
General characteristics of this item.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
property
- General characteristics of this item- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
containedItem
public PackagedProductDefinition.Package.Builder containedItem(PackagedProductDefinition.Package.ContainedItem... containedItem)
The item(s) within the packaging.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
containedItem
- The item(s) within the packaging- Returns:
- A reference to this Builder instance
-
containedItem
public PackagedProductDefinition.Package.Builder containedItem(java.util.Collection<PackagedProductDefinition.Package.ContainedItem> containedItem)
The item(s) within the packaging.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
containedItem
- The item(s) within the packaging- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
_package
public PackagedProductDefinition.Package.Builder _package(PackagedProductDefinition.Package... _package)
Allows containers (and parts of containers) parwithin containers, still a single packaged product. See also PackagedProductDefinition.package.containedItem.item(PackagedProductDefinition).Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
_package
- Allows containers (and parts of containers) within containers, still a single packaged product- Returns:
- A reference to this Builder instance
-
_package
public PackagedProductDefinition.Package.Builder _package(java.util.Collection<PackagedProductDefinition.Package> _package)
Allows containers (and parts of containers) parwithin containers, still a single packaged product. See also PackagedProductDefinition.package.containedItem.item(PackagedProductDefinition).Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
_package
- Allows containers (and parts of containers) within containers, still a single packaged product- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
build
public PackagedProductDefinition.Package build()
Build thePackagedProductDefinition.Package
- Specified by:
build
in interfaceBuilder<Element>
- Specified by:
build
in classBackboneElement.Builder
- Returns:
- An immutable object of type
PackagedProductDefinition.Package
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid Package per the base specification
-
validate
protected void validate(PackagedProductDefinition.Package _package)
-
from
protected PackagedProductDefinition.Package.Builder from(PackagedProductDefinition.Package _package)
-
-