anchor.diff:      get_extension/1,
       set_extension/2,
       clear_extension/1,
  +    has_italian_leading_zero/1,
       set_italian_leading_zero/2,
  -%   is_italian_leading_zero/1,
  +    is_italian_leading_zero/1,
       clear_italian_leading_zero/1,
  -%   has_raw_input/1,
  -%   get_raw_input/1,
  +    has_number_of_leading_zeros/1,
  +    get_number_of_leading_zeros/1,
  +    set_number_of_leading_zeros/2,
  +    clear_number_of_leading_zeros/1,
  +    has_raw_input/1,
  +    get_raw_input/1,
       set_raw_input/2,
  -%   clear_raw_input/1,
  -%   has_country_code_source/1,
  -%   get_country_code_source/1,
  -%   set_country_code_source/2,
  -%   clear_country_code_source/1,
  -%   has_preferred_domestic_carrier_code/1,
  -%   get_preferred_domestic_carrier_code/1,
  +    clear_raw_input/1,
  +    has_country_code_source/1,
  +    get_country_code_source/1,
  +    set_country_code_source/2,
  +    clear_country_code_source/1,
  +    has_preferred_domestic_carrier_code/1,
  +    get_preferred_domestic_carrier_code/1,
       set_preferred_domestic_carrier_code/2,
  -%   clear_preferred_domestic_carrier_code/1,
  -    clear/1
  -%   merge_from/2,
  -%   exactly_same_as/2,
  -%   hash_code/1
  +    clear_preferred_domestic_carrier_code/1,
  +    clear/1,
  +    merge_from/2,
  +    exactly_same_as/2
       ]).
   
   -spec new() -> PhoneNumber::phonenumber().
  
positive.code: 
  -spec has_country_code(PhoneNumber::phonenumber()) -> boolean().
  
  has_country_code(#phonenumber{has_country_code=Hcc}) ->
      Hcc.
  
  -spec get_country_code(PhoneNumber::phonenumber()) -> non_neg_integer().
  
  get_country_code(#phonenumber{country_code=CC}) ->
      CC.
  
  -spec set_country_code(CountryCode::non_neg_integer(), PhoneNumber::phonenumber()) -> NewPhoneNumber::phonenumber().
  
  set_country_code(_CountryCode, #phonenumber{}=PhoneNumber) when is_integer(_CountryCode)  ->
      PhoneNumber#phonenumber{has_country_code = true, country_code = _CountryCode};
  
negative.code: clear_extension(#phonenumber{}=PhoneNumber) ->
      PhoneNumber#phonenumber{has_extension=false, extension = <<>>}.
  
  %% italian leading zero
  
  -spec has_italian_leading_zero(PhoneNumber::phonenumber()) -> boolean().
  
  has_italian_leading_zero(#phonenumber{has_italian_leading_zero=Value}) ->
      Value.
  
  -spec is_italian_leading_zero(PhoneNumber::phonenumber()) -> boolean().
  
  is_italian_leading_zero(#phonenumber{italian_leading_zero=Value}) ->
      Value.
  
  -spec set_italian_leading_zero(
      ItalianLeadingZero::boolean(),
      PhoneNumber::phonenumber()
      ) -> NewPhoneNumber::phonenumber().
  
  set_italian_leading_zero(_ItalianLeadingZero, #phonenumber{}=PhoneNumber) ->
      PhoneNumber#phonenumber{
          has_italian_leading_zero = true,
          italian_leading_zero = _ItalianLeadingZero}.
  
  -spec clear_italian_leading_zero(PhoneNumber::phonenumber()) -> NewPhoneNumber::phonenumber().
  
  clear_italian_leading_zero(#phonenumber{}=PhoneNumber) -> 
      PhoneNumber#phonenumber{
          has_italian_leading_zero = false,
          italian_leading_zero = false}.
  
  %% number of leading zeros
  
  -spec has_number_of_leading_zeros(PhoneNumber::phonenumber()) -> boolean().
  
  has_number_of_leading_zeros(#phonenumber{has_number_of_leading_zeros=Value}) ->
      Value.
  
  -spec get_number_of_leading_zeros(PhoneNumber::phonenumber()) -> non_neg_integer().
  
  get_number_of_leading_zeros(#phonenumber{number_of_leading_zeros=Value}) ->
      Value.
  
  -spec set_number_of_leading_zeros(
      NumberOfLeadingZeros::non_neg_integer(),
      PhoneNumber::phonenumber()
      ) -> NewPhoneNumber::phonenumber().
  
  set_number_of_leading_zeros(_NumberOfLeadingZeros, #phonenumber{}=PhoneNumber) ->
      PhoneNumber#phonenumber{
          has_number_of_leading_zeros = true,
          number_of_leading_zeros = _NumberOfLeadingZeros}.
  
  -spec clear_number_of_leading_zeros(PhoneNumber::phonenumber()) -> NewPhoneNumber::phonenumber().
  
  clear_number_of_leading_zeros(#phonenumber{}=PhoneNumber) -> 
      PhoneNumber#phonenumber{has_number_of_leading_zeros = false, number_of_leading_zeros = 1}.
  
  %% raw imput
  
  -spec has_raw_input(PhoneNumber::phonenumber()) -> boolean().
  
  has_raw_input(#phonenumber{has_raw_input=Value}) ->
      Value.
  
  -spec get_raw_input(PhoneNumber::phonenumber()) -> binary().
  
  get_raw_input(#phonenumber{raw_input=Value}) ->
      Value.
  
  -spec set_raw_input(RawInput::binary(), PhoneNumber::phonenumber()) -> NewPhoneNumber::phonenumber().
  
  set_raw_input(_RawInput, #phonenumber{}=PhoneNumber) ->
      PhoneNumber#phonenumber{has_raw_input=true, raw_input = _RawInput}.
  
  -spec clear_raw_input(PhoneNumber::phonenumber()) -> NewPhoneNumber::phonenumber().
  
  clear_raw_input(#phonenumber{}=PhoneNumber) ->
      PhoneNumber#phonenumber{has_raw_input=false, raw_input = <<>>}.
  
  %% country code source
  
  -spec has_country_code_source(PhoneNumber::phonenumber()) -> boolean().
  
  has_country_code_source(#phonenumber{has_country_code_source=Value}) ->
      Value.
  
  -spec get_country_code_source(PhoneNumber::phonenumber()) -> phonenumber_country_code_source().
  
  get_country_code_source(#phonenumber{country_code_source=Value}) ->
      Value.
  
  -spec set_country_code_source(
      CountryCodeSource::phonenumber_country_code_source(),
      PhoneNumber::phonenumber()
      ) -> NewPhoneNumber::phonenumber().
  
  set_country_code_source(CountryCodeSource, #phonenumber{}=PhoneNumber) ->
      PhoneNumber#phonenumber{
          has_country_code_source=true, 
          country_code_source = CountryCodeSource}.
  
  -spec clear_country_code_source(PhoneNumber::phonenumber()) -> NewPhoneNumber::phonenumber().
  
  clear_country_code_source(#phonenumber{}=PhoneNumber) ->
      PhoneNumber#phonenumber{
          has_country_code_source=false, 
          country_code_source = from_number_with_plus_sign}.
  
  %% preferred domestic carrier code
  
  -spec has_preferred_domestic_carrier_code(PhoneNumber::phonenumber()) -> boolean().
  
  has_preferred_domestic_carrier_code(#phonenumber{has_preferred_domestic_carrier_code=Value}) ->
      Value.
  
  -spec get_preferred_domestic_carrier_code(PhoneNumber::phonenumber()) -> binary().
  
  get_preferred_domestic_carrier_code(#phonenumber{preferred_domestic_carrier_code=Value}) ->
      Value.
  
  -spec set_preferred_domestic_carrier_code(
      PreferredDomesticCarrierCode::binary(),
      PhoneNumber::phonenumber()
  