feat(storage): add support for bucket ip filter by ddelgrosso1 · Pull Request #15250 · googleapis/google-cloud-cpp

@ddelgrosso1

This change is Reviewable

@codecov

rajeevpodar

return Status{};
}

Status ParseIpFilter(BucketMetadata& meta, nlohmann::json const& json) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code can be made more readable by using from_json semantics.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.

json["iamConfiguration"] = std::move(value);
}

void ToJsonIpFilter(nlohmann::json& json, BucketMetadata const& meta) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto, to_json semantics seems to be potential candidate here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.

}

Status PatchIpFilter(Bucket& b, nlohmann::json const& p) {
if (p.is_null()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from_json seems more suitable

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.

bajajneha27

@ddelgrosso1

@ddelgrosso1

@ddelgrosso1