# -*- coding: utf-8 -*-

"""
restapisdk

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""


class ApiRestV2DatabaseTableRunqueryRequest(object):

    """Implementation of the 'Api Rest V2 Database Table Runquery Request' model.

    TODO: type model description here.

    Attributes:
        statement (list of string): A JSON array of TQL statements.    Each
            TQL statement should end with semi-colon (;).    The TQL
            operations that can be run through this API are restricted to
            create database and schema, alter table, delete and update table
            rows.    If a TQL statement fails, then the subsequent statements
            in the array are not run.    Example:    alter table
            test_db.test_schema.test_table drop contraint primary key;

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "statement": 'statement'
    }

    def __init__(self,
                 statement=None):
        """Constructor for the ApiRestV2DatabaseTableRunqueryRequest class"""

        # Initialize members of the class
        self.statement = statement

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        statement = dictionary.get('statement')

        # Return an object of this model
        return cls(statement)
