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

A multi-expression that searches for the specified resource or resources in a * search. All resource objects that satisfy the expression's condition are * included in the search results. You must specify at least one subexpression, * filter, or nested filter. A SearchExpression can contain up to * twenty elements.

A SearchExpression contains the following * components:

  • A list of Filter objects. Each filter * defines a simple Boolean expression comprised of a resource property name, * Boolean operator, and value.

  • A list of * NestedFilter objects. Each nested filter defines a list of Boolean * expressions using a list of resource properties. A nested filter is satisfied if * a single object in the list satisfies all Boolean expressions.

  • *

    A list of SearchExpression objects. A search expression object * can be nested in a list of search expression objects.

  • A * Boolean operator: And or Or.

See * Also:

AWS * API Reference

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

A list of filter objects.

*/ inline const Aws::Vector& GetFilters() const{ return m_filters; } /** *

A list of filter objects.

*/ inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; } /** *

A list of filter objects.

*/ inline void SetFilters(const Aws::Vector& value) { m_filtersHasBeenSet = true; m_filters = value; } /** *

A list of filter objects.

*/ inline void SetFilters(Aws::Vector&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); } /** *

A list of filter objects.

*/ inline SearchExpression& WithFilters(const Aws::Vector& value) { SetFilters(value); return *this;} /** *

A list of filter objects.

*/ inline SearchExpression& WithFilters(Aws::Vector&& value) { SetFilters(std::move(value)); return *this;} /** *

A list of filter objects.

*/ inline SearchExpression& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; } /** *

A list of filter objects.

*/ inline SearchExpression& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; } /** *

A list of nested filter objects.

*/ inline const Aws::Vector& GetNestedFilters() const{ return m_nestedFilters; } /** *

A list of nested filter objects.

*/ inline bool NestedFiltersHasBeenSet() const { return m_nestedFiltersHasBeenSet; } /** *

A list of nested filter objects.

*/ inline void SetNestedFilters(const Aws::Vector& value) { m_nestedFiltersHasBeenSet = true; m_nestedFilters = value; } /** *

A list of nested filter objects.

*/ inline void SetNestedFilters(Aws::Vector&& value) { m_nestedFiltersHasBeenSet = true; m_nestedFilters = std::move(value); } /** *

A list of nested filter objects.

*/ inline SearchExpression& WithNestedFilters(const Aws::Vector& value) { SetNestedFilters(value); return *this;} /** *

A list of nested filter objects.

*/ inline SearchExpression& WithNestedFilters(Aws::Vector&& value) { SetNestedFilters(std::move(value)); return *this;} /** *

A list of nested filter objects.

*/ inline SearchExpression& AddNestedFilters(const NestedFilters& value) { m_nestedFiltersHasBeenSet = true; m_nestedFilters.push_back(value); return *this; } /** *

A list of nested filter objects.

*/ inline SearchExpression& AddNestedFilters(NestedFilters&& value) { m_nestedFiltersHasBeenSet = true; m_nestedFilters.push_back(std::move(value)); return *this; } /** *

A list of search expression objects.

*/ inline const Aws::Vector& GetSubExpressions() const{ return m_subExpressions; } /** *

A list of search expression objects.

*/ inline bool SubExpressionsHasBeenSet() const { return m_subExpressionsHasBeenSet; } /** *

A list of search expression objects.

*/ inline void SetSubExpressions(const Aws::Vector& value) { m_subExpressionsHasBeenSet = true; m_subExpressions = value; } /** *

A list of search expression objects.

*/ inline void SetSubExpressions(Aws::Vector&& value) { m_subExpressionsHasBeenSet = true; m_subExpressions = std::move(value); } /** *

A list of search expression objects.

*/ inline SearchExpression& WithSubExpressions(const Aws::Vector& value) { SetSubExpressions(value); return *this;} /** *

A list of search expression objects.

*/ inline SearchExpression& WithSubExpressions(Aws::Vector&& value) { SetSubExpressions(std::move(value)); return *this;} /** *

A list of search expression objects.

*/ inline SearchExpression& AddSubExpressions(const SearchExpression& value) { m_subExpressionsHasBeenSet = true; m_subExpressions.push_back(value); return *this; } /** *

A list of search expression objects.

*/ inline SearchExpression& AddSubExpressions(SearchExpression&& value) { m_subExpressionsHasBeenSet = true; m_subExpressions.push_back(std::move(value)); return *this; } /** *

A Boolean operator used to evaluate the search expression. If you want every * conditional statement in all lists to be satisfied for the entire search * expression to be true, specify And. If only a single conditional * statement needs to be true for the entire search expression to be true, specify * Or. The default value is And.

*/ inline const BooleanOperator& GetOperator() const{ return m_operator; } /** *

A Boolean operator used to evaluate the search expression. If you want every * conditional statement in all lists to be satisfied for the entire search * expression to be true, specify And. If only a single conditional * statement needs to be true for the entire search expression to be true, specify * Or. The default value is And.

*/ inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; } /** *

A Boolean operator used to evaluate the search expression. If you want every * conditional statement in all lists to be satisfied for the entire search * expression to be true, specify And. If only a single conditional * statement needs to be true for the entire search expression to be true, specify * Or. The default value is And.

*/ inline void SetOperator(const BooleanOperator& value) { m_operatorHasBeenSet = true; m_operator = value; } /** *

A Boolean operator used to evaluate the search expression. If you want every * conditional statement in all lists to be satisfied for the entire search * expression to be true, specify And. If only a single conditional * statement needs to be true for the entire search expression to be true, specify * Or. The default value is And.

*/ inline void SetOperator(BooleanOperator&& value) { m_operatorHasBeenSet = true; m_operator = std::move(value); } /** *

A Boolean operator used to evaluate the search expression. If you want every * conditional statement in all lists to be satisfied for the entire search * expression to be true, specify And. If only a single conditional * statement needs to be true for the entire search expression to be true, specify * Or. The default value is And.

*/ inline SearchExpression& WithOperator(const BooleanOperator& value) { SetOperator(value); return *this;} /** *

A Boolean operator used to evaluate the search expression. If you want every * conditional statement in all lists to be satisfied for the entire search * expression to be true, specify And. If only a single conditional * statement needs to be true for the entire search expression to be true, specify * Or. The default value is And.

*/ inline SearchExpression& WithOperator(BooleanOperator&& value) { SetOperator(std::move(value)); return *this;} private: Aws::Vector m_filters; bool m_filtersHasBeenSet = false; Aws::Vector m_nestedFilters; bool m_nestedFiltersHasBeenSet = false; Aws::Vector m_subExpressions; bool m_subExpressionsHasBeenSet = false; BooleanOperator m_operator; bool m_operatorHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws