class BagKadasterClient::Verblijfsobject

Een Verblijfsobject is de kleinste binnen een of meer panden gelegen en voor woon-, bedrijfsmatige, of recreatieve doeleinden geschikte eenheid van gebruik die ontsloten wordt via een eigen afsluitbare toegang vanaf de openbare weg, een erf of een gedeelde verkeersruimte, onderwerp kan zijn van goederenrechtelijke rechtshandelingen en in functioneel opzicht zelfstandig is.

Attributes

documentdatum[RW]

De datum waarop het brondocument is vastgesteld, op basis waarvan een opname, mutatie of een verwijdering van gegevens ten aanzien van een object heeft plaatsgevonden.

documentnummer[RW]

De unieke aanduiding van het brondocument op basis waarvan een opname, mutatie of een verwijdering van gegevens ten aanzien van een woonplaats heeft plaatsgevonden, binnen een gemeente. Alle karakters uit de MES-1 karakterset zijn toegestaan.

domein[RW]

NL.IMBAG.Verblijfsobject

gebruiksdoelen[RW]
geconstateerd[RW]
geometrie[RW]
identificatie[RW]

Deze wordt gebruikt in de operation.

maakt_deel_uit_van[RW]
oppervlakte[RW]
status[RW]
voorkomen[RW]

Public Class Methods

acceptable_attributes() click to toggle source

Returns all the JSON keys this model knows about, including the ones defined in its parent(s)

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 63
def self.acceptable_attributes
  attribute_map.values.concat(superclass.acceptable_attributes)
end
attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 46
def self.attribute_map
  {
    :'identificatie' => :'identificatie',
    :'domein' => :'domein',
    :'geometrie' => :'geometrie',
    :'gebruiksdoelen' => :'gebruiksdoelen',
    :'oppervlakte' => :'oppervlakte',
    :'status' => :'status',
    :'geconstateerd' => :'geconstateerd',
    :'documentdatum' => :'documentdatum',
    :'documentnummer' => :'documentnummer',
    :'voorkomen' => :'voorkomen',
    :'maakt_deel_uit_van' => :'maaktDeelUitVan'
  }
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 411
def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 100
def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `BagKadasterClient::Verblijfsobject` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `BagKadasterClient::Verblijfsobject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  # call parent's initialize
  super(attributes)

  if attributes.key?(:'identificatie')
    self.identificatie = attributes[:'identificatie']
  end

  if attributes.key?(:'domein')
    self.domein = attributes[:'domein']
  end

  if attributes.key?(:'geometrie')
    self.geometrie = attributes[:'geometrie']
  end

  if attributes.key?(:'gebruiksdoelen')
    if (value = attributes[:'gebruiksdoelen']).is_a?(Array)
      self.gebruiksdoelen = value
    end
  end

  if attributes.key?(:'oppervlakte')
    self.oppervlakte = attributes[:'oppervlakte']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'geconstateerd')
    self.geconstateerd = attributes[:'geconstateerd']
  end

  if attributes.key?(:'documentdatum')
    self.documentdatum = attributes[:'documentdatum']
  end

  if attributes.key?(:'documentnummer')
    self.documentnummer = attributes[:'documentnummer']
  end

  if attributes.key?(:'voorkomen')
    self.voorkomen = attributes[:'voorkomen']
  end

  if attributes.key?(:'maakt_deel_uit_van')
    if (value = attributes[:'maakt_deel_uit_van']).is_a?(Array)
      self.maakt_deel_uit_van = value
    end
  end
end
openapi_all_of() click to toggle source

List of class defined in allOf (OpenAPI v3)

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 91
def self.openapi_all_of
  [
  :'AdresseerbaarObject',
  :'VerblijfsobjectAllOf'
  ]
end
openapi_nullable() click to toggle source

List of attributes with nullable: true

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 85
def self.openapi_nullable
  Set.new([
  ])
end
openapi_types() click to toggle source

Attribute type mapping.

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 68
def self.openapi_types
  {
    :'identificatie' => :'String',
    :'domein' => :'String',
    :'geometrie' => :'PuntOfVlak',
    :'gebruiksdoelen' => :'Array<Gebruiksdoel>',
    :'oppervlakte' => :'Integer',
    :'status' => :'StatusVerblijfsobject',
    :'geconstateerd' => :'Indicatie',
    :'documentdatum' => :'Date',
    :'documentnummer' => :'String',
    :'voorkomen' => :'Voorkomen',
    :'maakt_deel_uit_van' => :'Array<String>'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 380
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      identificatie == o.identificatie &&
      domein == o.domein &&
      geometrie == o.geometrie &&
      gebruiksdoelen == o.gebruiksdoelen &&
      oppervlakte == o.oppervlakte &&
      status == o.status &&
      geconstateerd == o.geconstateerd &&
      documentdatum == o.documentdatum &&
      documentnummer == o.documentnummer &&
      voorkomen == o.voorkomen &&
      maakt_deel_uit_van == o.maakt_deel_uit_van && super(o)
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 442
def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = BagKadasterClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 513
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 418
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  super(attributes)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end
documentnummer=(documentnummer) click to toggle source

Custom attribute writer method with validation @param [Object] documentnummer Value to be assigned

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 343
def documentnummer=(documentnummer)
  if documentnummer.nil?
    fail ArgumentError, 'documentnummer cannot be nil'
  end

  if documentnummer.to_s.length > 40
    fail ArgumentError, 'invalid value for "documentnummer", the character length must be smaller than or equal to 40.'
  end

  if documentnummer.to_s.length < 1
    fail ArgumentError, 'invalid value for "documentnummer", the character length must be great than or equal to 1.'
  end

  pattern = Regexp.new(/^[\u0020-\u007E;\u00A0-\u00FF;\u0100-\u0113;\u0116-\u012B;\u012E-\u014D;\u0150-\u017E;\u02C7;\u02D8-\u02DB;\u02DD;\u2015;\u2018-\u2019;\u201C-\u201D;\u20AC;\u2122;\u2126;\u215B-\u215E;\u2190-\u2193;\u266A;]*/)
  if documentnummer !~ pattern
    fail ArgumentError, "invalid value for \"documentnummer\", must conform to the pattern #{pattern}."
  end

  @documentnummer = documentnummer
end
domein=(domein) click to toggle source

Custom attribute writer method with validation @param [Object] domein Value to be assigned

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 305
def domein=(domein)
  if domein.nil?
    fail ArgumentError, 'domein cannot be nil'
  end

  if domein.to_s.length < 1
    fail ArgumentError, 'invalid value for "domein", the character length must be great than or equal to 1.'
  end

  @domein = domein
end
eql?(o) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 398
def eql?(o)
  self == o
end
gebruiksdoelen=(gebruiksdoelen) click to toggle source

Custom attribute writer method with validation @param [Object] gebruiksdoelen Value to be assigned

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 319
def gebruiksdoelen=(gebruiksdoelen)
  if gebruiksdoelen.nil?
    fail ArgumentError, 'gebruiksdoelen cannot be nil'
  end

  if gebruiksdoelen.length < 1
    fail ArgumentError, 'invalid value for "gebruiksdoelen", number of items must be greater than or equal to 1.'
  end

  @gebruiksdoelen = gebruiksdoelen
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Integer] Hash code

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 404
def hash
  [identificatie, domein, geometrie, gebruiksdoelen, oppervlakte, status, geconstateerd, documentdatum, documentnummer, voorkomen, maakt_deel_uit_van].hash
end
identificatie=(identificatie) click to toggle source

Custom attribute writer method with validation @param [Object] identificatie Value to be assigned

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 282
def identificatie=(identificatie)
  if identificatie.nil?
    fail ArgumentError, 'identificatie cannot be nil'
  end

  if identificatie.to_s.length > 16
    fail ArgumentError, 'invalid value for "identificatie", the character length must be smaller than or equal to 16.'
  end

  if identificatie.to_s.length < 16
    fail ArgumentError, 'invalid value for "identificatie", the character length must be great than or equal to 16.'
  end

  pattern = Regexp.new(/^[0-9]{4}01[0-9]{10}$/)
  if identificatie !~ pattern
    fail ArgumentError, "invalid value for \"identificatie\", must conform to the pattern #{pattern}."
  end

  @identificatie = identificatie
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 167
def list_invalid_properties
  invalid_properties = super
  if @identificatie.nil?
    invalid_properties.push('invalid value for "identificatie", identificatie cannot be nil.')
  end

  if @identificatie.to_s.length > 16
    invalid_properties.push('invalid value for "identificatie", the character length must be smaller than or equal to 16.')
  end

  if @identificatie.to_s.length < 16
    invalid_properties.push('invalid value for "identificatie", the character length must be great than or equal to 16.')
  end

  pattern = Regexp.new(/^[0-9]{4}01[0-9]{10}$/)
  if @identificatie !~ pattern
    invalid_properties.push("invalid value for \"identificatie\", must conform to the pattern #{pattern}.")
  end

  if @domein.nil?
    invalid_properties.push('invalid value for "domein", domein cannot be nil.')
  end

  if @domein.to_s.length < 1
    invalid_properties.push('invalid value for "domein", the character length must be great than or equal to 1.')
  end

  if @geometrie.nil?
    invalid_properties.push('invalid value for "geometrie", geometrie cannot be nil.')
  end

  if @gebruiksdoelen.nil?
    invalid_properties.push('invalid value for "gebruiksdoelen", gebruiksdoelen cannot be nil.')
  end

  if @gebruiksdoelen.length < 1
    invalid_properties.push('invalid value for "gebruiksdoelen", number of items must be greater than or equal to 1.')
  end

  if @oppervlakte.nil?
    invalid_properties.push('invalid value for "oppervlakte", oppervlakte cannot be nil.')
  end

  if @status.nil?
    invalid_properties.push('invalid value for "status", status cannot be nil.')
  end

  if @geconstateerd.nil?
    invalid_properties.push('invalid value for "geconstateerd", geconstateerd cannot be nil.')
  end

  if @documentdatum.nil?
    invalid_properties.push('invalid value for "documentdatum", documentdatum cannot be nil.')
  end

  if @documentnummer.nil?
    invalid_properties.push('invalid value for "documentnummer", documentnummer cannot be nil.')
  end

  if @documentnummer.to_s.length > 40
    invalid_properties.push('invalid value for "documentnummer", the character length must be smaller than or equal to 40.')
  end

  if @documentnummer.to_s.length < 1
    invalid_properties.push('invalid value for "documentnummer", the character length must be great than or equal to 1.')
  end

  pattern = Regexp.new(/^[\u0020-\u007E;\u00A0-\u00FF;\u0100-\u0113;\u0116-\u012B;\u012E-\u014D;\u0150-\u017E;\u02C7;\u02D8-\u02DB;\u02DD;\u2015;\u2018-\u2019;\u201C-\u201D;\u20AC;\u2122;\u2126;\u215B-\u215E;\u2190-\u2193;\u266A;]*/)
  if @documentnummer !~ pattern
    invalid_properties.push("invalid value for \"documentnummer\", must conform to the pattern #{pattern}.")
  end

  if @voorkomen.nil?
    invalid_properties.push('invalid value for "voorkomen", voorkomen cannot be nil.')
  end

  if @maakt_deel_uit_van.nil?
    invalid_properties.push('invalid value for "maakt_deel_uit_van", maakt_deel_uit_van cannot be nil.')
  end

  if @maakt_deel_uit_van.length < 1
    invalid_properties.push('invalid value for "maakt_deel_uit_van", number of items must be greater than or equal to 1.')
  end

  invalid_properties
end
maakt_deel_uit_van=(maakt_deel_uit_van) click to toggle source

Custom attribute writer method with validation @param [Object] maakt_deel_uit_van Value to be assigned

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 366
def maakt_deel_uit_van=(maakt_deel_uit_van)
  if maakt_deel_uit_van.nil?
    fail ArgumentError, 'maakt_deel_uit_van cannot be nil'
  end

  if maakt_deel_uit_van.length < 1
    fail ArgumentError, 'invalid value for "maakt_deel_uit_van", number of items must be greater than or equal to 1.'
  end

  @maakt_deel_uit_van = maakt_deel_uit_van
end
oppervlakte=(oppervlakte) click to toggle source

Custom attribute writer method with validation @param [Object] oppervlakte Value to be assigned

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 333
def oppervlakte=(oppervlakte)
  if oppervlakte.nil?
    fail ArgumentError, 'oppervlakte cannot be nil'
  end

  @oppervlakte = oppervlakte
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 489
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 495
def to_hash
  hash = super
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 483
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/bag_kadaster_client/models/verblijfsobject.rb, line 256
def valid?
  return false if @identificatie.nil?
  return false if @identificatie.to_s.length > 16
  return false if @identificatie.to_s.length < 16
  return false if @identificatie !~ Regexp.new(/^[0-9]{4}01[0-9]{10}$/)
  return false if @domein.nil?
  return false if @domein.to_s.length < 1
  return false if @geometrie.nil?
  return false if @gebruiksdoelen.nil?
  return false if @gebruiksdoelen.length < 1
  return false if @oppervlakte.nil?
  return false if @status.nil?
  return false if @geconstateerd.nil?
  return false if @documentdatum.nil?
  return false if @documentnummer.nil?
  return false if @documentnummer.to_s.length > 40
  return false if @documentnummer.to_s.length < 1
  return false if @documentnummer !~ Regexp.new(/^[\u0020-\u007E;\u00A0-\u00FF;\u0100-\u0113;\u0116-\u012B;\u012E-\u014D;\u0150-\u017E;\u02C7;\u02D8-\u02DB;\u02DD;\u2015;\u2018-\u2019;\u201C-\u201D;\u20AC;\u2122;\u2126;\u215B-\u215E;\u2190-\u2193;\u266A;]*/)
  return false if @voorkomen.nil?
  return false if @maakt_deel_uit_van.nil?
  return false if @maakt_deel_uit_van.length < 1
  true && super
end