# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import datetime
from typing import Dict, List, Optional, Union
from azure.core.exceptions import HttpResponseError
import msrest.serialization
[docs]class Config(msrest.serialization.Model):
"""Config.
:param is_hive_enabled:
:type is_hive_enabled: bool
"""
_attribute_map = {
'is_hive_enabled': {'key': 'isHiveEnabled', 'type': 'bool'},
}
def __init__(
self,
*,
is_hive_enabled: Optional[bool] = None,
**kwargs
):
super(Config, self).__init__(**kwargs)
self.is_hive_enabled = is_hive_enabled
[docs]class Data(msrest.serialization.Model):
"""Data.
:param handler_path:
:type handler_path: str
:param inputs:
:type inputs: list[str]
:param outputs:
:type outputs: list[str]
:param tables:
:type tables: ~azure.synapse.models.Tables
:param config:
:type config: ~azure.synapse.models.Config
"""
_attribute_map = {
'handler_path': {'key': 'handlerPath', 'type': 'str'},
'inputs': {'key': 'inputs', 'type': '[str]'},
'outputs': {'key': 'outputs', 'type': '[str]'},
'tables': {'key': 'tables', 'type': 'Tables'},
'config': {'key': 'config', 'type': 'Config'},
}
def __init__(
self,
*,
handler_path: Optional[str] = None,
inputs: Optional[List[str]] = None,
outputs: Optional[List[str]] = None,
tables: Optional["Tables"] = None,
config: Optional["Config"] = None,
**kwargs
):
super(Data, self).__init__(**kwargs)
self.handler_path = handler_path
self.inputs = inputs
self.outputs = outputs
self.tables = tables
self.config = config
[docs]class Edge(msrest.serialization.Model):
"""Edge.
:param id:
:type id: int
:param child_id:
:type child_id: int
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'child_id': {'key': 'childId', 'type': 'int'},
}
def __init__(
self,
*,
id: Optional[int] = None,
child_id: Optional[int] = None,
**kwargs
):
super(Edge, self).__init__(**kwargs)
self.id = id
self.child_id = child_id
[docs]class ErrorDetail(msrest.serialization.Model):
"""ErrorDetail.
All required parameters must be populated in order to send to Azure.
:param code: Required.
:type code: str
:param message: Required.
:type message: str
:param target:
:type target: str
"""
_validation = {
'code': {'required': True},
'message': {'required': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
}
def __init__(
self,
*,
code: str,
message: str,
target: Optional[str] = None,
**kwargs
):
super(ErrorDetail, self).__init__(**kwargs)
self.code = code
self.message = message
self.target = target
[docs]class ErrorResponseException(HttpResponseError):
"""Server responded with exception of type: 'ErrorResponse'.
:param response: Server response to be deserialized.
:param error_model: A deserialized model of the response body as model.
"""
def __init__(self, response, error_model):
self.error = error_model
super(ErrorResponseException, self).__init__(response=response, error_model=error_model)
[docs] @classmethod
def from_response(cls, response, deserialize):
"""Deserialize this response as this exception, or a subclass of this exception.
:param response: Server response to be deserialized.
:param deserialize: A deserializer
"""
model_name = 'ErrorResponse'
error = deserialize(model_name, response)
if error is None:
error = deserialize.dependencies[model_name]()
return error._EXCEPTION_TYPE(response, error)
[docs]class ErrorResponse(msrest.serialization.Model):
"""ErrorResponse.
All required parameters must be populated in order to send to Azure.
:param code: Required.
:type code: str
:param message: Required.
:type message: str
:param target:
:type target: str
:param details:
:type details: list[~azure.synapse.models.ErrorDetail]
"""
_EXCEPTION_TYPE = ErrorResponseException
_validation = {
'code': {'required': True},
'message': {'required': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDetail]'},
}
def __init__(
self,
*,
code: str,
message: str,
target: Optional[str] = None,
details: Optional[List["ErrorDetail"]] = None,
**kwargs
):
super(ErrorResponse, self).__init__(**kwargs)
self.code = code
self.message = message
self.target = target
self.details = details
[docs]class Executors(msrest.serialization.Model):
"""Executors.
:param is_dynamic_allocation_on:
:type is_dynamic_allocation_on: bool
:param executor_instances:
:type executor_instances: int
:param start_time:
:type start_time: int
:param end_time:
:type end_time: int
:param events:
:type events: list[int]
:param executor_cores:
:type executor_cores: str
:param executor_memory:
:type executor_memory: str
"""
_attribute_map = {
'is_dynamic_allocation_on': {'key': 'isDynamicAllocationOn', 'type': 'bool'},
'executor_instances': {'key': 'executorInstances', 'type': 'int'},
'start_time': {'key': 'startTime', 'type': 'int'},
'end_time': {'key': 'endTime', 'type': 'int'},
'events': {'key': 'events', 'type': '[int]'},
'executor_cores': {'key': 'executorCores', 'type': 'str'},
'executor_memory': {'key': 'executorMemory', 'type': 'str'},
}
def __init__(
self,
*,
is_dynamic_allocation_on: Optional[bool] = None,
executor_instances: Optional[int] = None,
start_time: Optional[int] = None,
end_time: Optional[int] = None,
events: Optional[List[int]] = None,
executor_cores: Optional[str] = None,
executor_memory: Optional[str] = None,
**kwargs
):
super(Executors, self).__init__(**kwargs)
self.is_dynamic_allocation_on = is_dynamic_allocation_on
self.executor_instances = executor_instances
self.start_time = start_time
self.end_time = end_time
self.events = events
self.executor_cores = executor_cores
self.executor_memory = executor_memory
[docs]class ExtendedLivyBatchRequest(msrest.serialization.Model):
"""ExtendedLivyBatchRequest.
:param tags: A set of tags. Dictionary of :code:`<string>`.
:type tags: dict[str, str]
:param artifact_id:
:type artifact_id: str
:param name:
:type name: str
:param file:
:type file: str
:param class_name:
:type class_name: str
:param args:
:type args: list[str]
:param jars:
:type jars: list[str]
:param files:
:type files: list[str]
:param archives:
:type archives: list[str]
:param conf: Dictionary of :code:`<string>`.
:type conf: dict[str, str]
:param driver_memory:
:type driver_memory: str
:param driver_cores:
:type driver_cores: int
:param executor_memory:
:type executor_memory: str
:param executor_cores:
:type executor_cores: int
:param num_executors:
:type num_executors: int
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'artifact_id': {'key': 'artifactId', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'file': {'key': 'file', 'type': 'str'},
'class_name': {'key': 'className', 'type': 'str'},
'args': {'key': 'args', 'type': '[str]'},
'jars': {'key': 'jars', 'type': '[str]'},
'files': {'key': 'files', 'type': '[str]'},
'archives': {'key': 'archives', 'type': '[str]'},
'conf': {'key': 'conf', 'type': '{str}'},
'driver_memory': {'key': 'driverMemory', 'type': 'str'},
'driver_cores': {'key': 'driverCores', 'type': 'int'},
'executor_memory': {'key': 'executorMemory', 'type': 'str'},
'executor_cores': {'key': 'executorCores', 'type': 'int'},
'num_executors': {'key': 'numExecutors', 'type': 'int'},
}
def __init__(
self,
*,
tags: Optional[Dict[str, str]] = None,
artifact_id: Optional[str] = None,
name: Optional[str] = None,
file: Optional[str] = None,
class_name: Optional[str] = None,
args: Optional[List[str]] = None,
jars: Optional[List[str]] = None,
files: Optional[List[str]] = None,
archives: Optional[List[str]] = None,
conf: Optional[Dict[str, str]] = None,
driver_memory: Optional[str] = None,
driver_cores: Optional[int] = None,
executor_memory: Optional[str] = None,
executor_cores: Optional[int] = None,
num_executors: Optional[int] = None,
**kwargs
):
super(ExtendedLivyBatchRequest, self).__init__(**kwargs)
self.tags = tags
self.artifact_id = artifact_id
self.name = name
self.file = file
self.class_name = class_name
self.args = args
self.jars = jars
self.files = files
self.archives = archives
self.conf = conf
self.driver_memory = driver_memory
self.driver_cores = driver_cores
self.executor_memory = executor_memory
self.executor_cores = executor_cores
self.num_executors = num_executors
[docs]class ExtendedLivyBatchResponse(msrest.serialization.Model):
"""ExtendedLivyBatchResponse.
:param livy_info:
:type livy_info: ~azure.synapse.models.LivyBatchStateInformation
:param name:
:type name: str
:param workspace_name:
:type workspace_name: str
:param spark_pool_name:
:type spark_pool_name: str
:param submitter_name:
:type submitter_name: str
:param submitter_id:
:type submitter_id: str
:param artifact_id:
:type artifact_id: str
:param job_type: Possible values include: 'SparkBatch', 'SparkSession'.
:type job_type: str or ~azure.synapse.models.JobType
:param result: Possible values include: 'Uncertain', 'Succeeded', 'Failed', 'Cancelled'.
:type result: str or ~azure.synapse.models.JobResult
:param scheduler_info:
:type scheduler_info: ~azure.synapse.models.SchedulerInformation
:param plugin_info:
:type plugin_info: ~azure.synapse.models.SparkServicePluginInformation
:param error_info:
:type error_info: list[~azure.synapse.models.ErrorInformation]
:param tags: A set of tags. Dictionary of :code:`<string>`.
:type tags: dict[str, str]
:param id:
:type id: int
:param app_id:
:type app_id: str
:param app_info: Dictionary of :code:`<string>`.
:type app_info: dict[str, str]
:param state:
:type state: str
:param log:
:type log: list[str]
"""
_attribute_map = {
'livy_info': {'key': 'livyInfo', 'type': 'LivyBatchStateInformation'},
'name': {'key': 'name', 'type': 'str'},
'workspace_name': {'key': 'workspaceName', 'type': 'str'},
'spark_pool_name': {'key': 'sparkPoolName', 'type': 'str'},
'submitter_name': {'key': 'submitterName', 'type': 'str'},
'submitter_id': {'key': 'submitterId', 'type': 'str'},
'artifact_id': {'key': 'artifactId', 'type': 'str'},
'job_type': {'key': 'jobType', 'type': 'str'},
'result': {'key': 'result', 'type': 'str'},
'scheduler_info': {'key': 'schedulerInfo', 'type': 'SchedulerInformation'},
'plugin_info': {'key': 'pluginInfo', 'type': 'SparkServicePluginInformation'},
'error_info': {'key': 'errorInfo', 'type': '[ErrorInformation]'},
'tags': {'key': 'tags', 'type': '{str}'},
'id': {'key': 'id', 'type': 'int'},
'app_id': {'key': 'appId', 'type': 'str'},
'app_info': {'key': 'appInfo', 'type': '{str}'},
'state': {'key': 'state', 'type': 'str'},
'log': {'key': 'log', 'type': '[str]'},
}
def __init__(
self,
*,
livy_info: Optional["LivyBatchStateInformation"] = None,
name: Optional[str] = None,
workspace_name: Optional[str] = None,
spark_pool_name: Optional[str] = None,
submitter_name: Optional[str] = None,
submitter_id: Optional[str] = None,
artifact_id: Optional[str] = None,
job_type: Optional[Union[str, "JobType"]] = None,
result: Optional[Union[str, "JobResult"]] = None,
scheduler_info: Optional["SchedulerInformation"] = None,
plugin_info: Optional["SparkServicePluginInformation"] = None,
error_info: Optional[List["ErrorInformation"]] = None,
tags: Optional[Dict[str, str]] = None,
id: Optional[int] = None,
app_id: Optional[str] = None,
app_info: Optional[Dict[str, str]] = None,
state: Optional[str] = None,
log: Optional[List[str]] = None,
**kwargs
):
super(ExtendedLivyBatchResponse, self).__init__(**kwargs)
self.livy_info = livy_info
self.name = name
self.workspace_name = workspace_name
self.spark_pool_name = spark_pool_name
self.submitter_name = submitter_name
self.submitter_id = submitter_id
self.artifact_id = artifact_id
self.job_type = job_type
self.result = result
self.scheduler_info = scheduler_info
self.plugin_info = plugin_info
self.error_info = error_info
self.tags = tags
self.id = id
self.app_id = app_id
self.app_info = app_info
self.state = state
self.log = log
[docs]class ExtendedLivyListBatchResponse(msrest.serialization.Model):
"""ExtendedLivyListBatchResponse.
:param from_property:
:type from_property: int
:param total:
:type total: int
:param sessions:
:type sessions: list[~azure.synapse.models.ExtendedLivyBatchResponse]
"""
_attribute_map = {
'from_property': {'key': 'from', 'type': 'int'},
'total': {'key': 'total', 'type': 'int'},
'sessions': {'key': 'sessions', 'type': '[ExtendedLivyBatchResponse]'},
}
def __init__(
self,
*,
from_property: Optional[int] = None,
total: Optional[int] = None,
sessions: Optional[List["ExtendedLivyBatchResponse"]] = None,
**kwargs
):
super(ExtendedLivyListBatchResponse, self).__init__(**kwargs)
self.from_property = from_property
self.total = total
self.sessions = sessions
[docs]class ExtendedLivyListSessionResponse(msrest.serialization.Model):
"""ExtendedLivyListSessionResponse.
:param from_property:
:type from_property: int
:param total:
:type total: int
:param sessions:
:type sessions: list[~azure.synapse.models.ExtendedLivySessionResponse]
"""
_attribute_map = {
'from_property': {'key': 'from', 'type': 'int'},
'total': {'key': 'total', 'type': 'int'},
'sessions': {'key': 'sessions', 'type': '[ExtendedLivySessionResponse]'},
}
def __init__(
self,
*,
from_property: Optional[int] = None,
total: Optional[int] = None,
sessions: Optional[List["ExtendedLivySessionResponse"]] = None,
**kwargs
):
super(ExtendedLivyListSessionResponse, self).__init__(**kwargs)
self.from_property = from_property
self.total = total
self.sessions = sessions
[docs]class ExtendedLivySessionRequest(msrest.serialization.Model):
"""ExtendedLivySessionRequest.
:param tags: A set of tags. Dictionary of :code:`<string>`.
:type tags: dict[str, str]
:param artifact_id:
:type artifact_id: str
:param name:
:type name: str
:param file:
:type file: str
:param class_name:
:type class_name: str
:param args:
:type args: list[str]
:param jars:
:type jars: list[str]
:param files:
:type files: list[str]
:param archives:
:type archives: list[str]
:param conf: Dictionary of :code:`<string>`.
:type conf: dict[str, str]
:param driver_memory:
:type driver_memory: str
:param driver_cores:
:type driver_cores: int
:param executor_memory:
:type executor_memory: str
:param executor_cores:
:type executor_cores: int
:param num_executors:
:type num_executors: int
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'artifact_id': {'key': 'artifactId', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'file': {'key': 'file', 'type': 'str'},
'class_name': {'key': 'className', 'type': 'str'},
'args': {'key': 'args', 'type': '[str]'},
'jars': {'key': 'jars', 'type': '[str]'},
'files': {'key': 'files', 'type': '[str]'},
'archives': {'key': 'archives', 'type': '[str]'},
'conf': {'key': 'conf', 'type': '{str}'},
'driver_memory': {'key': 'driverMemory', 'type': 'str'},
'driver_cores': {'key': 'driverCores', 'type': 'int'},
'executor_memory': {'key': 'executorMemory', 'type': 'str'},
'executor_cores': {'key': 'executorCores', 'type': 'int'},
'num_executors': {'key': 'numExecutors', 'type': 'int'},
}
def __init__(
self,
*,
tags: Optional[Dict[str, str]] = None,
artifact_id: Optional[str] = None,
name: Optional[str] = None,
file: Optional[str] = None,
class_name: Optional[str] = None,
args: Optional[List[str]] = None,
jars: Optional[List[str]] = None,
files: Optional[List[str]] = None,
archives: Optional[List[str]] = None,
conf: Optional[Dict[str, str]] = None,
driver_memory: Optional[str] = None,
driver_cores: Optional[int] = None,
executor_memory: Optional[str] = None,
executor_cores: Optional[int] = None,
num_executors: Optional[int] = None,
**kwargs
):
super(ExtendedLivySessionRequest, self).__init__(**kwargs)
self.tags = tags
self.artifact_id = artifact_id
self.name = name
self.file = file
self.class_name = class_name
self.args = args
self.jars = jars
self.files = files
self.archives = archives
self.conf = conf
self.driver_memory = driver_memory
self.driver_cores = driver_cores
self.executor_memory = executor_memory
self.executor_cores = executor_cores
self.num_executors = num_executors
[docs]class ExtendedLivySessionResponse(msrest.serialization.Model):
"""ExtendedLivySessionResponse.
:param livy_info:
:type livy_info: ~azure.synapse.models.LivySessionStateInformation
:param name:
:type name: str
:param workspace_name:
:type workspace_name: str
:param spark_pool_name:
:type spark_pool_name: str
:param submitter_name:
:type submitter_name: str
:param submitter_id:
:type submitter_id: str
:param artifact_id:
:type artifact_id: str
:param job_type: Possible values include: 'SparkBatch', 'SparkSession'.
:type job_type: str or ~azure.synapse.models.JobType
:param result: Possible values include: 'Uncertain', 'Succeeded', 'Failed', 'Cancelled'.
:type result: str or ~azure.synapse.models.JobResult
:param scheduler_info:
:type scheduler_info: ~azure.synapse.models.SchedulerInformation
:param plugin_info:
:type plugin_info: ~azure.synapse.models.SparkServicePluginInformation
:param error_info:
:type error_info: list[~azure.synapse.models.ErrorInformation]
:param tags: A set of tags. Dictionary of :code:`<string>`.
:type tags: dict[str, str]
:param id:
:type id: int
:param app_id:
:type app_id: str
:param app_info: Dictionary of :code:`<string>`.
:type app_info: dict[str, str]
:param state:
:type state: str
:param log:
:type log: list[str]
"""
_attribute_map = {
'livy_info': {'key': 'livyInfo', 'type': 'LivySessionStateInformation'},
'name': {'key': 'name', 'type': 'str'},
'workspace_name': {'key': 'workspaceName', 'type': 'str'},
'spark_pool_name': {'key': 'sparkPoolName', 'type': 'str'},
'submitter_name': {'key': 'submitterName', 'type': 'str'},
'submitter_id': {'key': 'submitterId', 'type': 'str'},
'artifact_id': {'key': 'artifactId', 'type': 'str'},
'job_type': {'key': 'jobType', 'type': 'str'},
'result': {'key': 'result', 'type': 'str'},
'scheduler_info': {'key': 'schedulerInfo', 'type': 'SchedulerInformation'},
'plugin_info': {'key': 'pluginInfo', 'type': 'SparkServicePluginInformation'},
'error_info': {'key': 'errorInfo', 'type': '[ErrorInformation]'},
'tags': {'key': 'tags', 'type': '{str}'},
'id': {'key': 'id', 'type': 'int'},
'app_id': {'key': 'appId', 'type': 'str'},
'app_info': {'key': 'appInfo', 'type': '{str}'},
'state': {'key': 'state', 'type': 'str'},
'log': {'key': 'log', 'type': '[str]'},
}
def __init__(
self,
*,
livy_info: Optional["LivySessionStateInformation"] = None,
name: Optional[str] = None,
workspace_name: Optional[str] = None,
spark_pool_name: Optional[str] = None,
submitter_name: Optional[str] = None,
submitter_id: Optional[str] = None,
artifact_id: Optional[str] = None,
job_type: Optional[Union[str, "JobType"]] = None,
result: Optional[Union[str, "JobResult"]] = None,
scheduler_info: Optional["SchedulerInformation"] = None,
plugin_info: Optional["SparkServicePluginInformation"] = None,
error_info: Optional[List["ErrorInformation"]] = None,
tags: Optional[Dict[str, str]] = None,
id: Optional[int] = None,
app_id: Optional[str] = None,
app_info: Optional[Dict[str, str]] = None,
state: Optional[str] = None,
log: Optional[List[str]] = None,
**kwargs
):
super(ExtendedLivySessionResponse, self).__init__(**kwargs)
self.livy_info = livy_info
self.name = name
self.workspace_name = workspace_name
self.spark_pool_name = spark_pool_name
self.submitter_name = submitter_name
self.submitter_id = submitter_id
self.artifact_id = artifact_id
self.job_type = job_type
self.result = result
self.scheduler_info = scheduler_info
self.plugin_info = plugin_info
self.error_info = error_info
self.tags = tags
self.id = id
self.app_id = app_id
self.app_info = app_info
self.state = state
self.log = log
[docs]class GetAccessControlInfoRequest(msrest.serialization.Model):
"""GetAccessControlInfoRequest.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar artifact_type: Default value: "Workspace".
:vartype artifact_type: str
:param artifact_name:
:type artifact_name: str
"""
_validation = {
'artifact_type': {'constant': True},
}
_attribute_map = {
'artifact_type': {'key': 'artifactType', 'type': 'str'},
'artifact_name': {'key': 'artifactName', 'type': 'str'},
}
artifact_type = "Workspace"
def __init__(
self,
*,
artifact_name: Optional[str] = None,
**kwargs
):
super(GetAccessControlInfoRequest, self).__init__(**kwargs)
self.artifact_name = artifact_name
[docs]class HistoryServerDataResponse(msrest.serialization.Model):
"""HistoryServerDataResponse.
:param data:
:type data: ~azure.synapse.models.Data
"""
_attribute_map = {
'data': {'key': 'data', 'type': 'Data'},
}
def __init__(
self,
*,
data: Optional["Data"] = None,
**kwargs
):
super(HistoryServerDataResponse, self).__init__(**kwargs)
self.data = data
[docs]class HistoryServerDiagnosticResponse(msrest.serialization.Model):
"""HistoryServerDiagnosticResponse.
:param data:
:type data: ~azure.synapse.models.HistoryServerDiagnosticResponseData
"""
_attribute_map = {
'data': {'key': 'data', 'type': 'HistoryServerDiagnosticResponseData'},
}
def __init__(
self,
*,
data: Optional["HistoryServerDiagnosticResponseData"] = None,
**kwargs
):
super(HistoryServerDiagnosticResponse, self).__init__(**kwargs)
self.data = data
[docs]class HistoryServerDiagnosticResponseData(msrest.serialization.Model):
"""HistoryServerDiagnosticResponseData.
:param stages:
:type stages: ~azure.synapse.models.Stages
:param executors:
:type executors: ~azure.synapse.models.Executors
"""
_attribute_map = {
'stages': {'key': 'stages', 'type': 'Stages'},
'executors': {'key': 'executors', 'type': 'Executors'},
}
def __init__(
self,
*,
stages: Optional["Stages"] = None,
executors: Optional["Executors"] = None,
**kwargs
):
super(HistoryServerDiagnosticResponseData, self).__init__(**kwargs)
self.stages = stages
self.executors = executors
[docs]class HistoryServerGraphResponse(msrest.serialization.Model):
"""HistoryServerGraphResponse.
:param data:
:type data: ~azure.synapse.models.HistoryServerGraphResponseData
"""
_attribute_map = {
'data': {'key': 'data', 'type': 'HistoryServerGraphResponseData'},
}
def __init__(
self,
*,
data: Optional["HistoryServerGraphResponseData"] = None,
**kwargs
):
super(HistoryServerGraphResponse, self).__init__(**kwargs)
self.data = data
[docs]class HistoryServerGraphResponseData(msrest.serialization.Model):
"""HistoryServerGraphResponseData.
:param is_app_finished:
:type is_app_finished: bool
:param jobs:
:type jobs: ~azure.synapse.models.Jobs
:param stages:
:type stages: ~azure.synapse.models.Stages
"""
_attribute_map = {
'is_app_finished': {'key': 'isAppFinished', 'type': 'bool'},
'jobs': {'key': 'jobs', 'type': 'Jobs'},
'stages': {'key': 'stages', 'type': 'Stages'},
}
def __init__(
self,
*,
is_app_finished: Optional[bool] = None,
jobs: Optional["Jobs"] = None,
stages: Optional["Stages"] = None,
**kwargs
):
super(HistoryServerGraphResponseData, self).__init__(**kwargs)
self.is_app_finished = is_app_finished
self.jobs = jobs
self.stages = stages
[docs]class HistoryServerPropertiesResponse(msrest.serialization.Model):
"""HistoryServerPropertiesResponse.
:param web_proxy_endpoint:
:type web_proxy_endpoint: str
"""
_attribute_map = {
'web_proxy_endpoint': {'key': 'webProxyEndpoint', 'type': 'str'},
}
def __init__(
self,
*,
web_proxy_endpoint: Optional[str] = None,
**kwargs
):
super(HistoryServerPropertiesResponse, self).__init__(**kwargs)
self.web_proxy_endpoint = web_proxy_endpoint
[docs]class Jobs(msrest.serialization.Model):
"""Jobs.
:param time:
:type time: int
:param start_time:
:type start_time: int
:param id:
:type id: int
:param edges:
:type edges: list[~azure.synapse.models.Edge]
:param nodes:
:type nodes: list[int]
"""
_attribute_map = {
'time': {'key': 'time', 'type': 'int'},
'start_time': {'key': 'startTime', 'type': 'int'},
'id': {'key': 'id', 'type': 'int'},
'edges': {'key': 'edges', 'type': '[Edge]'},
'nodes': {'key': 'nodes', 'type': '[int]'},
}
def __init__(
self,
*,
time: Optional[int] = None,
start_time: Optional[int] = None,
id: Optional[int] = None,
edges: Optional[List["Edge"]] = None,
nodes: Optional[List[int]] = None,
**kwargs
):
super(Jobs, self).__init__(**kwargs)
self.time = time
self.start_time = start_time
self.id = id
self.edges = edges
self.nodes = nodes
[docs]class LivyRequestBase(msrest.serialization.Model):
"""LivyRequestBase.
:param name:
:type name: str
:param file:
:type file: str
:param class_name:
:type class_name: str
:param args:
:type args: list[str]
:param jars:
:type jars: list[str]
:param files:
:type files: list[str]
:param archives:
:type archives: list[str]
:param conf: Dictionary of :code:`<string>`.
:type conf: dict[str, str]
:param driver_memory:
:type driver_memory: str
:param driver_cores:
:type driver_cores: int
:param executor_memory:
:type executor_memory: str
:param executor_cores:
:type executor_cores: int
:param num_executors:
:type num_executors: int
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'file': {'key': 'file', 'type': 'str'},
'class_name': {'key': 'className', 'type': 'str'},
'args': {'key': 'args', 'type': '[str]'},
'jars': {'key': 'jars', 'type': '[str]'},
'files': {'key': 'files', 'type': '[str]'},
'archives': {'key': 'archives', 'type': '[str]'},
'conf': {'key': 'conf', 'type': '{str}'},
'driver_memory': {'key': 'driverMemory', 'type': 'str'},
'driver_cores': {'key': 'driverCores', 'type': 'int'},
'executor_memory': {'key': 'executorMemory', 'type': 'str'},
'executor_cores': {'key': 'executorCores', 'type': 'int'},
'num_executors': {'key': 'numExecutors', 'type': 'int'},
}
def __init__(
self,
*,
name: Optional[str] = None,
file: Optional[str] = None,
class_name: Optional[str] = None,
args: Optional[List[str]] = None,
jars: Optional[List[str]] = None,
files: Optional[List[str]] = None,
archives: Optional[List[str]] = None,
conf: Optional[Dict[str, str]] = None,
driver_memory: Optional[str] = None,
driver_cores: Optional[int] = None,
executor_memory: Optional[str] = None,
executor_cores: Optional[int] = None,
num_executors: Optional[int] = None,
**kwargs
):
super(LivyRequestBase, self).__init__(**kwargs)
self.name = name
self.file = file
self.class_name = class_name
self.args = args
self.jars = jars
self.files = files
self.archives = archives
self.conf = conf
self.driver_memory = driver_memory
self.driver_cores = driver_cores
self.executor_memory = executor_memory
self.executor_cores = executor_cores
self.num_executors = num_executors
[docs]class LivyStatementCancellationResponse(msrest.serialization.Model):
"""LivyStatementCancellationResponse.
:param msg:
:type msg: str
"""
_attribute_map = {
'msg': {'key': 'msg', 'type': 'str'},
}
def __init__(
self,
*,
msg: Optional[str] = None,
**kwargs
):
super(LivyStatementCancellationResponse, self).__init__(**kwargs)
self.msg = msg
[docs]class LivyStatementOutput(msrest.serialization.Model):
"""LivyStatementOutput.
:param status:
:type status: str
:param execution_count:
:type execution_count: int
:param data:
:type data: object
:param ename:
:type ename: str
:param evalue:
:type evalue: str
:param traceback:
:type traceback: list[str]
"""
_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'execution_count': {'key': 'execution_count', 'type': 'int'},
'data': {'key': 'data', 'type': 'object'},
'ename': {'key': 'ename', 'type': 'str'},
'evalue': {'key': 'evalue', 'type': 'str'},
'traceback': {'key': 'traceback', 'type': '[str]'},
}
def __init__(
self,
*,
status: Optional[str] = None,
execution_count: Optional[int] = None,
data: Optional[object] = None,
ename: Optional[str] = None,
evalue: Optional[str] = None,
traceback: Optional[List[str]] = None,
**kwargs
):
super(LivyStatementOutput, self).__init__(**kwargs)
self.status = status
self.execution_count = execution_count
self.data = data
self.ename = ename
self.evalue = evalue
self.traceback = traceback
[docs]class LivyStatementRequestBody(msrest.serialization.Model):
"""LivyStatementRequestBody.
:param code:
:type code: str
:param kind:
:type kind: str
"""
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}
def __init__(
self,
*,
code: Optional[str] = None,
kind: Optional[str] = None,
**kwargs
):
super(LivyStatementRequestBody, self).__init__(**kwargs)
self.code = code
self.kind = kind
[docs]class LivyStatementResponseBody(msrest.serialization.Model):
"""LivyStatementResponseBody.
:param id:
:type id: int
:param code:
:type code: str
:param state:
:type state: str
:param output:
:type output: ~azure.synapse.models.LivyStatementOutput
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'code': {'key': 'code', 'type': 'str'},
'state': {'key': 'state', 'type': 'str'},
'output': {'key': 'output', 'type': 'LivyStatementOutput'},
}
def __init__(
self,
*,
id: Optional[int] = None,
code: Optional[str] = None,
state: Optional[str] = None,
output: Optional["LivyStatementOutput"] = None,
**kwargs
):
super(LivyStatementResponseBody, self).__init__(**kwargs)
self.id = id
self.code = code
self.state = state
self.output = output
[docs]class LivyStatementsResponseBody(msrest.serialization.Model):
"""LivyStatementsResponseBody.
:param total_statements:
:type total_statements: int
:param statements:
:type statements: list[~azure.synapse.models.LivyStatementResponseBody]
"""
_attribute_map = {
'total_statements': {'key': 'total_statements', 'type': 'int'},
'statements': {'key': 'statements', 'type': '[LivyStatementResponseBody]'},
}
def __init__(
self,
*,
total_statements: Optional[int] = None,
statements: Optional[List["LivyStatementResponseBody"]] = None,
**kwargs
):
super(LivyStatementsResponseBody, self).__init__(**kwargs)
self.total_statements = total_statements
self.statements = statements
[docs]class Option(msrest.serialization.Model):
"""Option.
:param additional_prop1:
:type additional_prop1: str
:param additional_prop2:
:type additional_prop2: str
:param additional_prop3:
:type additional_prop3: str
"""
_attribute_map = {
'additional_prop1': {'key': 'additionalProp1', 'type': 'str'},
'additional_prop2': {'key': 'additionalProp2', 'type': 'str'},
'additional_prop3': {'key': 'additionalProp3', 'type': 'str'},
}
def __init__(
self,
*,
additional_prop1: Optional[str] = None,
additional_prop2: Optional[str] = None,
additional_prop3: Optional[str] = None,
**kwargs
):
super(Option, self).__init__(**kwargs)
self.additional_prop1 = additional_prop1
self.additional_prop2 = additional_prop2
self.additional_prop3 = additional_prop3
[docs]class SetWorkspaceAdministratorsRequest(msrest.serialization.Model):
"""SetWorkspaceAdministratorsRequest.
:param administrators:
:type administrators: list[str]
"""
_attribute_map = {
'administrators': {'key': 'administrators', 'type': '[str]'},
}
def __init__(
self,
*,
administrators: Optional[List[str]] = None,
**kwargs
):
super(SetWorkspaceAdministratorsRequest, self).__init__(**kwargs)
self.administrators = administrators
[docs]class SparkJob(msrest.serialization.Model):
"""SparkJob.
:param state:
:type state: str
:param name:
:type name: str
:param submitter:
:type submitter: str
:param compute:
:type compute: str
:param spark_application_id:
:type spark_application_id: str
:param livy_id:
:type livy_id: str
:param timing:
:type timing: list[str]
:param spark_job_definition:
:type spark_job_definition: str
:param pipeline:
:type pipeline: list[~azure.synapse.models.SparkJob]
:param job_type:
:type job_type: str
:param submit_time:
:type submit_time: ~datetime.datetime
:param end_time:
:type end_time: ~datetime.datetime
:param queued_duration:
:type queued_duration: str
:param running_duration:
:type running_duration: str
:param total_duration:
:type total_duration: str
"""
_attribute_map = {
'state': {'key': 'state', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'submitter': {'key': 'submitter', 'type': 'str'},
'compute': {'key': 'compute', 'type': 'str'},
'spark_application_id': {'key': 'sparkApplicationId', 'type': 'str'},
'livy_id': {'key': 'livyId', 'type': 'str'},
'timing': {'key': 'timing', 'type': '[str]'},
'spark_job_definition': {'key': 'sparkJobDefinition', 'type': 'str'},
'pipeline': {'key': 'pipeline', 'type': '[SparkJob]'},
'job_type': {'key': 'jobType', 'type': 'str'},
'submit_time': {'key': 'submitTime', 'type': 'iso-8601'},
'end_time': {'key': 'endTime', 'type': 'iso-8601'},
'queued_duration': {'key': 'queuedDuration', 'type': 'str'},
'running_duration': {'key': 'runningDuration', 'type': 'str'},
'total_duration': {'key': 'totalDuration', 'type': 'str'},
}
def __init__(
self,
*,
state: Optional[str] = None,
name: Optional[str] = None,
submitter: Optional[str] = None,
compute: Optional[str] = None,
spark_application_id: Optional[str] = None,
livy_id: Optional[str] = None,
timing: Optional[List[str]] = None,
spark_job_definition: Optional[str] = None,
pipeline: Optional[List["SparkJob"]] = None,
job_type: Optional[str] = None,
submit_time: Optional[datetime.datetime] = None,
end_time: Optional[datetime.datetime] = None,
queued_duration: Optional[str] = None,
running_duration: Optional[str] = None,
total_duration: Optional[str] = None,
**kwargs
):
super(SparkJob, self).__init__(**kwargs)
self.state = state
self.name = name
self.submitter = submitter
self.compute = compute
self.spark_application_id = spark_application_id
self.livy_id = livy_id
self.timing = timing
self.spark_job_definition = spark_job_definition
self.pipeline = pipeline
self.job_type = job_type
self.submit_time = submit_time
self.end_time = end_time
self.queued_duration = queued_duration
self.running_duration = running_duration
self.total_duration = total_duration
[docs]class SparkJobListViewResponse(msrest.serialization.Model):
"""SparkJobListViewResponse.
:param n_jobs:
:type n_jobs: int
:param spark_jobs:
:type spark_jobs: list[~azure.synapse.models.SparkJob]
"""
_attribute_map = {
'n_jobs': {'key': 'nJobs', 'type': 'int'},
'spark_jobs': {'key': 'sparkJobs', 'type': '[SparkJob]'},
}
def __init__(
self,
*,
n_jobs: Optional[int] = None,
spark_jobs: Optional[List["SparkJob"]] = None,
**kwargs
):
super(SparkJobListViewResponse, self).__init__(**kwargs)
self.n_jobs = n_jobs
self.spark_jobs = spark_jobs
[docs]class Stages(msrest.serialization.Model):
"""Stages.
:param data_avg:
:type data_avg: int
:param time_avg:
:type time_avg: int
:param id:
:type id: int
:param attempt_id:
:type attempt_id: int
:param name:
:type name: str
:param data_skew_task:
:type data_skew_task: list[int]
:param time_skew_task:
:type time_skew_task: list[int]
:param tasks:
:type tasks: list[int]
"""
_attribute_map = {
'data_avg': {'key': 'dataAvg', 'type': 'int'},
'time_avg': {'key': 'timeAvg', 'type': 'int'},
'id': {'key': 'id', 'type': 'int'},
'attempt_id': {'key': 'attemptId', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'},
'data_skew_task': {'key': 'dataSkewTask', 'type': '[int]'},
'time_skew_task': {'key': 'timeSkewTask', 'type': '[int]'},
'tasks': {'key': 'tasks', 'type': '[int]'},
}
def __init__(
self,
*,
data_avg: Optional[int] = None,
time_avg: Optional[int] = None,
id: Optional[int] = None,
attempt_id: Optional[int] = None,
name: Optional[str] = None,
data_skew_task: Optional[List[int]] = None,
time_skew_task: Optional[List[int]] = None,
tasks: Optional[List[int]] = None,
**kwargs
):
super(Stages, self).__init__(**kwargs)
self.data_avg = data_avg
self.time_avg = time_avg
self.id = id
self.attempt_id = attempt_id
self.name = name
self.data_skew_task = data_skew_task
self.time_skew_task = time_skew_task
self.tasks = tasks
[docs]class Tables(msrest.serialization.Model):
"""Tables.
:param operation:
:type operation: str
:param options:
:type options: list[~azure.synapse.models.Option]
"""
_attribute_map = {
'operation': {'key': 'operation', 'type': 'str'},
'options': {'key': 'options', 'type': '[Option]'},
}
def __init__(
self,
*,
operation: Optional[str] = None,
options: Optional[List["Option"]] = None,
**kwargs
):
super(Tables, self).__init__(**kwargs)
self.operation = operation
self.options = options
[docs]class WorkspaceAccessControlResponse(msrest.serialization.Model):
"""WorkspaceAccessControlResponse.
:param administrators:
:type administrators: list[str]
:param etag:
:type etag: str
:param access_control_list: Dictionary of
<components·k2t8p9·schemas·workspaceaccesscontrolresponse·properties·accesscontrollist·additionalproperties>.
:type access_control_list: dict[str, list[str]]
"""
_attribute_map = {
'administrators': {'key': 'administrators', 'type': '[str]'},
'etag': {'key': 'etag', 'type': 'str'},
'access_control_list': {'key': 'accessControlList', 'type': '{[str]}'},
}
def __init__(
self,
*,
administrators: Optional[List[str]] = None,
etag: Optional[str] = None,
access_control_list: Optional[Dict[str, List[str]]] = None,
**kwargs
):
super(WorkspaceAccessControlResponse, self).__init__(**kwargs)
self.administrators = administrators
self.etag = etag
self.access_control_list = access_control_list