// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.health.insights.clinicalmatching.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). */
@Fluent
public final class PatientDocument {
    /*
     * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document).
     */
    @JsonProperty(value = "type", required = true)
    private DocumentType type;

    /*
     * The type of the clinical document.
     */
    @JsonProperty(value = "clinicalType")
    private ClinicalDocumentType clinicalType;

    /*
     * A given identifier for the document. Has to be unique across all documents for a single patient.
     */
    @JsonProperty(value = "id", required = true)
    private String id;

    /*
     * A 2 letter ISO 639-1 representation of the language of the document.
     */
    @JsonProperty(value = "language")
    private String language;

    /*
     * The date and time when the document was created.
     */
    @JsonProperty(value = "createdDateTime")
    private OffsetDateTime createdDateTime;

    /*
     * The content of the patient document.
     */
    @JsonProperty(value = "content", required = true)
    private DocumentContent content;

    /**
     * Creates an instance of PatientDocument class.
     *
     * @param type the type value to set.
     * @param id the id value to set.
     * @param content the content value to set.
     */
    @JsonCreator
    public PatientDocument(
            @JsonProperty(value = "type", required = true) DocumentType type,
            @JsonProperty(value = "id", required = true) String id,
            @JsonProperty(value = "content", required = true) DocumentContent content) {
        this.type = type;
        this.id = id;
        this.content = content;
    }

    /**
     * Get the type property: The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR
     * JSON document).
     *
     * @return the type value.
     */
    public DocumentType getType() {
        return this.type;
    }

    /**
     * Get the clinicalType property: The type of the clinical document.
     *
     * @return the clinicalType value.
     */
    public ClinicalDocumentType getClinicalType() {
        return this.clinicalType;
    }

    /**
     * Set the clinicalType property: The type of the clinical document.
     *
     * @param clinicalType the clinicalType value to set.
     * @return the PatientDocument object itself.
     */
    public PatientDocument setClinicalType(ClinicalDocumentType clinicalType) {
        this.clinicalType = clinicalType;
        return this;
    }

    /**
     * Get the id property: A given identifier for the document. Has to be unique across all documents for a single
     * patient.
     *
     * @return the id value.
     */
    public String getId() {
        return this.id;
    }

    /**
     * Get the language property: A 2 letter ISO 639-1 representation of the language of the document.
     *
     * @return the language value.
     */
    public String getLanguage() {
        return this.language;
    }

    /**
     * Set the language property: A 2 letter ISO 639-1 representation of the language of the document.
     *
     * @param language the language value to set.
     * @return the PatientDocument object itself.
     */
    public PatientDocument setLanguage(String language) {
        this.language = language;
        return this;
    }

    /**
     * Get the createdDateTime property: The date and time when the document was created.
     *
     * @return the createdDateTime value.
     */
    public OffsetDateTime getCreatedDateTime() {
        return this.createdDateTime;
    }

    /**
     * Set the createdDateTime property: The date and time when the document was created.
     *
     * @param createdDateTime the createdDateTime value to set.
     * @return the PatientDocument object itself.
     */
    public PatientDocument setCreatedDateTime(OffsetDateTime createdDateTime) {
        this.createdDateTime = createdDateTime;
        return this;
    }

    /**
     * Get the content property: The content of the patient document.
     *
     * @return the content value.
     */
    public DocumentContent getContent() {
        return this.content;
    }
}
