/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Textract { namespace Model { /** *

Each query contains the question you want to ask in the Text and the alias * you want to associate.

See Also:

AWS API * Reference

*/ class Query { public: AWS_TEXTRACT_API Query(); AWS_TEXTRACT_API Query(Aws::Utils::Json::JsonView jsonValue); AWS_TEXTRACT_API Query& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_TEXTRACT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline const Aws::String& GetText() const{ return m_text; } /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline bool TextHasBeenSet() const { return m_textHasBeenSet; } /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; } /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); } /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); } /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline Query& WithText(const Aws::String& value) { SetText(value); return *this;} /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline Query& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;} /** *

Question that Amazon Textract will apply to the document. An example would be * "What is the customer's SSN?"

*/ inline Query& WithText(const char* value) { SetText(value); return *this;} /** *

Alias attached to the query, for ease of location.

*/ inline const Aws::String& GetAlias() const{ return m_alias; } /** *

Alias attached to the query, for ease of location.

*/ inline bool AliasHasBeenSet() const { return m_aliasHasBeenSet; } /** *

Alias attached to the query, for ease of location.

*/ inline void SetAlias(const Aws::String& value) { m_aliasHasBeenSet = true; m_alias = value; } /** *

Alias attached to the query, for ease of location.

*/ inline void SetAlias(Aws::String&& value) { m_aliasHasBeenSet = true; m_alias = std::move(value); } /** *

Alias attached to the query, for ease of location.

*/ inline void SetAlias(const char* value) { m_aliasHasBeenSet = true; m_alias.assign(value); } /** *

Alias attached to the query, for ease of location.

*/ inline Query& WithAlias(const Aws::String& value) { SetAlias(value); return *this;} /** *

Alias attached to the query, for ease of location.

*/ inline Query& WithAlias(Aws::String&& value) { SetAlias(std::move(value)); return *this;} /** *

Alias attached to the query, for ease of location.

*/ inline Query& WithAlias(const char* value) { SetAlias(value); return *this;} /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline const Aws::Vector& GetPages() const{ return m_pages; } /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline bool PagesHasBeenSet() const { return m_pagesHasBeenSet; } /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline void SetPages(const Aws::Vector& value) { m_pagesHasBeenSet = true; m_pages = value; } /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline void SetPages(Aws::Vector&& value) { m_pagesHasBeenSet = true; m_pages = std::move(value); } /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline Query& WithPages(const Aws::Vector& value) { SetPages(value); return *this;} /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline Query& WithPages(Aws::Vector&& value) { SetPages(std::move(value)); return *this;} /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline Query& AddPages(const Aws::String& value) { m_pagesHasBeenSet = true; m_pages.push_back(value); return *this; } /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline Query& AddPages(Aws::String&& value) { m_pagesHasBeenSet = true; m_pages.push_back(std::move(value)); return *this; } /** *

Pages is a parameter that the user inputs to specify which pages to apply a * query to. The following is a list of rules for using this parameter.

    *
  • If a page is not specified, it is set to ["1"] by * default.

  • The following characters are allowed in the * parameter's string: 0 1 2 3 4 5 6 7 8 9 - *. No whitespace is * allowed.

  • When using * to indicate all pages, it must be the * only element in the list.

  • You can use page intervals, such as * [“1-3”, “1-1”, “4-*”]. Where * indicates last page of * document.

  • Specified pages must be greater than 0 and less than * or equal to the number of pages in the document.

*/ inline Query& AddPages(const char* value) { m_pagesHasBeenSet = true; m_pages.push_back(value); return *this; } private: Aws::String m_text; bool m_textHasBeenSet = false; Aws::String m_alias; bool m_aliasHasBeenSet = false; Aws::Vector m_pages; bool m_pagesHasBeenSet = false; }; } // namespace Model } // namespace Textract } // namespace Aws