// 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;

/** A description of a clinical trial. */
@Fluent
public final class ClinicalTrialDetails {
    /*
     * A given identifier for the clinical trial. Has to be unique within a list of clinical trials.
     */
    @JsonProperty(value = "id", required = true)
    private String id;

    /*
     * The eligibility criteria of the clinical trial (inclusion and exclusion), given as text.
     */
    @JsonProperty(value = "eligibilityCriteriaText")
    private String eligibilityCriteriaText;

    /*
     * Demographic criteria for a clinical trial.
     */
    @JsonProperty(value = "demographics")
    private ClinicalTrialDemographics demographics;

    /*
     * Trial data which is of interest to the potential participant.
     */
    @JsonProperty(value = "metadata", required = true)
    private ClinicalTrialMetadata metadata;

    /**
     * Creates an instance of ClinicalTrialDetails class.
     *
     * @param id the id value to set.
     * @param metadata the metadata value to set.
     */
    @JsonCreator
    public ClinicalTrialDetails(
            @JsonProperty(value = "id", required = true) String id,
            @JsonProperty(value = "metadata", required = true) ClinicalTrialMetadata metadata) {
        this.id = id;
        this.metadata = metadata;
    }

    /**
     * Get the id property: A given identifier for the clinical trial. Has to be unique within a list of clinical
     * trials.
     *
     * @return the id value.
     */
    public String getId() {
        return this.id;
    }

    /**
     * Get the eligibilityCriteriaText property: The eligibility criteria of the clinical trial (inclusion and
     * exclusion), given as text.
     *
     * @return the eligibilityCriteriaText value.
     */
    public String getEligibilityCriteriaText() {
        return this.eligibilityCriteriaText;
    }

    /**
     * Set the eligibilityCriteriaText property: The eligibility criteria of the clinical trial (inclusion and
     * exclusion), given as text.
     *
     * @param eligibilityCriteriaText the eligibilityCriteriaText value to set.
     * @return the ClinicalTrialDetails object itself.
     */
    public ClinicalTrialDetails setEligibilityCriteriaText(String eligibilityCriteriaText) {
        this.eligibilityCriteriaText = eligibilityCriteriaText;
        return this;
    }

    /**
     * Get the demographics property: Demographic criteria for a clinical trial.
     *
     * @return the demographics value.
     */
    public ClinicalTrialDemographics getDemographics() {
        return this.demographics;
    }

    /**
     * Set the demographics property: Demographic criteria for a clinical trial.
     *
     * @param demographics the demographics value to set.
     * @return the ClinicalTrialDetails object itself.
     */
    public ClinicalTrialDetails setDemographics(ClinicalTrialDemographics demographics) {
        this.demographics = demographics;
        return this;
    }

    /**
     * Get the metadata property: Trial data which is of interest to the potential participant.
     *
     * @return the metadata value.
     */
    public ClinicalTrialMetadata getMetadata() {
        return this.metadata;
    }
}
