#
# Copyright 2021 DataRobot, Inc. and its affiliates.
#
# All rights reserved.
#
# DataRobot, Inc.
#
# This is proprietary source code of DataRobot, Inc. and its
# affiliates.
#
# Released under the terms of DataRobot Tool and Utility Agreement.
"""
Autogenerated DataRobot python client file.  Please don't modify.
"""

import trafaret as t
from datarobot.models.api_object import APIObject
from datarobot.models.full_api.generated.model.dr_connector_v1_field import DRConnectorV1Field

class DRConnectorV1Create(APIObject):
    """
    Attributes
    ----------
    connector_id:str
         ID of the connector.
    fields:[DRConnectorV1Field]
         Connector fields.
    """
    _converter = t.Dict(
        {
            t.Key("connector_id"):  t.String(),
            t.Key("fields"):  t.List(t.Dict().allow_extra("*")),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        connector_id,
        fields,
    ):
        self.connector_id = connector_id
        self.fields = fields

    def __repr__(self):
        return (
            "DRConnectorV1Create("
            "connector_id={0.connector_id}, "
            "fields={0.fields}, "
        ).format(self)
