# fmt: off
# Generated by the protocol buffer compiler.  DO NOT EDIT!
from __future__ import annotations
from datetime import datetime, timedelta
import enum
from typing import Any, Dict, List, Optional, TypeVar, Type
from google.protobuf import timestamp_pb2
from google.protobuf import duration_pb2
from google.protobuf.json_format import MessageToDict

from continual.rpc.logging.v1 import logging_pb2

from continual.rpc.management.v1 import types as management_v1
from google import protobuf

T = TypeVar("T")

def _to_proto_dict(x: dict) -> dict:
    """Converts dict to proto friendly representation."""
    out = dict()
    for key, item in x.items():
        if isinstance(item, list):
            out_list = []
            for e in item:
                if isinstance(e, datetime):
                    dt = timestamp_pb2.Timestamp()
                    dt.FromDatetime(e)
                    out_list.append(dt)
                elif isinstance(e, timedelta):
                    td = duration_pb2.Duration()
                    td.FromTimedelta(e)
                    out_list.append(td)
                elif hasattr(e, "to_proto"):
                    out_list.append(e.to_proto())
                else:
                    out_list.append(e)
            out[key] = out_list
        elif isinstance(item, datetime):
            dt = timestamp_pb2.Timestamp()
            dt.FromDatetime(item)
            out[key] = dt
        elif isinstance(item, timedelta):
            td = duration_pb2.Duration()
            td.FromTimedelta(item)
            out[key] = td
        elif hasattr(item, "to_proto"):
            out[key] = item.to_proto()
        else:
            out[key] = item
    return out


def _set_attribute(
    attributes: dict, class_name: str, field: str, value: Any, fieldType: Any, oneOfField: str
):
    """Helper that sets attribute on the object.
    
    Accepts dicts for classes and normalizes enums.
    """
    if isinstance(value, dict) and getattr(fieldType, "__origin__", None) == dict:
        attributes[field] = value
    elif isinstance(value, dict):
        attributes[field] = fieldType(**value)
    elif isinstance(value, list):
        innerType = fieldType.__args__[0]
        if innerType in [str, float, bool]:
            attributes[field] = value
        elif innerType is int:
            attributes[field] = [int(x) for x in value]
        elif issubclass(innerType, Enum):
            if len(value) > 0:
                if isinstance(value[0], str):
                    attributes[field] = [innerType(x.upper()) for x in value]
                elif isinstance(value[0], int) and getattr(innerType, "from_proto", None) is not None:
                    attributes[field] = [innerType.from_proto(x) for x in value]
        else:
            attributes[field] = [innerType(**x) for x in value]
    elif isinstance(value, str) and issubclass(fieldType, Enum):
        attributes[field] = fieldType(value.upper())
    elif isinstance(value, int) and issubclass(fieldType, Enum) and getattr(fieldType, "from_proto", None) is not None:
        attributes[field] = fieldType.from_proto(value)
    elif isinstance(value, str) and fieldType == datetime:
        dt = timestamp_pb2.Timestamp()
        dt.FromJsonString(value)
        attributes[field] = dt.ToDatetime()
    elif isinstance(value, str) and fieldType == timedelta:
        td = timestamp_pb2.Duration()
        td.FromJsonString(value)
        attributes[field] = td.ToTimeDelta()
    elif isinstance(value, str) and fieldType == int:
        # Needed to handle int64 encoded as strings.
        attributes[field] = int(value)
    # Set zero values to be consistent with proto.
    elif value is None:
        if fieldType == str:
            attributes[field] = ""
        elif fieldType == int:
            attributes[field] = 0
        elif fieldType == float:
            attributes[field] = 0.0
        elif fieldType == bool:
            attributes[field] = False
        elif getattr(fieldType, "__origin__", None) == list:
            attributes[field] = []
        elif getattr(fieldType, "__origin__", None) == dict:
            attributes[field] = {}
        elif fieldType == datetime or fieldType == timedelta:
            attributes[field] = None
        else:
            if oneOfField == "":
                attributes[field] = fieldType()
            else:
                attributes[field] = None
    elif value is not None and not isinstance(value, fieldType):
        raise ValueError(
            f"'{class_name}.{field}' must have type {fieldType}, got {type(value)}"
        )
    else:
        attributes[field] = value


class Enum(enum.Enum):
    """Base enum class.
    
    Overrides equality to be case insentitive.
    """

    def __eq__(self, other) -> bool:
        """Object is equal with all types."""
        if isinstance(other, str):
            return self.name == other.upper()
        elif isinstance(other, int):
            return self.value == other
        else:
            return self.value == other.value
    
    def __str__(self) -> str:
        return self.value




class LogHeartbeatRequest:
    """Log heartbeat request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , resource: str = ""
    , **kwargs) -> LogHeartbeatRequest:
        self._attributes = dict()
        self.resource = resource

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def resource(self) -> str:
        """Resource."""
        return self._attributes["resource"]


    @resource.setter
    def resource(self, value: str) -> None:
        _set_attribute(self._attributes, "LogHeartbeatRequest", "resource", value, str, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogHeartbeatRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogHeartbeatRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogHeartbeatRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogHeartbeatRequest object " + repr(self.to_dict()) + ">"


class LogExperimentsRequest:
    """Log experiments request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , model_version: str = ""
        , experiments: List[management_v1.Experiment] = []
    , **kwargs) -> LogExperimentsRequest:
        self._attributes = dict()
        self.model_version = model_version
        self.experiments = experiments

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def model_version(self) -> str:
        """Model version."""
        return self._attributes["model_version"]


    @model_version.setter
    def model_version(self, value: str) -> None:
        _set_attribute(self._attributes, "LogExperimentsRequest", "model_version", value, str, "")


    @property
    def experiments(self) -> List[management_v1.Experiment]:
        """Experiments."""
        return self._attributes["experiments"]


    @experiments.setter
    def experiments(self, value: List[management_v1.Experiment]) -> None:
        _set_attribute(self._attributes, "LogExperimentsRequest", "experiments", value, List[management_v1.Experiment], "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogExperimentsRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogExperimentsRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogExperimentsRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogExperimentsRequest object " + repr(self.to_dict()) + ">"


class LogMetricsRequest:
    """Log metrics request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , model_version: str = ""
        , metrics: List[management_v1.TrainingMetrics] = []
    , **kwargs) -> LogMetricsRequest:
        self._attributes = dict()
        self.model_version = model_version
        self.metrics = metrics

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def model_version(self) -> str:
        """Model version."""
        return self._attributes["model_version"]


    @model_version.setter
    def model_version(self, value: str) -> None:
        _set_attribute(self._attributes, "LogMetricsRequest", "model_version", value, str, "")


    @property
    def metrics(self) -> List[management_v1.TrainingMetrics]:
        """Metrics."""
        return self._attributes["metrics"]


    @metrics.setter
    def metrics(self, value: List[management_v1.TrainingMetrics]) -> None:
        _set_attribute(self._attributes, "LogMetricsRequest", "metrics", value, List[management_v1.TrainingMetrics], "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogMetricsRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogMetricsRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogMetricsRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogMetricsRequest object " + repr(self.to_dict()) + ">"


class LogEvaluationModelMetricsRequest:
    """Log evaluation model metrics request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , model_version: str = ""
        , evaluation_model_version_metrics: management_v1.EvaluationModelVersionMetrics = None
    , **kwargs) -> LogEvaluationModelMetricsRequest:
        self._attributes = dict()
        self.model_version = model_version
        self.evaluation_model_version_metrics = evaluation_model_version_metrics

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def model_version(self) -> str:
        """Model version."""
        return self._attributes["model_version"]


    @model_version.setter
    def model_version(self, value: str) -> None:
        _set_attribute(self._attributes, "LogEvaluationModelMetricsRequest", "model_version", value, str, "")


    @property
    def evaluation_model_version_metrics(self) -> management_v1.EvaluationModelVersionMetrics:
        """Evaluation model version metrics."""
        return self._attributes["evaluation_model_version_metrics"]


    @evaluation_model_version_metrics.setter
    def evaluation_model_version_metrics(self, value: management_v1.EvaluationModelVersionMetrics) -> None:
        _set_attribute(self._attributes, "LogEvaluationModelMetricsRequest", "evaluation_model_version_metrics", value, management_v1.EvaluationModelVersionMetrics, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogEvaluationModelMetricsRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogEvaluationModelMetricsRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogEvaluationModelMetricsRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogEvaluationModelMetricsRequest object " + repr(self.to_dict()) + ">"


class LogDatasetStatsRequest:
    """Log dataset stats request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , resource: str = ""
        , dataset_stats: management_v1.DatasetStats = None
    , **kwargs) -> LogDatasetStatsRequest:
        self._attributes = dict()
        self.resource = resource
        self.dataset_stats = dataset_stats

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def resource(self) -> str:
        """Resource."""
        return self._attributes["resource"]


    @resource.setter
    def resource(self, value: str) -> None:
        _set_attribute(self._attributes, "LogDatasetStatsRequest", "resource", value, str, "")


    @property
    def dataset_stats(self) -> management_v1.DatasetStats:
        """Dataset stats."""
        return self._attributes["dataset_stats"]


    @dataset_stats.setter
    def dataset_stats(self, value: management_v1.DatasetStats) -> None:
        _set_attribute(self._attributes, "LogDatasetStatsRequest", "dataset_stats", value, management_v1.DatasetStats, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogDatasetStatsRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogDatasetStatsRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogDatasetStatsRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogDatasetStatsRequest object " + repr(self.to_dict()) + ">"


class LogPredictionStatsRequest:
    """Log prediction stats request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , batch_prediction: str = ""
        , prediction_stats: management_v1.DatasetStats = None
    , **kwargs) -> LogPredictionStatsRequest:
        self._attributes = dict()
        self.batch_prediction = batch_prediction
        self.prediction_stats = prediction_stats

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def batch_prediction(self) -> str:
        """Batch prediction."""
        return self._attributes["batch_prediction"]


    @batch_prediction.setter
    def batch_prediction(self, value: str) -> None:
        _set_attribute(self._attributes, "LogPredictionStatsRequest", "batch_prediction", value, str, "")


    @property
    def prediction_stats(self) -> management_v1.DatasetStats:
        """Prediction stats."""
        return self._attributes["prediction_stats"]


    @prediction_stats.setter
    def prediction_stats(self, value: management_v1.DatasetStats) -> None:
        _set_attribute(self._attributes, "LogPredictionStatsRequest", "prediction_stats", value, management_v1.DatasetStats, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogPredictionStatsRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogPredictionStatsRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogPredictionStatsRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogPredictionStatsRequest object " + repr(self.to_dict()) + ">"


class GenerateArtifactUploadURLRequest:
    """Generate artifact upload u r l request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , resource: str = ""
        , path: str = ""
        , type: str = ""
        , mime_type: str = ""
        , metadata: str = ""
        , resumable: bool = False
    , **kwargs) -> GenerateArtifactUploadURLRequest:
        self._attributes = dict()
        self.resource = resource
        self.path = path
        self.type = type
        self.mime_type = mime_type
        self.metadata = metadata
        self.resumable = resumable

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def resource(self) -> str:
        """Resource."""
        return self._attributes["resource"]


    @resource.setter
    def resource(self, value: str) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLRequest", "resource", value, str, "")


    @property
    def path(self) -> str:
        """Path."""
        return self._attributes["path"]


    @path.setter
    def path(self, value: str) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLRequest", "path", value, str, "")


    @property
    def type(self) -> str:
        """Type."""
        return self._attributes["type"]


    @type.setter
    def type(self, value: str) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLRequest", "type", value, str, "")


    @property
    def mime_type(self) -> str:
        """Mime type."""
        return self._attributes["mime_type"]


    @mime_type.setter
    def mime_type(self, value: str) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLRequest", "mime_type", value, str, "")


    @property
    def metadata(self) -> str:
        """Metadata."""
        return self._attributes["metadata"]


    @metadata.setter
    def metadata(self, value: str) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLRequest", "metadata", value, str, "")


    @property
    def resumable(self) -> bool:
        """Resumable."""
        return self._attributes["resumable"]


    @resumable.setter
    def resumable(self, value: bool) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLRequest", "resumable", value, bool, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.GenerateArtifactUploadURLRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.GenerateArtifactUploadURLRequest:
        """Convert object to proto representation."""
        return logging_pb2.GenerateArtifactUploadURLRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<GenerateArtifactUploadURLRequest object " + repr(self.to_dict()) + ">"


class GenerateArtifactUploadURLResponse:
    """Generate artifact upload u r l response."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , url: str = ""
        , artifact: management_v1.Artifact = None
    , **kwargs) -> GenerateArtifactUploadURLResponse:
        self._attributes = dict()
        self.url = url
        self.artifact = artifact

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def url(self) -> str:
        """Url."""
        return self._attributes["url"]


    @url.setter
    def url(self, value: str) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLResponse", "url", value, str, "")


    @property
    def artifact(self) -> management_v1.Artifact:
        """Artifact."""
        return self._attributes["artifact"]


    @artifact.setter
    def artifact(self, value: management_v1.Artifact) -> None:
        _set_attribute(self._attributes, "GenerateArtifactUploadURLResponse", "artifact", value, management_v1.Artifact, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.GenerateArtifactUploadURLResponse, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.GenerateArtifactUploadURLResponse:
        """Convert object to proto representation."""
        return logging_pb2.GenerateArtifactUploadURLResponse(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<GenerateArtifactUploadURLResponse object " + repr(self.to_dict()) + ">"


class LogDataChecksRequest:
    """Log data checks request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , resource: str = ""
        , data_checks: management_v1.DataChecks = None
    , **kwargs) -> LogDataChecksRequest:
        self._attributes = dict()
        self.resource = resource
        self.data_checks = data_checks

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def resource(self) -> str:
        """Resource."""
        return self._attributes["resource"]


    @resource.setter
    def resource(self, value: str) -> None:
        _set_attribute(self._attributes, "LogDataChecksRequest", "resource", value, str, "")


    @property
    def data_checks(self) -> management_v1.DataChecks:
        """Data checks."""
        return self._attributes["data_checks"]


    @data_checks.setter
    def data_checks(self, value: management_v1.DataChecks) -> None:
        _set_attribute(self._attributes, "LogDataChecksRequest", "data_checks", value, management_v1.DataChecks, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogDataChecksRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogDataChecksRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogDataChecksRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogDataChecksRequest object " + repr(self.to_dict()) + ">"


class LogModelVersionRequest:
    """Log model version request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , model_version: management_v1.ModelVersion = None
        , update_paths: List[str] = []
    , **kwargs) -> LogModelVersionRequest:
        self._attributes = dict()
        self.model_version = model_version
        self.update_paths = update_paths

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def model_version(self) -> management_v1.ModelVersion:
        """Model version."""
        return self._attributes["model_version"]


    @model_version.setter
    def model_version(self, value: management_v1.ModelVersion) -> None:
        _set_attribute(self._attributes, "LogModelVersionRequest", "model_version", value, management_v1.ModelVersion, "")


    @property
    def update_paths(self) -> List[str]:
        """Update paths."""
        return self._attributes["update_paths"]


    @update_paths.setter
    def update_paths(self, value: List[str]) -> None:
        _set_attribute(self._attributes, "LogModelVersionRequest", "update_paths", value, List[str], "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogModelVersionRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogModelVersionRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogModelVersionRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogModelVersionRequest object " + repr(self.to_dict()) + ">"


class LogBatchPredictionRequest:
    """Log batch prediction request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , batch_prediction: management_v1.BatchPrediction = None
        , update_paths: List[str] = []
    , **kwargs) -> LogBatchPredictionRequest:
        self._attributes = dict()
        self.batch_prediction = batch_prediction
        self.update_paths = update_paths

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def batch_prediction(self) -> management_v1.BatchPrediction:
        """Batch prediction."""
        return self._attributes["batch_prediction"]


    @batch_prediction.setter
    def batch_prediction(self, value: management_v1.BatchPrediction) -> None:
        _set_attribute(self._attributes, "LogBatchPredictionRequest", "batch_prediction", value, management_v1.BatchPrediction, "")


    @property
    def update_paths(self) -> List[str]:
        """Update paths."""
        return self._attributes["update_paths"]


    @update_paths.setter
    def update_paths(self, value: List[str]) -> None:
        _set_attribute(self._attributes, "LogBatchPredictionRequest", "update_paths", value, List[str], "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.LogBatchPredictionRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.LogBatchPredictionRequest:
        """Convert object to proto representation."""
        return logging_pb2.LogBatchPredictionRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<LogBatchPredictionRequest object " + repr(self.to_dict()) + ">"


class GetArtifactRequest:
    """Get artifact request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , name: str = ""
    , **kwargs) -> GetArtifactRequest:
        self._attributes = dict()
        self.name = name

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def name(self) -> str:
        """Name."""
        return self._attributes["name"]


    @name.setter
    def name(self, value: str) -> None:
        _set_attribute(self._attributes, "GetArtifactRequest", "name", value, str, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.GetArtifactRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.GetArtifactRequest:
        """Convert object to proto representation."""
        return logging_pb2.GetArtifactRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<GetArtifactRequest object " + repr(self.to_dict()) + ">"


class BatchGetArtifactsRequest:
    """Batch get artifacts request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , parent: str = ""
        , names: List[str] = []
    , **kwargs) -> BatchGetArtifactsRequest:
        self._attributes = dict()
        self.parent = parent
        self.names = names

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def parent(self) -> str:
        """Parent."""
        return self._attributes["parent"]


    @parent.setter
    def parent(self, value: str) -> None:
        _set_attribute(self._attributes, "BatchGetArtifactsRequest", "parent", value, str, "")


    @property
    def names(self) -> List[str]:
        """Names."""
        return self._attributes["names"]


    @names.setter
    def names(self, value: List[str]) -> None:
        _set_attribute(self._attributes, "BatchGetArtifactsRequest", "names", value, List[str], "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.BatchGetArtifactsRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.BatchGetArtifactsRequest:
        """Convert object to proto representation."""
        return logging_pb2.BatchGetArtifactsRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<BatchGetArtifactsRequest object " + repr(self.to_dict()) + ">"


class BatchGetArtifactsResponse:
    """Batch get artifacts response."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , artifacts: List[management_v1.Artifact] = []
    , **kwargs) -> BatchGetArtifactsResponse:
        self._attributes = dict()
        self.artifacts = artifacts

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def artifacts(self) -> List[management_v1.Artifact]:
        """Artifacts."""
        return self._attributes["artifacts"]


    @artifacts.setter
    def artifacts(self, value: List[management_v1.Artifact]) -> None:
        _set_attribute(self._attributes, "BatchGetArtifactsResponse", "artifacts", value, List[management_v1.Artifact], "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.BatchGetArtifactsResponse, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.BatchGetArtifactsResponse:
        """Convert object to proto representation."""
        return logging_pb2.BatchGetArtifactsResponse(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<BatchGetArtifactsResponse object " + repr(self.to_dict()) + ">"


class DeleteArtifactRequest:
    """Delete artifact request."""

    _attributes: dict
    _client: Any = None
    
    def __init__(self
        , name: str = ""
    , **kwargs) -> DeleteArtifactRequest:
        self._attributes = dict()
        self.name = name

        if "client" in kwargs:
            self._client = kwargs["client"]
        if hasattr(self, "_init"):
            self._init()


    @property
    def name(self) -> str:
        """Name."""
        return self._attributes["name"]


    @name.setter
    def name(self, value: str) -> None:
        _set_attribute(self._attributes, "DeleteArtifactRequest", "name", value, str, "")


    @classmethod
    def from_proto(cls: Type[T], proto: logging_pb2.DeleteArtifactRequest, **kwargs) -> T:
        """Convert object from proto representation."""
        return cls(**MessageToDict(proto, preserving_proto_field_name=True), **kwargs)

    def to_proto(self) -> logging_pb2.DeleteArtifactRequest:
        """Convert object to proto representation."""
        return logging_pb2.DeleteArtifactRequest(**_to_proto_dict(self._attributes))

    def to_dict(self) -> dict:
        """Convert object to plain python dictionary representation."""
        return MessageToDict(
            self.to_proto(), 
            including_default_value_fields=True, 
            preserving_proto_field_name=True,
        )
    
    def __repr__(self) -> str:
        return "<DeleteArtifactRequest object " + repr(self.to_dict()) + ">"
