##
# See the file COPYRIGHT for copyright information.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

"""
Address
"""

from abc import ABC

from attr import attrib, attrs
from attr.validators import instance_of


__all__ = ()



class Address(ABC):
    """
    Location address
    """



@attrs(frozen=True)
class TextOnlyAddress(Address):
    """
    Address

    An address contains a description of a location.
    """

    description = attrib(validator=instance_of(str))  # type: str



@attrs(frozen=True)
class RodGarettAddress(Address):
    """
    Rod Garett Address

    Address at concentric and radial streets, as per Rod Garett's design for
    Black Rock City.
    """

    concentric   = attrib(validator=instance_of(int))  # type: int
    radialHour   = attrib(validator=instance_of(int))  # type: int
    radialMinute = attrib(validator=instance_of(int))  # type: int
    description  = attrib(validator=instance_of(str))  # type: str

@@ -634,16 +634,44 @@
 port ABC
+%0Afrom typing import Optional
 %0A%0Afrom a
@@ -734,16 +734,54 @@
 tance_of
+, optional%0A%0AOptional  # Silence linter
 %0A%0A%0A__all
@@ -849,16 +849,38 @@
    %22%22%22%0A%0A
+    description: str%0A%0A
 %0A%0A@attrs
@@ -1284,18 +1284,16 @@
 centric 
-  
 = attrib
@@ -1285,32 +1285,41 @@
 entric = attrib(
+%0A        
 validator=instan
@@ -1304,32 +1304,41 @@
       validator=
+optional(
 instance_of(int)
@@ -1330,32 +1330,38 @@
 nstance_of(int))
+%0A    )
   # type: int%0A  
@@ -1346,35 +1346,45 @@
 %0A    )  # type: 
+Optional%5B
 int
+%5D
 %0A    radialHour 
@@ -1383,18 +1383,16 @@
 ialHour 
-  
 = attrib
@@ -1384,32 +1384,41 @@
 alHour = attrib(
+%0A        
 validator=instan
@@ -1403,32 +1403,41 @@
       validator=
+optional(
 instance_of(int)
@@ -1429,32 +1429,38 @@
 nstance_of(int))
+%0A    )
   # type: int%0A  
@@ -1449,27 +1449,37 @@
  )  # type: 
+Optional%5B
 int
+%5D
 %0A    radialM
@@ -1485,32 +1485,41 @@
 Minute = attrib(
+%0A        
 validator=instan
@@ -1504,32 +1504,41 @@
       validator=
+optional(
 instance_of(int)
@@ -1538,16 +1538,22 @@
 of(int))
+%0A    )
   # type
@@ -1554,19 +1554,29 @@
 # type: 
+Optional%5B
 int
+%5D
 %0A    des
@@ -1584,17 +1584,16 @@
 ription 
- 
 = attrib
@@ -1585,32 +1585,41 @@
 iption = attrib(
+%0A        
 validator=instan
@@ -1620,31 +1620,36 @@
 instance_of(str)
+%0A    
 )  # type: str%0A

Make numeric fields optional