# coding: utf-8

"""
    NetHSM

    All endpoints expect exactly the specified JSON. Additional properties will cause a Bad Request Error (400). All HTTP errors contain a JSON structure with an explanation of type string. All <a href=\"https://tools.ietf.org/html/rfc4648#section-4\">base64</a> encoded values are Big Endian.  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from pynitrokey.nethsm.client import schemas  # noqa: F401


class DistinguishedName(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """


    class MetaOapg:
        required = {
            "commonName",
        }
        
        class properties:
            commonName = schemas.StrSchema
            countryName = schemas.StrSchema
            stateOrProvinceName = schemas.StrSchema
            localityName = schemas.StrSchema
            organizationName = schemas.StrSchema
            organizationalUnitName = schemas.StrSchema
            emailAddress = schemas.StrSchema
            __annotations__ = {
                "commonName": commonName,
                "countryName": countryName,
                "stateOrProvinceName": stateOrProvinceName,
                "localityName": localityName,
                "organizationName": organizationName,
                "organizationalUnitName": organizationalUnitName,
                "emailAddress": emailAddress,
            }
    
    commonName: MetaOapg.properties.commonName
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["commonName"]) -> MetaOapg.properties.commonName: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["countryName"]) -> MetaOapg.properties.countryName: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["stateOrProvinceName"]) -> MetaOapg.properties.stateOrProvinceName: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["localityName"]) -> MetaOapg.properties.localityName: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["organizationName"]) -> MetaOapg.properties.organizationName: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["organizationalUnitName"]) -> MetaOapg.properties.organizationalUnitName: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["emailAddress"]) -> MetaOapg.properties.emailAddress: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["commonName", "countryName", "stateOrProvinceName", "localityName", "organizationName", "organizationalUnitName", "emailAddress", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["commonName"]) -> MetaOapg.properties.commonName: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["countryName"]) -> typing.Union[MetaOapg.properties.countryName, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["stateOrProvinceName"]) -> typing.Union[MetaOapg.properties.stateOrProvinceName, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["localityName"]) -> typing.Union[MetaOapg.properties.localityName, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["organizationName"]) -> typing.Union[MetaOapg.properties.organizationName, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["organizationalUnitName"]) -> typing.Union[MetaOapg.properties.organizationalUnitName, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["emailAddress"]) -> typing.Union[MetaOapg.properties.emailAddress, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["commonName", "countryName", "stateOrProvinceName", "localityName", "organizationName", "organizationalUnitName", "emailAddress", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        commonName: typing.Union[MetaOapg.properties.commonName, str, ],
        countryName: typing.Union[MetaOapg.properties.countryName, str, schemas.Unset] = schemas.unset,
        stateOrProvinceName: typing.Union[MetaOapg.properties.stateOrProvinceName, str, schemas.Unset] = schemas.unset,
        localityName: typing.Union[MetaOapg.properties.localityName, str, schemas.Unset] = schemas.unset,
        organizationName: typing.Union[MetaOapg.properties.organizationName, str, schemas.Unset] = schemas.unset,
        organizationalUnitName: typing.Union[MetaOapg.properties.organizationalUnitName, str, schemas.Unset] = schemas.unset,
        emailAddress: typing.Union[MetaOapg.properties.emailAddress, str, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
    ) -> 'DistinguishedName':
        return super().__new__(
            cls,
            *args,
            commonName=commonName,
            countryName=countryName,
            stateOrProvinceName=stateOrProvinceName,
            localityName=localityName,
            organizationName=organizationName,
            organizationalUnitName=organizationalUnitName,
            emailAddress=emailAddress,
            _configuration=_configuration,
            **kwargs,
        )
