def find_or_create_provider_intent(link_provider:, link_original_name:, link_type:)
      intent = Bosh::Director::Models::Links::LinkProviderIntent.find(
        link_provider: link_provider,
        original_name: link_original_name,
      )

      if intent.nil?
        intent = Bosh::Director::Models::Links::LinkProviderIntent.create(
          link_provider: link_provider,
          original_name: link_original_name,
          type: link_type,
        )
      else
        intent.type = link_type
      end

      intent.serial_id = @serial_id if intent.serial_id != @serial_id
      intent.save
    end
def find_or_create_provider_intent(link_provider:, link_original_name:, link_type:)
      intent = Bosh::Director::Models::Links::LinkProviderIntent.find(
        link_provider: link_provider,
        original_name: link_original_name,
      )

      if intent.nil?
        intent = Bosh::Director::Models::Links::LinkProviderIntent.create(
          link_provider: link_provider,
          original_name: link_original_name,
          type: link_type,
        )
      else
        intent.type = link_type
      end

      intent.serial_id = @serial_id if intent.serial_id != @serial_id
      intent.save
    end
Used by provider, not using alias because want to update existing provider intent when alias changes