Skip to main content

iceberg_rest_catalog/models/
commit_table_response.rs

1/*
2 * Apache Iceberg REST Catalog API
3 *
4 * Defines the specification for the first version of the REST Catalog API. Implementations should ideally support both Iceberg table specs v1 and v2, with priority given to v2.
5 *
6 * The version of the OpenAPI document: 0.0.1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use iceberg_rust::spec::table_metadata::TableMetadata;
13use serde::{Deserialize, Serialize};
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CommitTableResponse {
17    #[serde(rename = "metadata-location")]
18    pub metadata_location: String,
19    #[serde(rename = "metadata")]
20    pub metadata: TableMetadata,
21}
22
23impl CommitTableResponse {
24    pub fn new(metadata_location: String, metadata: TableMetadata) -> CommitTableResponse {
25        CommitTableResponse {
26            metadata_location,
27            metadata,
28        }
29    }
30}