lentiq.models.notebook_code_block module
# coding: utf-8 ####alex test """ """ import pprint import re # noqa: F401 import six from lentiq.models.code_block import CodeBlock # noqa: F401,E501 from lentiq.models.code_block_configuration import CodeBlockConfiguration # noqa: F401,E501 from lentiq.models.code_block_current_operation_status import CodeBlockCurrentOperationStatus # noqa: F401,E501 from lentiq.models.container_image import ContainerImage # noqa: F401,E501 from lentiq.models.notebook_code_block_configuration import NotebookCodeBlockConfiguration # noqa: F401,E501 class NotebookCodeBlock(CodeBlock): """ """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'code_block_configuration': 'NotebookCodeBlockConfiguration', 'code_block_current_operation_status': 'CodeBlockCurrentOperationStatus', 'code_block_publish_status': 'str', 'code_block_status': 'str', 'code_block_type': 'str', 'container_image': 'ContainerImage', 'created_timestamp': 'datetime', 'datalake_id': 'int', 'datalake_name': 'str', 'datapool_name': 'str', 'description': 'str', 'labels': 'list[str]', 'name': 'str', 'owner_email': 'str', 'owner_id': 'int', 'project_name': 'str', 'subscriber_emails': 'list[str]', 'updated_timestamp': 'datetime', 'use_credentials': 'bool', 'visibility': 'str' } attribute_map = { 'code_block_configuration': 'codeBlockConfiguration', 'code_block_current_operation_status': 'codeBlockCurrentOperationStatus', 'code_block_publish_status': 'codeBlockPublishStatus', 'code_block_status': 'codeBlockStatus', 'code_block_type': 'codeBlockType', 'container_image': 'containerImage', 'created_timestamp': 'createdTimestamp', 'datalake_id': 'datalakeId', 'datalake_name': 'datalakeName', 'datapool_name': 'datapoolName', 'description': 'description', 'labels': 'labels', 'name': 'name', 'owner_email': 'ownerEmail', 'owner_id': 'ownerId', 'project_name': 'projectName', 'subscriber_emails': 'subscriberEmails', 'updated_timestamp': 'updatedTimestamp', 'use_credentials': 'useCredentials', 'visibility': 'visibility' } discriminator = None def __init__(self, code_block_configuration=None, code_block_current_operation_status=None, code_block_publish_status=None, code_block_status=None, code_block_type=None, container_image=None, created_timestamp=None, datalake_id=None, datalake_name=None, datapool_name=None, description=None, labels=None, name=None, owner_email=None, owner_id=None, project_name=None, subscriber_emails=None, updated_timestamp=None, use_credentials=None, visibility=None): # noqa: E501 """NotebookCodeBlock - a model defined in Swagger""" # noqa: E501 self._code_block_configuration = None self._code_block_current_operation_status = None self._code_block_publish_status = None self._code_block_status = None self._code_block_type = None self._container_image = None self._created_timestamp = None self._datalake_id = None self._datalake_name = None self._datapool_name = None self._description = None self._labels = None self._name = None self._owner_email = None self._owner_id = None self._project_name = None self._subscriber_emails = None self._updated_timestamp = None self._use_credentials = None self._visibility = None if code_block_configuration is not None: self.code_block_configuration = code_block_configuration if code_block_current_operation_status is not None: self.code_block_current_operation_status = code_block_current_operation_status if code_block_publish_status is not None: self.code_block_publish_status = code_block_publish_status if code_block_status is not None: self.code_block_status = code_block_status if code_block_type is not None: self.code_block_type = code_block_type if container_image is not None: self.container_image = container_image if created_timestamp is not None: self.created_timestamp = created_timestamp if datalake_id is not None: self.datalake_id = datalake_id if datalake_name is not None: self.datalake_name = datalake_name if datapool_name is not None: self.datapool_name = datapool_name if description is not None: self.description = description if labels is not None: self.labels = labels if name is not None: self.name = name if owner_email is not None: self.owner_email = owner_email if owner_id is not None: self.owner_id = owner_id if project_name is not None: self.project_name = project_name if subscriber_emails is not None: self.subscriber_emails = subscriber_emails if updated_timestamp is not None: self.updated_timestamp = updated_timestamp if use_credentials is not None: self.use_credentials = use_credentials if visibility is not None: self.visibility = visibility @property def code_block_configuration(self): """Gets the code_block_configuration of this NotebookCodeBlock. # noqa: E501 :return: The code_block_configuration of this NotebookCodeBlock. # noqa: E501 :rtype: NotebookCodeBlockConfiguration """ return self._code_block_configuration @code_block_configuration.setter def code_block_configuration(self, code_block_configuration): """Sets the code_block_configuration of this NotebookCodeBlock. :param code_block_configuration: The code_block_configuration of this NotebookCodeBlock. # noqa: E501 :type: NotebookCodeBlockConfiguration """ self._code_block_configuration = code_block_configuration @property def code_block_current_operation_status(self): """Gets the code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501 :return: The code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501 :rtype: CodeBlockCurrentOperationStatus """ return self._code_block_current_operation_status @code_block_current_operation_status.setter def code_block_current_operation_status(self, code_block_current_operation_status): """Sets the code_block_current_operation_status of this NotebookCodeBlock. :param code_block_current_operation_status: The code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501 :type: CodeBlockCurrentOperationStatus """ self._code_block_current_operation_status = code_block_current_operation_status @property def code_block_publish_status(self): """Gets the code_block_publish_status of this NotebookCodeBlock. # noqa: E501 Publish status of the code block. # noqa: E501 :return: The code_block_publish_status of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._code_block_publish_status @code_block_publish_status.setter def code_block_publish_status(self, code_block_publish_status): """Sets the code_block_publish_status of this NotebookCodeBlock. Publish status of the code block. # noqa: E501 :param code_block_publish_status: The code_block_publish_status of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Publishing", "Published", "Unpublishing", "Unpublished"] # noqa: E501 if code_block_publish_status not in allowed_values: raise ValueError( "Invalid value for `code_block_publish_status` ({0}), must be one of {1}" # noqa: E501 .format(code_block_publish_status, allowed_values) ) self._code_block_publish_status = code_block_publish_status @property def code_block_status(self): """Gets the code_block_status of this NotebookCodeBlock. # noqa: E501 Status of the code block. # noqa: E501 :return: The code_block_status of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._code_block_status @code_block_status.setter def code_block_status(self, code_block_status): """Sets the code_block_status of this NotebookCodeBlock. Status of the code block. # noqa: E501 :param code_block_status: The code_block_status of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Creating", "Created", "Deleting"] # noqa: E501 if code_block_status not in allowed_values: raise ValueError( "Invalid value for `code_block_status` ({0}), must be one of {1}" # noqa: E501 .format(code_block_status, allowed_values) ) self._code_block_status = code_block_status @property def code_block_type(self): """Gets the code_block_type of this NotebookCodeBlock. # noqa: E501 The type of the code block, as to be displayed in the interface. # noqa: E501 :return: The code_block_type of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._code_block_type @code_block_type.setter def code_block_type(self, code_block_type): """Sets the code_block_type of this NotebookCodeBlock. The type of the code block, as to be displayed in the interface. # noqa: E501 :param code_block_type: The code_block_type of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Notebook", "Container"] # noqa: E501 if code_block_type not in allowed_values: raise ValueError( "Invalid value for `code_block_type` ({0}), must be one of {1}" # noqa: E501 .format(code_block_type, allowed_values) ) self._code_block_type = code_block_type @property def container_image(self): """Gets the container_image of this NotebookCodeBlock. # noqa: E501 :return: The container_image of this NotebookCodeBlock. # noqa: E501 :rtype: ContainerImage """ return self._container_image @container_image.setter def container_image(self, container_image): """Sets the container_image of this NotebookCodeBlock. :param container_image: The container_image of this NotebookCodeBlock. # noqa: E501 :type: ContainerImage """ self._container_image = container_image @property def created_timestamp(self): """Gets the created_timestamp of this NotebookCodeBlock. # noqa: E501 The timestamp when the code block got created. # noqa: E501 :return: The created_timestamp of this NotebookCodeBlock. # noqa: E501 :rtype: datetime """ return self._created_timestamp @created_timestamp.setter def created_timestamp(self, created_timestamp): """Sets the created_timestamp of this NotebookCodeBlock. The timestamp when the code block got created. # noqa: E501 :param created_timestamp: The created_timestamp of this NotebookCodeBlock. # noqa: E501 :type: datetime """ self._created_timestamp = created_timestamp @property def datalake_id(self): """Gets the datalake_id of this NotebookCodeBlock. # noqa: E501 The ID of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The datalake_id of this NotebookCodeBlock. # noqa: E501 :rtype: int """ return self._datalake_id @datalake_id.setter def datalake_id(self, datalake_id): """Sets the datalake_id of this NotebookCodeBlock. The ID of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param datalake_id: The datalake_id of this NotebookCodeBlock. # noqa: E501 :type: int """ self._datalake_id = datalake_id @property def datalake_name(self): """Gets the datalake_name of this NotebookCodeBlock. # noqa: E501 The name of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The datalake_name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._datalake_name @datalake_name.setter def datalake_name(self, datalake_name): """Sets the datalake_name of this NotebookCodeBlock. The name of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param datalake_name: The datalake_name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._datalake_name = datalake_name @property def datapool_name(self): """Gets the datapool_name of this NotebookCodeBlock. # noqa: E501 The name of the datapool from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The datapool_name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._datapool_name @datapool_name.setter def datapool_name(self, datapool_name): """Sets the datapool_name of this NotebookCodeBlock. The name of the datapool from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param datapool_name: The datapool_name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._datapool_name = datapool_name @property def description(self): """Gets the description of this NotebookCodeBlock. # noqa: E501 The description of the code block. # noqa: E501 :return: The description of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this NotebookCodeBlock. The description of the code block. # noqa: E501 :param description: The description of this NotebookCodeBlock. # noqa: E501 :type: str """ self._description = description @property def labels(self): """Gets the labels of this NotebookCodeBlock. # noqa: E501 List of labels that describes the code block. # noqa: E501 :return: The labels of this NotebookCodeBlock. # noqa: E501 :rtype: list[str] """ return self._labels @labels.setter def labels(self, labels): """Sets the labels of this NotebookCodeBlock. List of labels that describes the code block. # noqa: E501 :param labels: The labels of this NotebookCodeBlock. # noqa: E501 :type: list[str] """ self._labels = labels @property def name(self): """Gets the name of this NotebookCodeBlock. # noqa: E501 The name of the code block. # noqa: E501 :return: The name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this NotebookCodeBlock. The name of the code block. # noqa: E501 :param name: The name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._name = name @property def owner_email(self): """Gets the owner_email of this NotebookCodeBlock. # noqa: E501 User e-mail of the owner of the code block. # noqa: E501 :return: The owner_email of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._owner_email @owner_email.setter def owner_email(self, owner_email): """Sets the owner_email of this NotebookCodeBlock. User e-mail of the owner of the code block. # noqa: E501 :param owner_email: The owner_email of this NotebookCodeBlock. # noqa: E501 :type: str """ self._owner_email = owner_email @property def owner_id(self): """Gets the owner_id of this NotebookCodeBlock. # noqa: E501 User ID of the owner of the code block. # noqa: E501 :return: The owner_id of this NotebookCodeBlock. # noqa: E501 :rtype: int """ return self._owner_id @owner_id.setter def owner_id(self, owner_id): """Sets the owner_id of this NotebookCodeBlock. User ID of the owner of the code block. # noqa: E501 :param owner_id: The owner_id of this NotebookCodeBlock. # noqa: E501 :type: int """ self._owner_id = owner_id @property def project_name(self): """Gets the project_name of this NotebookCodeBlock. # noqa: E501 The name of the project from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The project_name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._project_name @project_name.setter def project_name(self, project_name): """Sets the project_name of this NotebookCodeBlock. The name of the project from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param project_name: The project_name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._project_name = project_name @property def subscriber_emails(self): """Gets the subscriber_emails of this NotebookCodeBlock. # noqa: E501 List of the user e-mails of those who subscribed to this code block. # noqa: E501 :return: The subscriber_emails of this NotebookCodeBlock. # noqa: E501 :rtype: list[str] """ return self._subscriber_emails @subscriber_emails.setter def subscriber_emails(self, subscriber_emails): """Sets the subscriber_emails of this NotebookCodeBlock. List of the user e-mails of those who subscribed to this code block. # noqa: E501 :param subscriber_emails: The subscriber_emails of this NotebookCodeBlock. # noqa: E501 :type: list[str] """ self._subscriber_emails = subscriber_emails @property def updated_timestamp(self): """Gets the updated_timestamp of this NotebookCodeBlock. # noqa: E501 The timestamp when the code block got last time updated. # noqa: E501 :return: The updated_timestamp of this NotebookCodeBlock. # noqa: E501 :rtype: datetime """ return self._updated_timestamp @updated_timestamp.setter def updated_timestamp(self, updated_timestamp): """Sets the updated_timestamp of this NotebookCodeBlock. The timestamp when the code block got last time updated. # noqa: E501 :param updated_timestamp: The updated_timestamp of this NotebookCodeBlock. # noqa: E501 :type: datetime """ self._updated_timestamp = updated_timestamp @property def use_credentials(self): """Gets the use_credentials of this NotebookCodeBlock. # noqa: E501 Shows whether or not the image repository will use credentials or not. # noqa: E501 :return: The use_credentials of this NotebookCodeBlock. # noqa: E501 :rtype: bool """ return self._use_credentials @use_credentials.setter def use_credentials(self, use_credentials): """Sets the use_credentials of this NotebookCodeBlock. Shows whether or not the image repository will use credentials or not. # noqa: E501 :param use_credentials: The use_credentials of this NotebookCodeBlock. # noqa: E501 :type: bool """ self._use_credentials = use_credentials @property def visibility(self): """Gets the visibility of this NotebookCodeBlock. # noqa: E501 Visibility mode of the code block. # noqa: E501 :return: The visibility of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._visibility @visibility.setter def visibility(self, visibility): """Sets the visibility of this NotebookCodeBlock. Visibility mode of the code block. # noqa: E501 :param visibility: The visibility of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Public", "Datalake", "Datapool", "Project"] # noqa: E501 if visibility not in allowed_values: raise ValueError( "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 .format(visibility, allowed_values) ) self._visibility = visibility def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(NotebookCodeBlock, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NotebookCodeBlock): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Classes
class NotebookCodeBlock
class NotebookCodeBlock(CodeBlock): """ """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'code_block_configuration': 'NotebookCodeBlockConfiguration', 'code_block_current_operation_status': 'CodeBlockCurrentOperationStatus', 'code_block_publish_status': 'str', 'code_block_status': 'str', 'code_block_type': 'str', 'container_image': 'ContainerImage', 'created_timestamp': 'datetime', 'datalake_id': 'int', 'datalake_name': 'str', 'datapool_name': 'str', 'description': 'str', 'labels': 'list[str]', 'name': 'str', 'owner_email': 'str', 'owner_id': 'int', 'project_name': 'str', 'subscriber_emails': 'list[str]', 'updated_timestamp': 'datetime', 'use_credentials': 'bool', 'visibility': 'str' } attribute_map = { 'code_block_configuration': 'codeBlockConfiguration', 'code_block_current_operation_status': 'codeBlockCurrentOperationStatus', 'code_block_publish_status': 'codeBlockPublishStatus', 'code_block_status': 'codeBlockStatus', 'code_block_type': 'codeBlockType', 'container_image': 'containerImage', 'created_timestamp': 'createdTimestamp', 'datalake_id': 'datalakeId', 'datalake_name': 'datalakeName', 'datapool_name': 'datapoolName', 'description': 'description', 'labels': 'labels', 'name': 'name', 'owner_email': 'ownerEmail', 'owner_id': 'ownerId', 'project_name': 'projectName', 'subscriber_emails': 'subscriberEmails', 'updated_timestamp': 'updatedTimestamp', 'use_credentials': 'useCredentials', 'visibility': 'visibility' } discriminator = None def __init__(self, code_block_configuration=None, code_block_current_operation_status=None, code_block_publish_status=None, code_block_status=None, code_block_type=None, container_image=None, created_timestamp=None, datalake_id=None, datalake_name=None, datapool_name=None, description=None, labels=None, name=None, owner_email=None, owner_id=None, project_name=None, subscriber_emails=None, updated_timestamp=None, use_credentials=None, visibility=None): # noqa: E501 """NotebookCodeBlock - a model defined in Swagger""" # noqa: E501 self._code_block_configuration = None self._code_block_current_operation_status = None self._code_block_publish_status = None self._code_block_status = None self._code_block_type = None self._container_image = None self._created_timestamp = None self._datalake_id = None self._datalake_name = None self._datapool_name = None self._description = None self._labels = None self._name = None self._owner_email = None self._owner_id = None self._project_name = None self._subscriber_emails = None self._updated_timestamp = None self._use_credentials = None self._visibility = None if code_block_configuration is not None: self.code_block_configuration = code_block_configuration if code_block_current_operation_status is not None: self.code_block_current_operation_status = code_block_current_operation_status if code_block_publish_status is not None: self.code_block_publish_status = code_block_publish_status if code_block_status is not None: self.code_block_status = code_block_status if code_block_type is not None: self.code_block_type = code_block_type if container_image is not None: self.container_image = container_image if created_timestamp is not None: self.created_timestamp = created_timestamp if datalake_id is not None: self.datalake_id = datalake_id if datalake_name is not None: self.datalake_name = datalake_name if datapool_name is not None: self.datapool_name = datapool_name if description is not None: self.description = description if labels is not None: self.labels = labels if name is not None: self.name = name if owner_email is not None: self.owner_email = owner_email if owner_id is not None: self.owner_id = owner_id if project_name is not None: self.project_name = project_name if subscriber_emails is not None: self.subscriber_emails = subscriber_emails if updated_timestamp is not None: self.updated_timestamp = updated_timestamp if use_credentials is not None: self.use_credentials = use_credentials if visibility is not None: self.visibility = visibility @property def code_block_configuration(self): """Gets the code_block_configuration of this NotebookCodeBlock. # noqa: E501 :return: The code_block_configuration of this NotebookCodeBlock. # noqa: E501 :rtype: NotebookCodeBlockConfiguration """ return self._code_block_configuration @code_block_configuration.setter def code_block_configuration(self, code_block_configuration): """Sets the code_block_configuration of this NotebookCodeBlock. :param code_block_configuration: The code_block_configuration of this NotebookCodeBlock. # noqa: E501 :type: NotebookCodeBlockConfiguration """ self._code_block_configuration = code_block_configuration @property def code_block_current_operation_status(self): """Gets the code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501 :return: The code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501 :rtype: CodeBlockCurrentOperationStatus """ return self._code_block_current_operation_status @code_block_current_operation_status.setter def code_block_current_operation_status(self, code_block_current_operation_status): """Sets the code_block_current_operation_status of this NotebookCodeBlock. :param code_block_current_operation_status: The code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501 :type: CodeBlockCurrentOperationStatus """ self._code_block_current_operation_status = code_block_current_operation_status @property def code_block_publish_status(self): """Gets the code_block_publish_status of this NotebookCodeBlock. # noqa: E501 Publish status of the code block. # noqa: E501 :return: The code_block_publish_status of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._code_block_publish_status @code_block_publish_status.setter def code_block_publish_status(self, code_block_publish_status): """Sets the code_block_publish_status of this NotebookCodeBlock. Publish status of the code block. # noqa: E501 :param code_block_publish_status: The code_block_publish_status of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Publishing", "Published", "Unpublishing", "Unpublished"] # noqa: E501 if code_block_publish_status not in allowed_values: raise ValueError( "Invalid value for `code_block_publish_status` ({0}), must be one of {1}" # noqa: E501 .format(code_block_publish_status, allowed_values) ) self._code_block_publish_status = code_block_publish_status @property def code_block_status(self): """Gets the code_block_status of this NotebookCodeBlock. # noqa: E501 Status of the code block. # noqa: E501 :return: The code_block_status of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._code_block_status @code_block_status.setter def code_block_status(self, code_block_status): """Sets the code_block_status of this NotebookCodeBlock. Status of the code block. # noqa: E501 :param code_block_status: The code_block_status of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Creating", "Created", "Deleting"] # noqa: E501 if code_block_status not in allowed_values: raise ValueError( "Invalid value for `code_block_status` ({0}), must be one of {1}" # noqa: E501 .format(code_block_status, allowed_values) ) self._code_block_status = code_block_status @property def code_block_type(self): """Gets the code_block_type of this NotebookCodeBlock. # noqa: E501 The type of the code block, as to be displayed in the interface. # noqa: E501 :return: The code_block_type of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._code_block_type @code_block_type.setter def code_block_type(self, code_block_type): """Sets the code_block_type of this NotebookCodeBlock. The type of the code block, as to be displayed in the interface. # noqa: E501 :param code_block_type: The code_block_type of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Notebook", "Container"] # noqa: E501 if code_block_type not in allowed_values: raise ValueError( "Invalid value for `code_block_type` ({0}), must be one of {1}" # noqa: E501 .format(code_block_type, allowed_values) ) self._code_block_type = code_block_type @property def container_image(self): """Gets the container_image of this NotebookCodeBlock. # noqa: E501 :return: The container_image of this NotebookCodeBlock. # noqa: E501 :rtype: ContainerImage """ return self._container_image @container_image.setter def container_image(self, container_image): """Sets the container_image of this NotebookCodeBlock. :param container_image: The container_image of this NotebookCodeBlock. # noqa: E501 :type: ContainerImage """ self._container_image = container_image @property def created_timestamp(self): """Gets the created_timestamp of this NotebookCodeBlock. # noqa: E501 The timestamp when the code block got created. # noqa: E501 :return: The created_timestamp of this NotebookCodeBlock. # noqa: E501 :rtype: datetime """ return self._created_timestamp @created_timestamp.setter def created_timestamp(self, created_timestamp): """Sets the created_timestamp of this NotebookCodeBlock. The timestamp when the code block got created. # noqa: E501 :param created_timestamp: The created_timestamp of this NotebookCodeBlock. # noqa: E501 :type: datetime """ self._created_timestamp = created_timestamp @property def datalake_id(self): """Gets the datalake_id of this NotebookCodeBlock. # noqa: E501 The ID of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The datalake_id of this NotebookCodeBlock. # noqa: E501 :rtype: int """ return self._datalake_id @datalake_id.setter def datalake_id(self, datalake_id): """Sets the datalake_id of this NotebookCodeBlock. The ID of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param datalake_id: The datalake_id of this NotebookCodeBlock. # noqa: E501 :type: int """ self._datalake_id = datalake_id @property def datalake_name(self): """Gets the datalake_name of this NotebookCodeBlock. # noqa: E501 The name of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The datalake_name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._datalake_name @datalake_name.setter def datalake_name(self, datalake_name): """Sets the datalake_name of this NotebookCodeBlock. The name of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param datalake_name: The datalake_name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._datalake_name = datalake_name @property def datapool_name(self): """Gets the datapool_name of this NotebookCodeBlock. # noqa: E501 The name of the datapool from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The datapool_name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._datapool_name @datapool_name.setter def datapool_name(self, datapool_name): """Sets the datapool_name of this NotebookCodeBlock. The name of the datapool from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param datapool_name: The datapool_name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._datapool_name = datapool_name @property def description(self): """Gets the description of this NotebookCodeBlock. # noqa: E501 The description of the code block. # noqa: E501 :return: The description of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this NotebookCodeBlock. The description of the code block. # noqa: E501 :param description: The description of this NotebookCodeBlock. # noqa: E501 :type: str """ self._description = description @property def labels(self): """Gets the labels of this NotebookCodeBlock. # noqa: E501 List of labels that describes the code block. # noqa: E501 :return: The labels of this NotebookCodeBlock. # noqa: E501 :rtype: list[str] """ return self._labels @labels.setter def labels(self, labels): """Sets the labels of this NotebookCodeBlock. List of labels that describes the code block. # noqa: E501 :param labels: The labels of this NotebookCodeBlock. # noqa: E501 :type: list[str] """ self._labels = labels @property def name(self): """Gets the name of this NotebookCodeBlock. # noqa: E501 The name of the code block. # noqa: E501 :return: The name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this NotebookCodeBlock. The name of the code block. # noqa: E501 :param name: The name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._name = name @property def owner_email(self): """Gets the owner_email of this NotebookCodeBlock. # noqa: E501 User e-mail of the owner of the code block. # noqa: E501 :return: The owner_email of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._owner_email @owner_email.setter def owner_email(self, owner_email): """Sets the owner_email of this NotebookCodeBlock. User e-mail of the owner of the code block. # noqa: E501 :param owner_email: The owner_email of this NotebookCodeBlock. # noqa: E501 :type: str """ self._owner_email = owner_email @property def owner_id(self): """Gets the owner_id of this NotebookCodeBlock. # noqa: E501 User ID of the owner of the code block. # noqa: E501 :return: The owner_id of this NotebookCodeBlock. # noqa: E501 :rtype: int """ return self._owner_id @owner_id.setter def owner_id(self, owner_id): """Sets the owner_id of this NotebookCodeBlock. User ID of the owner of the code block. # noqa: E501 :param owner_id: The owner_id of this NotebookCodeBlock. # noqa: E501 :type: int """ self._owner_id = owner_id @property def project_name(self): """Gets the project_name of this NotebookCodeBlock. # noqa: E501 The name of the project from which the code block was created. It can be null, depending on visibility. # noqa: E501 :return: The project_name of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._project_name @project_name.setter def project_name(self, project_name): """Sets the project_name of this NotebookCodeBlock. The name of the project from which the code block was created. It can be null, depending on visibility. # noqa: E501 :param project_name: The project_name of this NotebookCodeBlock. # noqa: E501 :type: str """ self._project_name = project_name @property def subscriber_emails(self): """Gets the subscriber_emails of this NotebookCodeBlock. # noqa: E501 List of the user e-mails of those who subscribed to this code block. # noqa: E501 :return: The subscriber_emails of this NotebookCodeBlock. # noqa: E501 :rtype: list[str] """ return self._subscriber_emails @subscriber_emails.setter def subscriber_emails(self, subscriber_emails): """Sets the subscriber_emails of this NotebookCodeBlock. List of the user e-mails of those who subscribed to this code block. # noqa: E501 :param subscriber_emails: The subscriber_emails of this NotebookCodeBlock. # noqa: E501 :type: list[str] """ self._subscriber_emails = subscriber_emails @property def updated_timestamp(self): """Gets the updated_timestamp of this NotebookCodeBlock. # noqa: E501 The timestamp when the code block got last time updated. # noqa: E501 :return: The updated_timestamp of this NotebookCodeBlock. # noqa: E501 :rtype: datetime """ return self._updated_timestamp @updated_timestamp.setter def updated_timestamp(self, updated_timestamp): """Sets the updated_timestamp of this NotebookCodeBlock. The timestamp when the code block got last time updated. # noqa: E501 :param updated_timestamp: The updated_timestamp of this NotebookCodeBlock. # noqa: E501 :type: datetime """ self._updated_timestamp = updated_timestamp @property def use_credentials(self): """Gets the use_credentials of this NotebookCodeBlock. # noqa: E501 Shows whether or not the image repository will use credentials or not. # noqa: E501 :return: The use_credentials of this NotebookCodeBlock. # noqa: E501 :rtype: bool """ return self._use_credentials @use_credentials.setter def use_credentials(self, use_credentials): """Sets the use_credentials of this NotebookCodeBlock. Shows whether or not the image repository will use credentials or not. # noqa: E501 :param use_credentials: The use_credentials of this NotebookCodeBlock. # noqa: E501 :type: bool """ self._use_credentials = use_credentials @property def visibility(self): """Gets the visibility of this NotebookCodeBlock. # noqa: E501 Visibility mode of the code block. # noqa: E501 :return: The visibility of this NotebookCodeBlock. # noqa: E501 :rtype: str """ return self._visibility @visibility.setter def visibility(self, visibility): """Sets the visibility of this NotebookCodeBlock. Visibility mode of the code block. # noqa: E501 :param visibility: The visibility of this NotebookCodeBlock. # noqa: E501 :type: str """ allowed_values = ["Public", "Datalake", "Datapool", "Project"] # noqa: E501 if visibility not in allowed_values: raise ValueError( "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 .format(visibility, allowed_values) ) self._visibility = visibility def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(NotebookCodeBlock, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NotebookCodeBlock): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Ancestors (in MRO)
- NotebookCodeBlock
- lentiq.models.code_block.CodeBlock
- builtins.object
Class variables
var attribute_map
var discriminator
var swagger_types
Static methods
def __init__(
self, code_block_configuration=None, code_block_current_operation_status=None, code_block_publish_status=None, code_block_status=None, code_block_type=None, container_image=None, created_timestamp=None, datalake_id=None, datalake_name=None, datapool_name=None, description=None, labels=None, name=None, owner_email=None, owner_id=None, project_name=None, subscriber_emails=None, updated_timestamp=None, use_credentials=None, visibility=None)
NotebookCodeBlock - a model defined in Swagger
def __init__(self, code_block_configuration=None, code_block_current_operation_status=None, code_block_publish_status=None, code_block_status=None, code_block_type=None, container_image=None, created_timestamp=None, datalake_id=None, datalake_name=None, datapool_name=None, description=None, labels=None, name=None, owner_email=None, owner_id=None, project_name=None, subscriber_emails=None, updated_timestamp=None, use_credentials=None, visibility=None): # noqa: E501 """NotebookCodeBlock - a model defined in Swagger""" # noqa: E501 self._code_block_configuration = None self._code_block_current_operation_status = None self._code_block_publish_status = None self._code_block_status = None self._code_block_type = None self._container_image = None self._created_timestamp = None self._datalake_id = None self._datalake_name = None self._datapool_name = None self._description = None self._labels = None self._name = None self._owner_email = None self._owner_id = None self._project_name = None self._subscriber_emails = None self._updated_timestamp = None self._use_credentials = None self._visibility = None if code_block_configuration is not None: self.code_block_configuration = code_block_configuration if code_block_current_operation_status is not None: self.code_block_current_operation_status = code_block_current_operation_status if code_block_publish_status is not None: self.code_block_publish_status = code_block_publish_status if code_block_status is not None: self.code_block_status = code_block_status if code_block_type is not None: self.code_block_type = code_block_type if container_image is not None: self.container_image = container_image if created_timestamp is not None: self.created_timestamp = created_timestamp if datalake_id is not None: self.datalake_id = datalake_id if datalake_name is not None: self.datalake_name = datalake_name if datapool_name is not None: self.datapool_name = datapool_name if description is not None: self.description = description if labels is not None: self.labels = labels if name is not None: self.name = name if owner_email is not None: self.owner_email = owner_email if owner_id is not None: self.owner_id = owner_id if project_name is not None: self.project_name = project_name if subscriber_emails is not None: self.subscriber_emails = subscriber_emails if updated_timestamp is not None: self.updated_timestamp = updated_timestamp if use_credentials is not None: self.use_credentials = use_credentials if visibility is not None: self.visibility = visibility
def to_dict(
self)
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(NotebookCodeBlock, dict): for key, value in self.items(): result[key] = value return result
def to_str(
self)
Returns the string representation of the model
def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict())
Instance variables
var code_block_configuration
Gets the code_block_configuration of this NotebookCodeBlock. # noqa: E501
:return: The code_block_configuration of this NotebookCodeBlock. # noqa: E501 :rtype: NotebookCodeBlockConfiguration
var code_block_current_operation_status
Gets the code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501
:return: The code_block_current_operation_status of this NotebookCodeBlock. # noqa: E501 :rtype: CodeBlockCurrentOperationStatus
var code_block_publish_status
Gets the code_block_publish_status of this NotebookCodeBlock. # noqa: E501
Publish status of the code block. # noqa: E501
:return: The code_block_publish_status of this NotebookCodeBlock. # noqa: E501 :rtype: str
var code_block_status
Gets the code_block_status of this NotebookCodeBlock. # noqa: E501
Status of the code block. # noqa: E501
:return: The code_block_status of this NotebookCodeBlock. # noqa: E501 :rtype: str
var code_block_type
Gets the code_block_type of this NotebookCodeBlock. # noqa: E501
The type of the code block, as to be displayed in the interface. # noqa: E501
:return: The code_block_type of this NotebookCodeBlock. # noqa: E501 :rtype: str
var container_image
Gets the container_image of this NotebookCodeBlock. # noqa: E501
:return: The container_image of this NotebookCodeBlock. # noqa: E501 :rtype: ContainerImage
var created_timestamp
Gets the created_timestamp of this NotebookCodeBlock. # noqa: E501
The timestamp when the code block got created. # noqa: E501
:return: The created_timestamp of this NotebookCodeBlock. # noqa: E501 :rtype: datetime
var datalake_id
Gets the datalake_id of this NotebookCodeBlock. # noqa: E501
The ID of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501
:return: The datalake_id of this NotebookCodeBlock. # noqa: E501 :rtype: int
var datalake_name
Gets the datalake_name of this NotebookCodeBlock. # noqa: E501
The name of the datalake from which the code block was created. It can be null, depending on visibility. # noqa: E501
:return: The datalake_name of this NotebookCodeBlock. # noqa: E501 :rtype: str
var datapool_name
Gets the datapool_name of this NotebookCodeBlock. # noqa: E501
The name of the datapool from which the code block was created. It can be null, depending on visibility. # noqa: E501
:return: The datapool_name of this NotebookCodeBlock. # noqa: E501 :rtype: str
var description
Gets the description of this NotebookCodeBlock. # noqa: E501
The description of the code block. # noqa: E501
:return: The description of this NotebookCodeBlock. # noqa: E501 :rtype: str
var labels
Gets the labels of this NotebookCodeBlock. # noqa: E501
List of labels that describes the code block. # noqa: E501
:return: The labels of this NotebookCodeBlock. # noqa: E501 :rtype: list[str]
var name
Gets the name of this NotebookCodeBlock. # noqa: E501
The name of the code block. # noqa: E501
:return: The name of this NotebookCodeBlock. # noqa: E501 :rtype: str
var owner_email
Gets the owner_email of this NotebookCodeBlock. # noqa: E501
User e-mail of the owner of the code block. # noqa: E501
:return: The owner_email of this NotebookCodeBlock. # noqa: E501 :rtype: str
var owner_id
Gets the owner_id of this NotebookCodeBlock. # noqa: E501
User ID of the owner of the code block. # noqa: E501
:return: The owner_id of this NotebookCodeBlock. # noqa: E501 :rtype: int
var project_name
Gets the project_name of this NotebookCodeBlock. # noqa: E501
The name of the project from which the code block was created. It can be null, depending on visibility. # noqa: E501
:return: The project_name of this NotebookCodeBlock. # noqa: E501 :rtype: str
var subscriber_emails
Gets the subscriber_emails of this NotebookCodeBlock. # noqa: E501
List of the user e-mails of those who subscribed to this code block. # noqa: E501
:return: The subscriber_emails of this NotebookCodeBlock. # noqa: E501 :rtype: list[str]
var updated_timestamp
Gets the updated_timestamp of this NotebookCodeBlock. # noqa: E501
The timestamp when the code block got last time updated. # noqa: E501
:return: The updated_timestamp of this NotebookCodeBlock. # noqa: E501 :rtype: datetime
var use_credentials
Gets the use_credentials of this NotebookCodeBlock. # noqa: E501
Shows whether or not the image repository will use credentials or not. # noqa: E501
:return: The use_credentials of this NotebookCodeBlock. # noqa: E501 :rtype: bool
var visibility
Gets the visibility of this NotebookCodeBlock. # noqa: E501
Visibility mode of the code block. # noqa: E501
:return: The visibility of this NotebookCodeBlock. # noqa: E501 :rtype: str