Skip to content

Commit 4ee909a

Browse files
committed
removed duplicate _BaseExecutePipeline
1 parent 631bda8 commit 4ee909a

File tree

1 file changed

+0
-56
lines changed
  • google/cloud/firestore_v1/services/firestore/transports

1 file changed

+0
-56
lines changed

google/cloud/firestore_v1/services/firestore/transports/rest_base.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -474,62 +474,6 @@ def _get_query_params_json(transcoded_request):
474474
)
475475
)
476476

477-
return query_params
478-
479-
class _BaseExecutePipeline:
480-
def __hash__(self): # pragma: NO COVER
481-
return NotImplementedError("__hash__ must be implemented.")
482-
483-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
484-
485-
@classmethod
486-
def _get_unset_required_fields(cls, message_dict):
487-
return {
488-
k: v
489-
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
490-
if k not in message_dict
491-
}
492-
493-
@staticmethod
494-
def _get_http_options():
495-
http_options: List[Dict[str, str]] = [
496-
{
497-
"method": "post",
498-
"uri": "/v1/{database=projects/*/databases/*}/documents:executePipeline",
499-
"body": "*",
500-
},
501-
]
502-
return http_options
503-
504-
@staticmethod
505-
def _get_transcoded_request(http_options, request):
506-
pb_request = firestore.ExecutePipelineRequest.pb(request)
507-
transcoded_request = path_template.transcode(http_options, pb_request)
508-
return transcoded_request
509-
510-
@staticmethod
511-
def _get_request_body_json(transcoded_request):
512-
# Jsonify the request body
513-
514-
body = json_format.MessageToJson(
515-
transcoded_request["body"], use_integers_for_enums=True
516-
)
517-
return body
518-
519-
@staticmethod
520-
def _get_query_params_json(transcoded_request):
521-
query_params = json.loads(
522-
json_format.MessageToJson(
523-
transcoded_request["query_params"],
524-
use_integers_for_enums=True,
525-
)
526-
)
527-
query_params.update(
528-
_BaseFirestoreRestTransport._BaseExecutePipeline._get_unset_required_fields(
529-
query_params
530-
)
531-
)
532-
533477
query_params["$alt"] = "json;enum-encoding=int"
534478
return query_params
535479

0 commit comments

Comments
 (0)