// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.diagflow.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.diagflow.inputs.CxIntentTrainingPhrasePartArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class CxIntentTrainingPhraseArgs extends com.pulumi.resources.ResourceArgs {

    public static final CxIntentTrainingPhraseArgs Empty = new CxIntentTrainingPhraseArgs();

    /**
     * (Output)
     * The unique identifier of the training phrase.
     * 
     */
    @Import(name="id")
    private @Nullable Output<String> id;

    /**
     * @return (Output)
     * The unique identifier of the training phrase.
     * 
     */
    public Optional<Output<String>> id() {
        return Optional.ofNullable(this.id);
    }

    /**
     * The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     * 
     */
    @Import(name="parts", required=true)
    private Output<List<CxIntentTrainingPhrasePartArgs>> parts;

    /**
     * @return The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     * 
     */
    public Output<List<CxIntentTrainingPhrasePartArgs>> parts() {
        return this.parts;
    }

    /**
     * Indicates how many times this example was added to the intent.
     * 
     */
    @Import(name="repeatCount")
    private @Nullable Output<Integer> repeatCount;

    /**
     * @return Indicates how many times this example was added to the intent.
     * 
     */
    public Optional<Output<Integer>> repeatCount() {
        return Optional.ofNullable(this.repeatCount);
    }

    private CxIntentTrainingPhraseArgs() {}

    private CxIntentTrainingPhraseArgs(CxIntentTrainingPhraseArgs $) {
        this.id = $.id;
        this.parts = $.parts;
        this.repeatCount = $.repeatCount;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(CxIntentTrainingPhraseArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private CxIntentTrainingPhraseArgs $;

        public Builder() {
            $ = new CxIntentTrainingPhraseArgs();
        }

        public Builder(CxIntentTrainingPhraseArgs defaults) {
            $ = new CxIntentTrainingPhraseArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param id (Output)
         * The unique identifier of the training phrase.
         * 
         * @return builder
         * 
         */
        public Builder id(@Nullable Output<String> id) {
            $.id = id;
            return this;
        }

        /**
         * @param id (Output)
         * The unique identifier of the training phrase.
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param parts The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
         * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
         * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
         * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
         * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
         * Part.text is set to a part of the phrase that has no parameters.
         * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder parts(Output<List<CxIntentTrainingPhrasePartArgs>> parts) {
            $.parts = parts;
            return this;
        }

        /**
         * @param parts The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
         * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
         * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
         * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
         * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
         * Part.text is set to a part of the phrase that has no parameters.
         * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder parts(List<CxIntentTrainingPhrasePartArgs> parts) {
            return parts(Output.of(parts));
        }

        /**
         * @param parts The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
         * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
         * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
         * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
         * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
         * Part.text is set to a part of the phrase that has no parameters.
         * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder parts(CxIntentTrainingPhrasePartArgs... parts) {
            return parts(List.of(parts));
        }

        /**
         * @param repeatCount Indicates how many times this example was added to the intent.
         * 
         * @return builder
         * 
         */
        public Builder repeatCount(@Nullable Output<Integer> repeatCount) {
            $.repeatCount = repeatCount;
            return this;
        }

        /**
         * @param repeatCount Indicates how many times this example was added to the intent.
         * 
         * @return builder
         * 
         */
        public Builder repeatCount(Integer repeatCount) {
            return repeatCount(Output.of(repeatCount));
        }

        public CxIntentTrainingPhraseArgs build() {
            $.parts = Objects.requireNonNull($.parts, "expected parameter 'parts' to be non-null");
            return $;
        }
    }

}
