Creates the feed mapping for DSA page feeds.

  Args:
    client: an AdWordsClient instance.
    feed_details: a _DSAFeedDetails instance.

def _CreateFeedMapping(client, feed_details):
  """Creates the feed mapping for DSA page feeds.

  Args:
    client: an AdWordsClient instance.
    feed_details: a _DSAFeedDetails instance.
  """
  # Get the FeedMappingService.
  feed_mapping_service = client.GetService('FeedMappingService',
                                           version='v201809')

  # Create the operation.
  operation = {
      # Create the feed mapping.
      'operand': {
          'criterionType': DSA_PAGE_FEED_CRITERION_TYPE,
          'feedId': feed_details.feed_id,
          # Map the feedAttributeIds to the fieldId constants.
          'attributeFieldMappings': [
              {
                  'feedAttributeId': feed_details.url_attribute_id,
                  'fieldId': DSA_PAGE_URLS_FIELD_ID
              },
              {
                  'feedAttributeId': feed_details.label_attribute_id,
                  'fieldId': DSA_LABEL_FIELD_ID
              }
          ]
      },
      'operator': 'ADD'
  }

  # Add the feed mapping.
  feed_mapping_service.mutate([operation])