// *** 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.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.diagflow.outputs.CxIntentTrainingPhrasePart;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CxIntentTrainingPhrase {
    /**
     * @return (Output)
     * The unique identifier of the training phrase.
     * 
     */
    private @Nullable String id;
    /**
     * @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.
     * 
     */
    private List<CxIntentTrainingPhrasePart> parts;
    /**
     * @return Indicates how many times this example was added to the intent.
     * 
     */
    private @Nullable Integer repeatCount;

    private CxIntentTrainingPhrase() {}
    /**
     * @return (Output)
     * The unique identifier of the training phrase.
     * 
     */
    public Optional<String> id() {
        return Optional.ofNullable(this.id);
    }
    /**
     * @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 List<CxIntentTrainingPhrasePart> parts() {
        return this.parts;
    }
    /**
     * @return Indicates how many times this example was added to the intent.
     * 
     */
    public Optional<Integer> repeatCount() {
        return Optional.ofNullable(this.repeatCount);
    }

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

    public static Builder builder(CxIntentTrainingPhrase defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String id;
        private List<CxIntentTrainingPhrasePart> parts;
        private @Nullable Integer repeatCount;
        public Builder() {}
        public Builder(CxIntentTrainingPhrase defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.id = defaults.id;
    	      this.parts = defaults.parts;
    	      this.repeatCount = defaults.repeatCount;
        }

        @CustomType.Setter
        public Builder id(@Nullable String id) {
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder parts(List<CxIntentTrainingPhrasePart> parts) {
            this.parts = Objects.requireNonNull(parts);
            return this;
        }
        public Builder parts(CxIntentTrainingPhrasePart... parts) {
            return parts(List.of(parts));
        }
        @CustomType.Setter
        public Builder repeatCount(@Nullable Integer repeatCount) {
            this.repeatCount = repeatCount;
            return this;
        }
        public CxIntentTrainingPhrase build() {
            final var o = new CxIntentTrainingPhrase();
            o.id = id;
            o.parts = parts;
            o.repeatCount = repeatCount;
            return o;
        }
    }
}
