1717from __future__ import annotations
1818import collections
1919import enum
20+ import typing
2021from typing import Any , cast , Dict , Iterable , Optional , Union
2122
2223from google .cloud .bigquery import _helpers
2324from google .cloud .bigquery import standard_sql
24- from google .cloud .bigquery ._helpers import (
25- _isinstance_or_raise ,
26- )
2725from google .cloud .bigquery .enums import StandardSqlTypeNames
2826
2927
@@ -564,8 +562,9 @@ def to_api_repr(self) -> dict:
564562
565563class SerDeInfo :
566564 """Serializer and deserializer information.
565+
567566 Args:
568- serializationLibrary (str): Required. Specifies a fully-qualified class
567+ serialization_library (str): Required. Specifies a fully-qualified class
569568 name of the serialization library that is responsible for the
570569 translation of data between table representation and the underlying
571570 low-level input and output format structures. The maximum length is
@@ -588,40 +587,40 @@ def __init__(
588587 self .parameters = parameters
589588
590589 @property
591- def serialization_library (self ) -> Any :
590+ def serialization_library (self ) -> str :
592591 """Required. Specifies a fully-qualified class name of the serialization
593592 library that is responsible for the translation of data between table
594593 representation and the underlying low-level input and output format
595594 structures. The maximum length is 256 characters."""
596595
597- return self ._properties .get ("serializationLibrary" )
596+ return typing . cast ( str , self ._properties .get ("serializationLibrary" ) )
598597
599598 @serialization_library .setter
600599 def serialization_library (self , value : str ):
601- value = _isinstance_or_raise (value , str , none_allowed = False )
600+ value = _helpers . _isinstance_or_raise (value , str , none_allowed = False )
602601 self ._properties ["serializationLibrary" ] = value
603602
604603 @property
605- def name (self ) -> Any :
604+ def name (self ) -> Optional [ str ] :
606605 """Optional. Name of the SerDe. The maximum length is 256 characters."""
607606
608607 return self ._properties .get ("name" )
609608
610609 @name .setter
611610 def name (self , value : Optional [str ] = None ):
612- value = _isinstance_or_raise (value , str , none_allowed = True )
611+ value = _helpers . _isinstance_or_raise (value , str , none_allowed = True )
613612 self ._properties ["name" ] = value
614613
615614 @property
616- def parameters (self ) -> Any :
615+ def parameters (self ) -> Optional [ dict [ str , str ]] :
617616 """Optional. Key-value pairs that define the initialization parameters
618617 for the serialization library. Maximum size 10 Kib."""
619618
620619 return self ._properties .get ("parameters" )
621620
622621 @parameters .setter
623622 def parameters (self , value : Optional [dict [str , str ]] = None ):
624- value = _isinstance_or_raise (value , dict , none_allowed = True )
623+ value = _helpers . _isinstance_or_raise (value , dict , none_allowed = True )
625624 self ._properties ["parameters" ] = value
626625
627626 def to_api_repr (self ) -> dict :
0 commit comments