def update_by_key( self, key: str, version: int, actions: typing.List[types.TypeUpdateAction]) -> types.Type: update_action = types.TypeUpdate(version=version, actions=actions) return self._client._post( f"types/key={key}", {}, update_action, schemas.TypeUpdateSchema, schemas.TypeSchema, )
def update_by_key( self, key: str, version: int, actions: typing.List[types.TypeUpdateAction], *, force_update: bool = False, ) -> types.Type: update_action = types.TypeUpdate(version=version, actions=actions) return self._client._post( endpoint=f"types/key={key}", params={}, data_object=update_action, request_schema_cls=schemas.TypeUpdateSchema, response_schema_cls=schemas.TypeSchema, force_update=force_update, )
def update_by_key( self, key: str, version: int, actions: typing.List[types.TypeUpdateAction], expand: OptionalListStr = None, *, force_update: bool = False, ) -> types.Type: query_params = {} if expand: query_params["expand"] = expand update_action = types.TypeUpdate(version=version, actions=actions) return self._client._post( endpoint=f"types/key={key}", params=query_params, data_object=update_action, request_schema_cls=schemas.TypeUpdateSchema, response_schema_cls=schemas.TypeSchema, force_update=force_update, )
def post_load(self, data, **kwargs): return types.TypeUpdate(**data)
def post_load(self, data): return types.TypeUpdate(**data)