@@ -677,5 +677,158 @@ def to_api_repr(self) -> dict:
677677 return copy .deepcopy (self ._properties )
678678
679679
680+ class StorageDescriptor (ResourceBase ):
681+ """Contains information about how a table's data is stored and accessed by open
682+ source query engines.
680683
684+ Args:
685+ inputFormat (Optional[str]): Specifies the fully qualified class name of
686+ the InputFormat (e.g.
687+ "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"). The maximum
688+ length is 128 characters.
689+ locationUri (Optional[str]): The physical location of the table (e.g.
690+ `gs://spark-dataproc-data/pangea-data/case_sensitive/` or
691+ `gs://spark-dataproc-data/pangea-data/*`). The maximum length is
692+ 2056 bytes.
693+ outputFormat (Optional[str]): Specifies the fully qualified class name
694+ of the OutputFormat (e.g.
695+ "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"). The maximum
696+ length is 128 characters.
697+ serdeInfo (Optional[Any]): Serializer and deserializer information.
698+ """
699+
700+ def __init__ (self , input_format : Optional [str ] = None , location_uri : Optional [str ] = None , output_format : Optional [str ] = None , serde_info : Optional [Any ] = None ):
701+ self ._properties = {}
702+ self .input_format = input_format
703+ self .location_uri = location_uri
704+ self .output_format = output_format
705+ self .serde_info = serde_info
706+
707+ @property
708+ def input_format (self ) -> Any :
709+ '''Optional. Specifies the fully qualified class name of the InputFormat
710+ (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"). The maximum
711+ length is 128 characters.'''
712+
713+ return self ._properties .get ("inputFormat" )
714+
715+ @input_format .setter
716+ def input_format (self , value : Optional [str ]):
717+ value = _isinstance_or_raise (value , (str , None ))
718+ self ._properties ['inputFormat' ] = value
719+
720+ @property
721+ def location_uri (self ) -> Any :
722+ '''Optional. The physical location of the table (e.g. `gs://spark-
723+ dataproc-data/pangea-data/case_sensitive/` or `gs://spark-dataproc-
724+ data/pangea-data/*`). The maximum length is 2056 bytes.'''
725+
726+ return self ._properties .get ("locationUri" )
727+
728+ @location_uri .setter
729+ def location_uri (self , value : Optional [str ]):
730+ value = _isinstance_or_raise (value , (str , None ))
731+ self ._properties ['locationUri' ] = value
732+
733+ @property
734+ def output_format (self ) -> Any :
735+ '''Optional. Specifies the fully qualified class name of the
736+ OutputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat").
737+ The maximum length is 128 characters.'''
681738
739+ return self ._properties .get ("outputFormat" )
740+
741+ @output_format .setter
742+ def output_format (self , value : Optional [str ]):
743+ value = _isinstance_or_raise (value , (str , None ))
744+ self ._properties ['outputFormat' ] = value
745+
746+ @property
747+ def serde_info (self ) -> Any :
748+ '''Optional. Serializer and deserializer information.'''
749+
750+ return self ._properties .get ("serdeInfo" )
751+
752+ @serde_info .setter
753+ def serde_info (self , value : Optional [Any ]):
754+ value = _isinstance_or_raise (value , (str , None )) #TODO fix, when serde class is done
755+ self ._properties ['serdeInfo' ] = value
756+
757+
758+ def to_api_repr (self ) -> dict :
759+ """Build an API representation of this object.
760+
761+ Returns:
762+ Dict[str, Any]:
763+ A dictionary in the format used by the BigQuery API.
764+ """
765+ return copy .deepcopy (self ._properties )
766+
767+
768+ class SerDeInfo (ResourceBase ):
769+ """Serializer and deserializer information.
770+
771+ Args:
772+ serializationLibrary (str): Required. Specifies a fully-qualified class
773+ name of the serialization library that is responsible for the
774+ translation of data between table representation and the underlying
775+ low-level input and output format structures. The maximum length is
776+ 256 characters.
777+ name (Optional[str]): Name of the SerDe. The maximum length is 256
778+ characters.
779+ parameters: (Optional[dict[str, str]]): Key-value pairs that define the initialization
780+ parameters for the serialization library. Maximum size 10 Kib.
781+ """
782+
783+ def __init__ (self , serialization_library : str , name : Optional [str ] = None , parameters : Optional [dict [str , str ]] = None ):
784+ self ._properties = {}
785+ self .serialization_library = serialization_library
786+ self .name = name
787+ self .parameters = parameters
788+
789+ @property
790+ def serialization_library (self ) -> Any :
791+ '''Required. Specifies a fully-qualified class name of the serialization
792+ library that is responsible for the translation of data between table
793+ representation and the underlying low-level input and output format
794+ structures. The maximum length is 256 characters.'''
795+
796+ return self ._properties .get ('serializationLibrary' )
797+
798+ @serialization_library .setter
799+ def serialization_library (self , value : str ):
800+ value = _isinstance_or_raise (value , str )
801+ self ._properties ['serializationLibrary' ] = value
802+
803+
804+ @property
805+ def name (self ) -> Any :
806+ '''Optional. Name of the SerDe. The maximum length is 256 characters.'''
807+
808+ return self ._properties .get ('name' )
809+
810+ @name .setter
811+ def name (self , value : Optional [str ] = None ):
812+ value = _isinstance_or_raise (value , (str , None ))
813+ self ._properties ['name' ] = value
814+
815+ @property
816+ def parameters (self ) -> Any :
817+ '''Optional. Key-value pairs that define the initialization parameters
818+ for the serialization library. Maximum size 10 Kib.'''
819+
820+ return self ._properties .get ('parameters' )
821+
822+ @parameters .setter
823+ def parameters (self , value : Optional [dict [str , str ]] = None ):
824+ value = _isinstance_or_raise (value , (dict , None ))
825+ self ._properties ['parameters' ] = value
826+
827+ def to_api_repr (self ) -> dict :
828+ """Build an API representation of this object.
829+
830+ Returns:
831+ Dict[str, Any]:
832+ A dictionary in the format used by the BigQuery API.
833+ """
834+ return copy .deepcopy (self ._properties )
0 commit comments