@staticmethod
def get_schema(max_nesting_depth: Optional[int]=6, nesting_depth: int=0, nesting_list: List[str]=[], max_recursion_limit: Optional[int]=2, include_extension: Optional[bool]=False, extension_fields: Optional[List[str]]=None, extension_depth: int=0, max_extension_depth: Optional[int]=2, include_modifierExtension: Optional[bool]=False, use_date_for: Optional[List[str]]=None, parent_path: Optional[str]='') -> Union[(StructType, DataType)]:
    "\n        Information about a medication that is used to support knowledge.\n\n\n        id: Unique id for the element within a resource (for internal references). This\n            may be any string value that does not contain spaces.\n\n        extension: May be used to represent additional information that is not part of the basic\n            definition of the element. To make the use of extensions safe and manageable,\n            there is a strict set of governance  applied to the definition and use of\n            extensions. Though any implementer can define an extension, there is a set of\n            requirements that SHALL be met as part of the definition of the extension.\n\n        modifierExtension: May be used to represent additional information that is not part of the basic\n            definition of the element and that modifies the understanding of the element\n            in which it is contained and/or the understanding of the containing element's\n            descendants. Usually modifier elements provide negation or qualification. To\n            make the use of extensions safe and manageable, there is a strict set of\n            governance applied to the definition and use of extensions. Though any\n            implementer can define an extension, there is a set of requirements that SHALL\n            be met as part of the definition of the extension. Applications processing a\n            resource are required to check for modifier extensions.\n\n            Modifier extensions SHALL NOT change the meaning of any elements on Resource\n            or DomainResource (including cannot change the meaning of modifierExtension\n            itself).\n\n        dosage: Dosage for the medication for the specific guidelines.\n\n        indicationCodeableConcept: Indication for use that apply to the specific administration guidelines.\n\n        indicationReference: Indication for use that apply to the specific administration guidelines.\n\n        patientCharacteristics: Characteristics of the patient that are relevant to the administration\n            guidelines (for example, height, weight, gender, etc.).\n\n        "
    if (extension_fields is None):
        extension_fields = ['valueBoolean', 'valueCode', 'valueDate', 'valueDateTime', 'valueDecimal', 'valueId', 'valueInteger', 'valuePositiveInt', 'valueString', 'valueTime', 'valueUnsignedInt', 'valueUri', 'valueUrl', 'valueReference', 'valueCodeableConcept', 'valueAddress']
    from spark_fhir_schemas.r4.complex_types.extension import ExtensionSchema
    from spark_fhir_schemas.r4.complex_types.medicationknowledge_dosage import MedicationKnowledge_DosageSchema
    from spark_fhir_schemas.r4.complex_types.codeableconcept import CodeableConceptSchema
    from spark_fhir_schemas.r4.complex_types.reference import ReferenceSchema
    from spark_fhir_schemas.r4.complex_types.medicationknowledge_patientcharacteristics import MedicationKnowledge_PatientCharacteristicsSchema
    if ((max_recursion_limit and (nesting_list.count('MedicationKnowledge_AdministrationGuidelines') >= max_recursion_limit)) or (max_nesting_depth and (nesting_depth >= max_nesting_depth))):
        return StructType([StructField('id', StringType(), True)])
    my_nesting_list: List[str] = (nesting_list + ['MedicationKnowledge_AdministrationGuidelines'])
    my_parent_path = ((parent_path + '.medicationknowledge_administrationguidelines') if parent_path else 'medicationknowledge_administrationguidelines')
    schema = StructType([StructField('id', StringType(), True), StructField('extension', ArrayType(ExtensionSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True), StructField('modifierExtension', ArrayType(ExtensionSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True), StructField('dosage', ArrayType(MedicationKnowledge_DosageSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True), StructField('indicationCodeableConcept', CodeableConceptSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=(extension_depth + 1), max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path), True), StructField('indicationReference', ReferenceSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=(extension_depth + 1), max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path), True), StructField('patientCharacteristics', ArrayType(MedicationKnowledge_PatientCharacteristicsSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True)])
    if (not include_extension):
        schema.fields = [(c if (c.name != 'extension') else StructField('extension', StringType(), True)) for c in schema.fields]
    if (not include_modifierExtension):
        schema.fields = [(c if (c.name != 'modifierExtension') else StructField('modifierExtension', StringType(), True)) for c in schema.fields]
    return schema
Information about a medication that is used to support knowledge.


id: Unique id for the element within a resource (for internal references). This
    may be any string value that does not contain spaces.

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.

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).

dosage: Dosage for the medication for the specific guidelines.

indicationCodeableConcept: Indication for use that apply to the specific administration guidelines.

indicationReference: Indication for use that apply to the specific administration guidelines.

patientCharacteristics: Characteristics of the patient that are relevant to the administration
    guidelines (for example, height, weight, gender, etc.).
@staticmethod
def get_schema(max_nesting_depth: Optional[int]=6, nesting_depth: int=0, nesting_list: List[str]=[], max_recursion_limit: Optional[int]=2, include_extension: Optional[bool]=False, extension_fields: Optional[List[str]]=None, extension_depth: int=0, max_extension_depth: Optional[int]=2, include_modifierExtension: Optional[bool]=False, use_date_for: Optional[List[str]]=None, parent_path: Optional[str]=) -> Union[(StructType, DataType)]:
    "\n        Information about a medication that is used to support knowledge.\n\n\n        id: Unique id for the element within a resource (for internal references). This\n            may be any string value that does not contain spaces.\n\n        extension: May be used to represent additional information that is not part of the basic\n            definition of the element. To make the use of extensions safe and manageable,\n            there is a strict set of governance  applied to the definition and use of\n            extensions. Though any implementer can define an extension, there is a set of\n            requirements that SHALL be met as part of the definition of the extension.\n\n        modifierExtension: May be used to represent additional information that is not part of the basic\n            definition of the element and that modifies the understanding of the element\n            in which it is contained and/or the understanding of the containing element's\n            descendants. Usually modifier elements provide negation or qualification. To\n            make the use of extensions safe and manageable, there is a strict set of\n            governance applied to the definition and use of extensions. Though any\n            implementer can define an extension, there is a set of requirements that SHALL\n            be met as part of the definition of the extension. Applications processing a\n            resource are required to check for modifier extensions.\n\n            Modifier extensions SHALL NOT change the meaning of any elements on Resource\n            or DomainResource (including cannot change the meaning of modifierExtension\n            itself).\n\n        dosage: Dosage for the medication for the specific guidelines.\n\n        indicationCodeableConcept: Indication for use that apply to the specific administration guidelines.\n\n        indicationReference: Indication for use that apply to the specific administration guidelines.\n\n        patientCharacteristics: Characteristics of the patient that are relevant to the administration\n            guidelines (for example, height, weight, gender, etc.).\n\n        "
    if (extension_fields is None):
        extension_fields = ['valueBoolean', 'valueCode', 'valueDate', 'valueDateTime', 'valueDecimal', 'valueId', 'valueInteger', 'valuePositiveInt', 'valueString', 'valueTime', 'valueUnsignedInt', 'valueUri', 'valueUrl', 'valueReference', 'valueCodeableConcept', 'valueAddress']
    from spark_fhir_schemas.r4.complex_types.extension import ExtensionSchema
    from spark_fhir_schemas.r4.complex_types.medicationknowledge_dosage import MedicationKnowledge_DosageSchema
    from spark_fhir_schemas.r4.complex_types.codeableconcept import CodeableConceptSchema
    from spark_fhir_schemas.r4.complex_types.reference import ReferenceSchema
    from spark_fhir_schemas.r4.complex_types.medicationknowledge_patientcharacteristics import MedicationKnowledge_PatientCharacteristicsSchema
    if ((max_recursion_limit and (nesting_list.count('MedicationKnowledge_AdministrationGuidelines') >= max_recursion_limit)) or (max_nesting_depth and (nesting_depth >= max_nesting_depth))):
        return StructType([StructField('id', StringType(), True)])
    my_nesting_list: List[str] = (nesting_list + ['MedicationKnowledge_AdministrationGuidelines'])
    my_parent_path = ((parent_path + '.medicationknowledge_administrationguidelines') if parent_path else 'medicationknowledge_administrationguidelines')
    schema = StructType([StructField('id', StringType(), True), StructField('extension', ArrayType(ExtensionSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True), StructField('modifierExtension', ArrayType(ExtensionSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True), StructField('dosage', ArrayType(MedicationKnowledge_DosageSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True), StructField('indicationCodeableConcept', CodeableConceptSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=(extension_depth + 1), max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path), True), StructField('indicationReference', ReferenceSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=(extension_depth + 1), max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path), True), StructField('patientCharacteristics', ArrayType(MedicationKnowledge_PatientCharacteristicsSchema.get_schema(max_nesting_depth=max_nesting_depth, nesting_depth=(nesting_depth + 1), nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, include_modifierExtension=include_modifierExtension, use_date_for=use_date_for, parent_path=my_parent_path)), True)])
    if (not include_extension):
        schema.fields = [(c if (c.name != 'extension') else StructField('extension', StringType(), True)) for c in schema.fields]
    if (not include_modifierExtension):
        schema.fields = [(c if (c.name != 'modifierExtension') else StructField('modifierExtension', StringType(), True)) for c in schema.fields]
    return schema