uuid: 2a67c969-5d1a-43ca-b36e-539185903f89
langcode: en
status: true
dependencies: {  }
id: gronze_node_albergues_fields
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags:
  - node
  - gronze
  - albergues
  - level3
migration_group: gronze_node_fields
label: 'Albergues nodes fields migration from Gronze D7'
source:
  high_water_property:
    name: vid
    alias: 'n'
  plugin: d7_node_gronze
  node_type: albergues
process:
  changed: changed
  nid:
    plugin: migration_lookup
    migration: gronze_node_albergues
    source: nid
    no_stub: true
  field_accommodation_status: field_hostel_status
  field_exclusive_pilgrims: field_exclusivo_para_peregrinos
  field_reservation_accepted: field_admite_reserva
  field_year_opening: field_a_o_de_apertura
  field_ownership: field_titularidad
  field_management: field_gesti_n
  field_in_charge: field_encargado
  field_availability: field_disponibilidad_meses_inclu
  field_hour_opening: field_hora_de_apertura_
  field_hour_close: field_hora_de_cierre
  field_observations: field_observaciones
  field_featured_note: field_nota_destacada
  field_admin_notes: field_admin_notes
  field_localizacion: field_localizacion
  field_geo_address/country_code: field_geo_address/0/country
  field_geo_address/administrative_area: field_geo_address/0/administrative_area
  field_geo_address/locality: field_geo_address/0/locality
  field_geo_address/dependent_locality: field_geo_address/0/dependent_locality
  field_geo_address/postal_code: field_geo_address/0/postal_code
  field_geo_address/address_line1: field_geo_address/0/thoroughfare
  field_geo_address/organization: field_geo_address/0/organisation_name
  field_geo_location:
    plugin: geofield_latlon
    source:
      - field_geo_location/0/lat
      - field_geo_location/0/lon
  field_geo_altitude: field_geo_altitude
  field_contact_phone: field_contact_phone
  field_contact_email/value: field_contact_email/0/email
  field_web/uri: field_web/0/url
  field_whatsapp: field_whatsapp
  field_ref_accommodation_manager:
    plugin: migration_lookup
    migration: gronze_user
    source: field_hostel_manager
    no_stub: true
  field_ref_accommodation_type:
    plugin: migration_lookup
    migration: gronze_taxonomy_accommodation_type
    source: field_tipo_albergue
    no_stub: true
  field_ref_accommodation_services:
    plugin: sub_process
    source: field_servicios_albergue
    process:
      target_id:
        plugin: migration_lookup
        migration: gronze_taxonomy_accommodation_services
        source: target_id
        no_stub: true
  field_ref_location:
    plugin: sub_process
    source: field_localidad
    process:
      target_id:
        plugin: migration_lookup
        migration: gronze_taxonomy_locations
        source: tid
        no_stub: true
  field_image:
    plugin: sub_process
    source: field_foto_principal_albergue
    process:
      target_id:
        plugin: migration_lookup
        migration: gronze_media_image
        source: fid
        no_stub: true
  field_photos:
    plugin: sub_process
    source: field_fotos_
    process:
      target_id:
        plugin: migration_lookup
        migration: gronze_media_image
        source: fid
        no_stub: true
  field_room_notes: field_room_notes
  field_room_number:
    plugin: child_entity_generate
    source: field_room_number
    entity_type: paragraph
    bundle: accomodation_room_number
    values:
      field_rooms: first
      field_accomodation_room: second
  field_room_price:
    plugin: child_entity_generate
    source: field_room_price
    entity_type: paragraph
    bundle: accomodation_room_price
    values:
      field_room_price: first
      field_accomodation_room_price: second
  field_show_in_listings: promote
  field_booking_com_id: booking_com_mapping_id
  field_booking_com_type: booking_com_mapping_type
  field_booking_com_url/uri:
    -
      plugin: null_coalesce
      source:
        - booking_com_mapping_url
        - field_booking_com_url/0/url
      default_value: ''
    -
      plugin: booking_url_processor
  field_ref_class:
    -
      plugin: default_value
      default_value: 'Clase 1'
    -
      plugin: entity_lookup
      value_key: name
      bundle_key: vid
      bundle: class_accommodation
      entity_type: taxonomy_term
      ignore_case: true
destination:
  plugin: 'entity:node'
  default_bundle: accommodation
migration_dependencies:
  required:
    - gronze_node_albergues
    - gronze_user
    - gronze_taxonomy_accommodation_type
    - gronze_taxonomy_accommodation_services
    - gronze_taxonomy_locations
    - gronze_media_image
