openapi-azure-storage-blob 0.1.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Azure Storage Blob service
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2026-02-06
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CorsRule : CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CorsRule {
    /// The allowed origins.
    #[serde(rename = "AllowedOrigins")]
    pub allowed_origins: String,
    /// The allowed methods.
    #[serde(rename = "AllowedMethods")]
    pub allowed_methods: String,
    /// The allowed headers.
    #[serde(rename = "AllowedHeaders")]
    pub allowed_headers: String,
    /// The exposed headers.
    #[serde(rename = "ExposedHeaders")]
    pub exposed_headers: String,
    /// The maximum age in seconds.
    #[serde(rename = "MaxAgeInSeconds")]
    pub max_age_in_seconds: i32,
}

impl CorsRule {
    /// CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain
    pub fn new(
        allowed_origins: String,
        allowed_methods: String,
        allowed_headers: String,
        exposed_headers: String,
        max_age_in_seconds: i32,
    ) -> CorsRule {
        CorsRule {
            allowed_origins,
            allowed_methods,
            allowed_headers,
            exposed_headers,
            max_age_in_seconds,
        }
    }
}