def _InputMappingFrom(messages, input_mapping_data):
  """Translate a dict of input mapping data into a message object.

  Args:
    messages: The API message to use.
    input_mapping_data: A dict containing input mapping data.
  Returns:
    An InputMapping message object derived from options_data.
  """
  return messages.InputMapping(
      fieldName=input_mapping_data.get('fieldName', None),
      location=input_mapping_data.get('location', None),
      methodMatch=input_mapping_data.get('methodMatch', None),
      value=input_mapping_data.get('value', None))