Skip to main content

openapi_azure_storage_blob/models/
block.rs

1/*
2 * Azure Storage Blob service
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 2026-02-06
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Block : Represents a single block in a block blob. It describes the block's ID and size.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Block {
17    #[serde(rename = "Name")]
18    pub name: String,
19    /// The block size in bytes.
20    #[serde(rename = "Size")]
21    pub size: i64,
22}
23
24impl Block {
25    /// Represents a single block in a block blob. It describes the block's ID and size.
26    pub fn new(name: String, size: i64) -> Block {
27        Block { name, size }
28    }
29}